SVG to PDF
Convert SVG files into PDF documents locally in your browser with page size, orientation, background and margin controls. The output is a real PDF binary with a rasterized rendering of the SVG.
Browser-based PDF export
Export SVG markup as a PDF document.
Paste SVG code, upload a file or try the built-in sample. Choose page size, orientation, background and margin settings before generating a PDF locally in your browser — no upload required.
Please check the SVG markup and try again.
The canvas captures SVG at t=0 as a static snapshot — animated elements that start with opacity="0" will appear invisible in the PDF. Remove the <animate> elements or use a static version of this SVG for best results.
Original SVG vs PDF page preview
Paste SVG markup or try the sample to preview the source.
Generate PDF to preview the page layout.
SVG markup
Use a complete SVG document or inline SVG element. The export engine renders it to canvas locally in your browser and embeds it as a raster image inside a real PDF binary.
PDF export summary
Download and copy controls become active after the browser generates a real PDF binary from your SVG.
How It Works
SVG to PDF renders SVG markup to a browser canvas locally and embeds the result as a raster image inside a real PDF binary. The PDF contains a single page with configurable size, orientation, margin and scale mode. The conversion runs entirely in the browser — no file is sent to a server. The generated PDF is a genuine .pdf file, not a renamed image. Because the image is rasterized from canvas, the output does not contain editable vector paths.
Use Cases
- Archiving SVG icons and illustrations as PDF documents for long-term storage
- Creating print-ready PDFs from SVG artwork for sharing or distribution
- Embedding SVG graphics into PDF reports or portfolios without a design tool
- Generating a browser-compatible PDF preview of SVG content for download workflows
FAQ
Does SVG to PDF upload my file?
No. SVGTrim converts SVG to PDF locally in your browser. Your SVG file is not uploaded, and the generated PDF contains a rasterized rendering of the SVG rather than editable vector paths.
Is the output a real PDF or a renamed image?
The output is a genuine PDF binary (PDF 1.4) with a proper ICONDIR structure — a Catalog, Pages, Page, content stream and image XObject. It opens correctly in PDF viewers such as Adobe Reader, Chrome, Preview and Edge.
Can the PDF keep SVG transparency?
Yes, when Background is set to Transparent. The tool uses an RGB image with a separate grayscale alpha soft mask (SMask) inside the PDF, which preserves transparency correctly in PDF viewers that support it. This path requires CompressionStream support in the browser.
Why does Transparent background look different from White?
PDF page backgrounds are typically rendered as white by PDF viewers even when no background is specified. The SVG image itself can carry transparency via the SMask, but the visible page colour depends on the PDF viewer. For print output, choose White or Black for a defined background.
Does the PDF contain editable vector paths?
No. This tool produces a raster PDF — the SVG is rendered to a canvas and the resulting pixel image is embedded in the PDF. Vector paths, text and shapes are not preserved as editable PDF objects. This is a deliberate design choice for stability and broad SVG feature compatibility.
What page sizes are available?
Auto from SVG uses the SVG intrinsic dimensions (from viewBox or width/height) as the PDF page size in points. A4 (595×842 pt), Letter (612×792 pt) and Square (595×595 pt) are standard presets. Orientation can be forced to Portrait or Landscape independently.
What does the Scale mode setting do?
Fit page scales the image to fill the available area while maintaining the SVG aspect ratio. Actual size places the image at 1 SVG unit per PDF point and fits it if it exceeds the page. Fill page stretches the image to fill the entire content area, which may distort SVGs that do not match the page aspect ratio.
Why can some SVGs fail to export as PDF?
Browser canvas rendering can be blocked by external assets, remote images, unsupported SVG features or cross-origin restrictions. The signal strip shows detected risks before export. External assets that taint the canvas prevent pixel data extraction and will cause the PDF export to fail.