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

Free Support Forum - aspose.com

Saving file in PDF format - Difference doing it on Windows or Unix?

We are using aspose-cells-

We are generating an excel file with aspose cell (see attachment Test.xlsx).

Then we have an option to save the file in PDF, using instruction: wb.save("Test.xslx", FileFormatType.PDF)

Develpemnt is made on a computer with Windows7. Deployment is made on a Unix server (Solaris 10).

The Aspose program run on server side, using Tomcat.

When I execute on my developement local Tomcat, means running with Windows OS, I obtain the pdf file "Test Windows.pdf"

When I execute on the server, means Tomcat running with Unix, I obtain the pdf file "Test Unix.pdf" wich is bad generated because of 2 pages instead of one, and policy is strange...

I think it's maybe because of the system environement (windows or unix). What do you think? What can we do to obtain best result?

Thank you for your answer.


Thank you for contacting Aspose support.

I suspect that the said problem is caused due to the improper fonts usage while rendering the spreadsheet to PDF format in Unix environment. My suspicion is based on the fact the different sets of fonts have been used to render the provided PDF files. Please check the attached snapshots for your reference.

Please note, Aspose.Cells API uses the fonts to calculate the cell height & width while rendering spreadsheets to other formats such as PDF. When required fonts (ones used in the spreadsheet) are not available in the environment, the API substitutes the required fonts with any other available font, consequently the text may appear differently and the canvas size may slightly change. Please check the detailed article on Usage of TrueType Fonts by Aspose.Cells for Java API.

In order to troubleshoot this scenario further, I would suggest you to copy the LucidaSans & Calibri font families from your Windows platform to the Unix machine. Once the TTFs have been placed in Unix, please call the CellsHelper.setFontDir(location to the TTFs) at the start of your application. Hopefully, you will be able to get the results similar to one generated on Windows platform. Please read more about Setting the TrueType Fonts Location.

Please keep us posted with your test results.