We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel XLSX cell width formatting issues when converting to PDF


I’m using Aspose Cells for Java v7.7.2 and I’m seeing text being cut off when trying to convert relatively simple xlxs files to PDF. It looks like a problem with the cell width not being properly read and text is being truncated or flowing past cell boundaries (see header columns & date columns in attached example).

I have attached examples of input Excel file and resulting PDF with this problem.

Code Im using to convert;

log.debug(“Attempting to convert spreadsheet to Pdf.”);
Workbook doc = new Workbook(is); //input stream

PipedOutputStream os = new PipedOutputStream();
PipedInputStream data = new PipedInputStream(os);

doc.save(os, SaveFormat.PDF);
log.debug(“Finished converting spreadsheet to pdf.”);

How can I stop this bug?



Thanks for your posting and using Aspose.Cells for Java.

Please download and use the latest version: Aspose.Cells
for Java v7.7.2.5
it works fine with your source xlsx file and generates correct pdf. I have tested it with the following code and attached the output pdf for your reference.


String filePath = “F:\Shak-Data-RW\Downloads\Dishwasher+Roster.xlsx”;

Workbook workbook = new Workbook(filePath);

workbook.save(filePath + “.out.pdf”, SaveFormat.PDF);