I am so confused by all the different namespaces for Aspose.PDF. The documentation is all over the place and finding out how to do a task is a monumental feat. I just want to know the most efficient way to convert a TIFF image to a PDF. I have to choose between DOM, Generator, Facades, and something called PDFMend. What???
Hi Joseph,
Document doc = new Document();<o:p></o:p>
Page page = doc.Pages.Add();<o:p></o:p>
//Create an image object in the section<o:p></o:p>
Aspose.Pdf.Image image1 = new Aspose.Pdf.Image();<o:p></o:p>
//Add image object into the Paragraphs collection of the section<o:p></o:p>
page.Paragraphs.Add(image1);<o:p></o:p>
//Set the path of image file<o:p></o:p>
image1.File = myDir+ “TEST.TIF”;<o:p></o:p>
// specify the image Width and Height information equal to page Width and Height<o:p></o:p>
image1.FixWidth = page.PageInfo.Width - page.PageInfo.Margin.Left - page.PageInfo.Margin.Right;
image1.FixHeight = page.PageInfo.Height - page.PageInfo.Margin.Top - page.PageInfo.Margin.Bottom;<o:p></o:p>
doc.Save(myDir+“out.pdf”);Hi Joseph,
Thanks. I’ll have to give that a try. Put in a quick fix using my ActivePDF Toolkit solution. Those resulting files are abuot 10% of the size of the Aspose produced PDFs, but retain high quality.
Hi Joseph,