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”);