I’m trying to convert an XLSX file with simple content, no pivot tables or charts, and the PDF output contains none of the data which is in the original file.
The very peculiar thing is that if I open the problematic file with Excel and save it without modifying it in any way, the conversion works. Same if I modify it before saving it.
Other XLSX files work as well.
I’m using aspose-cells-8.7.2.jar but I’ve also tried using aspose-cells-17.5.jar and the results are the same.
This is the code I’m running :
Workbook workbook = new Workbook(inputDir + fileIn);
// Define PdfSaveOptions
PdfSaveOptions saveOptions = new PdfSaveOptions();
// Set the compliance type
// Save the PDF file
workbook.save(outputDir + fileOut, saveOptions);
I’ve tried work-arounds, like saving the file into another temporary XLSX file before using that file as the base for my PDF, but that didn’t work either.
I’ve attached the XLSX file as well as the invalid output PDF file. As mentioned above, manipulating the file in any way seems to “correct” it, so I would advise using it “as is”.
Can you find out what’s wrong and how I could solve the problem?
- CELLSJAVA-42296 - Xlsx file is rendering as an empty Pdf