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 (467 Bytes)

Input : (379.1 KB)

Current OP : (209.9 KB)

Expected OP : (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 fs = new"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 + "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.