We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to insert vector images (pdf/ai/svg) in Aspose.Pdf.Generator.Image

I generated hundreds of product drawings in pdf format (in Autodesk Inventor).

I want to import those drawings in my PDF document created with Aspose.Pdf.Generator.
How can this be done? These drawings are vector based, I don’t want to convert to pixel format to keep small pdf file sizes, and to keep a good resolution.

Same problem with our company logo (in AI/SVG vector format)


Hi Maikel,

Thanks for your inquiry. As per my understanding you need to concatenate your drawings(in PDF format) with another PDF document. Please check following documentation link for concatenation PDF files, Hopefully it will help you to accomplish the task.

However, If there is some difference in your requirements and my understanding then please share some more details and your sample PDF documents here, so we will look into these and guide you accordingly.

Please feel free to contact us for any further assistance.

Best Regards,

Well I try to create a Aspose.Pdf.Generator.Pdf document with a header, a footer and several paragraphs with text + drawings (see ProductText.pdf).

These drawings are created with Autodesk Inventor, and exported to pdf (see ProductDrawing.pdf)

So I want to insert drawing ProductDrawing.pdf in a paragraph of the Aspose.Pdf.Generator.Pdf. And I want to resize the drawing to 10cmx10cm.

I don’t want to convert the ProductDrawing to pixel oriented formats.

The company logo is in AI-format and is vector oriented. There is no vector oriented ImageFileType to do that, so I had to convert the logo to Aspose.Pdf.Generator.ImageFileType.Png. But I prefer a vector oriented format.

I can generate these pdf files with Ole Automation to Adobe Indesign, but now I want to do the same with Aspose.Pdf.

Hi Maikel,

Thanks for your inquiry. You can also add vector(svg) image in PDF document using new DOM (Aspose.Pdf) along with other elements. However currently it is malfunctioning, so I have logged a ticket PDFNEWNET-39501 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

// Instantiate Document Object<o:p></o:p>

Document doc = new Document();

// Add a page to pages collection of document

Aspose.Pdf.Page page = doc.Pages.Add();

// Create an image object

Aspose.Pdf.Image image1 = new Aspose.Pdf.Image();

image1.File = myDir + "sample_car.svg";

image1.FileType = Aspose.Pdf.ImageFileType.Svg;

// Aspsoe.Pdf measuring unit is point, 1 inch= 72 point= 2.54 cm

image1.FixWidth = 283.4645669;

image1.FixHeight = 283.4645669;

// Add the image into paragraphs collection of the section


// Set the image file stream

// Save resultant PDF file


We are sorry for the inconvenience caused.

Best Regards,