SVG to PDF

No downloads or installation required!

Convert SVG files to PDF with the free online app, or learn how SVG to PDF works with our embedded iText 8 Sandbox.

Convert SVG to PDF

Click the box to upload an image or drag and drop a file into the box. The maximum file size is 20 MB.

Click Download file to download the resulting PDF file containing your SVG vector file.

Or play in the iText 8 Sandbox

In this Sandbox you can see how you can convert an SVG file to PDF with the open-source iText Core library, and experiment with changing the code. 

Click Upload File and make sure the file name of the file you upload matches the name you specify in  SVG_FILE

Then click Execute to run your code. To remove an uploaded file, click the x displayed next to the file name.

import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.WriterProperties; import com.itextpdf.kernel.geom.PageSize; import com.itextpdf.svg.converter.SvgConverter; import com.itextpdf.svg.processors.ISvgConverterProperties; import com.itextpdf.svg.processors.impl.SvgConverterProperties; import java.io.FileInputStream; import java.io.IOException; public class SVGtoPDF { private static String SVG_FILE = "/uploads/input.svg"; private static String OUTPUT_FILE = "/myfiles/result.pdf"; public static void main(String[] args) throws IOException { try (PdfDocument doc = new PdfDocument(new PdfWriter(OUTPUT_FILE, new WriterProperties().setCompressionLevel(0)))) { doc.addNewPage(PageSize.A4); ISvgConverterProperties properties = new SvgConverterProperties().setBaseUri(SVG_FILE); SvgConverter.drawOnDocument(new FileInputStream(SVG_FILE), doc, 1, properties); } } }
using System; using System.IO; using iText.Kernel.Geom; using iText.Kernel.Pdf; using iText.Svg.Converter; using iText.Svg.Processors; using iText.Svg.Processors.Impl; namespace ConsoleApp1 { class Program { private static String SVG_FILE = "/uploads/input.svg"; private static String OUTPUT_FILE = "/myfiles/result.pdf"; static void Main(string[] args) { using (PdfDocument doc = new PdfDocument(new PdfWriter(OUTPUT_FILE, new WriterProperties().SetCompressionLevel(0)))) { doc.AddNewPage(PageSize.A4); ISvgConverterProperties properties = new SvgConverterProperties().SetBaseUri(SVG_FILE); SvgConverter.DrawOnDocument(new FileStream(SVG_FILE, FileMode.Open, FileAccess.Read, FileShare.Read), doc, 1, properties); } } } }

Get started with the full experience

If you want to create your own Java or C# integration to convert SVG files to PDF, you can get started with the open-source iText Core library as part of the iText Suite trial. 

Get started
Disclaimer:

iText does not analyze the content of your uploaded or processed files. Users bear sole responsibility for the usage and content of their own files. All uploaded and processed files are deleted from our servers after users leave the page, or automatically after a period of 3 hours.



Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now