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

Free Support Forum - aspose.com

Conversion of Tiff To PDF

Dear Team

I have used below code for tiff to pdf. In this code pdf conversion is fine but output is not properly. Please give solution for this.

Source : Tiff to pdf.zip (467 Bytes)

Input : gr1.zip (379.1 KB)

Current OP : gr1_formate.zip (209.9 KB)

Expected OP : ExoOP.zip (414.7 KB)

Thank you


Thank you for contacting support.

Please upgrade to Aspose.PDF for Java 18.9.1 and try to use below code snippet in your environment, then share your kind feedback with us.

// Instantiate Document Object
Document doc = new Document();
// Add a page to pages collection of document
Page page = doc.getPages().add();
// Load the source image file to Stream object
java.io.FileInputStream fs = new java.io.FileInputStream("D:\\Tiff to pdf\\input\\gr1.tif");

// Set margins so image will fit, etc.

// Create an image object
com.aspose.pdf.Image image1 = new com.aspose.pdf.Image();
// Add the image into paragraphs collection of the section
// Set the image file stream
// Save resultant PDF file
doc.save(dataDir + "TIFF2PDF_DOM.pdf");

We have attached generated PDF file for your kind reference TIFF2PDF_DOM.pdf. We hope this will be helpful. Please feel free to contact us if you need any further assistance.

Thanks for your support. It’s working fine.