What is SVG to PDF?
This page draws an SVG into a bitmap and embeds that image in a one-page PDF. Drop a file, pick one from disk, or paste <svg text. Conversion stays in the browser. Files are not uploaded.
The PDF is not a vector file. Paths are painted to pixels first, then placed on the page. One pixel equals one point (1/72 inch). The page is not fitted to A4. Size is a scale (1×, 2×, or 3×) or a custom width in pixels. Height follows the aspect ratio. If the long edge would pass 4096 pixels, the export shrinks in proportion and the file card says so.
The default background is transparent, stored in the embedded PNG. Some viewers still paint the page white behind transparent pixels. White or a custom color flattens the image before it is embedded. Several files download as separate PDFs, or as a ZIP of those PDFs.
When it fits
- A slide deck, print shop, or form wants a PDF and will not accept SVG
- You need a fixed pixel size, not an infinitely sharp vector
- You want the same drawing as SVG to PNG, wrapped in a PDF page
To keep editable paths, download SVG from PNG to SVG or edit them in the SVG editor. To switch among PNG, JPG, WebP, and PDF, use the SVG converter.
How it works
The PDF is a wrapper around a bitmap, built in the browser:
- Sanitize. Scripts,
javascript:URLs, external images, andforeignObjectare removed, the same cleaning SVG to PNG uses. The markup is drawn from a blob URL. It is not inserted into the page. - Render to canvas. Pixels are painted at the scale or custom width you chose. Transparency stays in the embedded PNG unless you pick a flatten color.
- Scale, then embed. The long edge stays at or below 4096 pixels. pdf-lib places that raster on one page at one point per pixel. The original paths are not written into the PDF.
Tracing is a different pipeline. PNG to SVG quantizes colors and fits curves, and it scales the source to a 1024-pixel long edge first.
Privacy
Files never leave your browser. The SVG is read with the local File API, drawn on a canvas on this device, and packed into a PDF here. pdf-lib loads in the page only when you export. Nothing is posted to a server.
Limits
- The embedded image is a raster. Zooming the PDF shows pixels, not new vectors.
- Preview and rasterizing both load a blob URL in an
<img>. MDN's img element reference describes that mode: scripts inside an SVG used as an image do not run. - External images,
javascript:URLs, scripts, andforeignObjectare removed before export.@font-faceand page fonts are unreliable when SVG is loaded as an image, so type may fall back. - Each file must be 8 MB or smaller. About 10 files can be exported at once. The export long edge stays at or below 4096 pixels. A trace on the other pages scales to 1024 pixels before curve fitting.
- PDF here means a page with an image XObject, built with pdf-lib in the browser. pdf-lib is loaded only when a PDF is produced.