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

Free Support Forum - aspose.com

Confusing documentation

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,

Thanks for your inquiry. Please note Aspose.Pdf.Genertor(Old generator) is only used to create PDF files from scratch and going to be obsolete soon. Whereas, Aspose.Pdf.Document(DOM) is new generator and can create new PDF files from scratch and also manipulate existing PDF files as well. Aspose.Pdf.Facades(Facades) is only used to manipulate existing PDF files, PdfMend is one of the Facades classes.

We will suggest you to use DOM approach for converting TIFF image to PDF. Please find a sample code snippet for the purpose.

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>


//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>


Hi Joseph,

Adding more to Tilal’s comments, the PdfFileMend class is used to add Text, Image as watermark to PDF file. As suggested earlier, please try using the new Document Object Model (DOM) approach of Aspose.Pdf namespace.

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,

Thanks for your feedback. You may consider following documentation link to reduce the file by compressing the images. You can also control the resolution and quality of the images. Hopefully it will help you to accomplish the task.

Please feel free to contact us for any further assistance.

Best Regards,