We're using Aspose Cells 7.2.2.1 to generate PDF (and Excel) files. When adding small JPG images to the source XLS and generating a PDF through ASPOSE the file is 6 times the size of the source XLS. I appreciate that ASPOSE does not adjust the image size when generating a PDF, but the image in question is an 11KB JPG file.
Why is the PDF so big? It is a single sheet Excel file (70KB) with an image (11KB) generating a PDF of 420KB.
I attach the source XLS file, the image used in the XLS (as a separate file), the XLS generated from ASPOSE and finally the PDF generated by ASPOSE.
Hi,
Thanks for sharing the files.
I can notice the size issue when converting your Excel file (containing the image) to PDF as you pointed out.
Sample code:
String path ="Image_Problems_Aspose_Generated_XLS.xls";
Workbook workbook = new Workbook(path);
PdfSaveOptions pso = new PdfSaveOptions(SaveFormat.PDF);
pso.setImageType(com.aspose.cells.ImageFormat.getGif());
workbook.save(path + ".out.pdf", pso);
We will look into it and we will get back to you soon.
I have logged a ticket with an id: CELLSJAVA-40277 for your issue. The issue is linked with the thread, so once we figure it out, you will be notified here automatically.
Thank you.