If you'd like to remove the evaluation message from the generated documents, or to get rid of the function limitations, please request a 30-day trial license for yourself. Draw the template with a custom size at a specified location in the PDF fileĭoc2.getPages().get(0).getCanvas().drawTemplate(template, new Point2D.Float(100,200), new Dimension(400,280) ) ĭoc2.saveToFile("AddSVGtoPDF.pdf", FileFormat.PDF) PdfTemplate template = doc1.getPages().get(0).createTemplate() Create a template based on the content of the SVG file Try the PDF conversion with a SVG test file. To convert in the opposite direction, click here to convert from PDF to SVG: PDF to SVG converter. Save the result PDF file using PdfDocument.saveToFile() method. Change quality or size (optional) Click on 'Start conversion' to convert your file from SVG to PDF.Draw the template with a custom size at a specified location on the PDF page using PdfPageBase.getCanvas().drawTemplate() method.Get a specified page in the PDF file using PdfDocument.getPages().get() method.Create another PdfDocument object and load a PDF file using PdfDocument.loadFromFile() method.Create a template based on the content of the SVG file using PdfDocument.getPages().get().createTemplate() method.Create a PdfDocument instance and load an SVG file using PdfDocument.loadFromSvg() method.During the process, you are allowed to set the position and size of the SVG image. In addition to converting SVG to PDF, Spire.PDF for Java also supports adding SVG images to PDF files. Pdf.saveToFile("SVGToPDF.pdf", FileFormat.PDF)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |