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)
philippe@falcon.be
Hi Maikel,
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, it is currently 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
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;
// Aspose.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
page.Paragraphs.Add(image1);
// Set the image file stream
// Save resultant PDF file
doc.Save("E:/Data/Image2PDF_DOM.pdf");
We are sorry for the inconvenience caused.
Best Regards,