Free Support Forum - aspose.com

Excell to PDF image not converted

Hi,

When I convert my Excel file to PDF using

workbook.save(output, FileFormatType.PDF);

The image contained in Excel file is not converted

Hi,

Thanks for your reporting.

I was able to reproduce this bug using the latest version: Aspose.Cells for Java v2.5.4.14

This issue has been logged as CELLSJAVA-29284

Hi,


Well, after further investigation we come to know it is not an issue rather you have set the printable area to “A1:C7”, so the image is not rendering in the PDF file. For your knowledge, the PDF file is generated based on the print preview shown (regarding sheets) in MS Excel. You can check the sheet “AnnualAccountsKG” printable area using the PageSetup dialog box in MS Excel for confirmation.

For you need to you may try this:

Workbook workbook = new Workbook();
workbook.open(“excel.xlsx”, FileFormatType.XLSX);
workbook.getWorksheets().getSheet(“AnnualAccountsKG”).getPageSetup().setPrintArea(null);
workbook.save(“output.pdf”, FileFormatType.PDF);

Thank you.