Performace issue with converting tif to pdf

I am trying to convert tif into pdf, the performance is so bad, I end up converting a 100KB file into 3MB pdf. I have tried to setBlackWhite(true), but the pdf it created gives error with “insufficient data for an image”. Below is my code, can anyone help?

Document pdf = new Document();
Page sec = pdf.getPages().add();
com.aspose.pdf.Image img = new com.aspose.pdf.Image();
sec.getParagraphs().add(img);
img.setFile(“C:\Users\adm_loud\Desktop\aspose\files\TifIn.tif”);
//img.setBlackWhite(true);
img.setInNewPage(true);
pdf.save(“C:\Users\adm_loud\Desktop\aspose\files\TifOut.pdf”);
Hi Dennis,

Thank you for your inquiry.

Please note that your query is related to Aspose.Pdf. To help you better, I am moving your thread to Aspose.Pdf support forum where one of my fellow colleagues from Aspose.Pdf support team will help you soon.

Hi Dennis,


Thanks for using our API’s.

Please share the input TIFF image, so that we can test the scenario in our environment. We are sorry for this inconvenience.

file attached

Hi Dennis,


Thanks for sharing the resource file.

I have tested the scenario using Aspose.Pdf for Java 11.0.0 and have managed to reproduce the same problem. For the sake of correction, I have logged this problem
as PDFNEWJAVA-35361 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.