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

Free Support Forum - aspose.com

Excel to PDF conversion issues on Linux

Aspose_Conversion_Issue.zip (239.3 KB)
Hi,

I am using Aspose.cells 22.10 for java and running on ‘Linux’ machine.Output1.pdf (73.9 KB)
Output2.pdf (97.4 KB)

Facing some issues while converting excel cells,

  1. It shows cell values as ‘######’
  2. Cutting of header, and cells values for bigger texts.
    Attached source code and Input/Ouput files.

@rutuja.mahajan,

Thanks for the template files and output PDF documents.

Please make sure the underlying fonts (e.g. Arial, ArialNarrow, Calibri, etc.) used in the Excel file (e.g., Input2.xlsx) are installed onto your linux machine. You should have all the fonts in the fonts folder. Also, your application should access (you must have read/write permissions for the fonts folder) your fonts folder. Moreover, you should configure fonts (to specify your fonts folder) at the start of your program, see the document on configuring fonts for your reference.

Let us know if you still find the issue on linux machine.

Thanks for your reply.
I have a further question, do we need to set the font folder explicitly through the code or Aspose will automatically look into font folder?

One more thing is, in attached excel If I increase the width of the columns then it converts cell value properly, so is it still related to fonts on Linux? Or do we need any specific setting for Linux only? (because on windows system it works )

It is always better to specify the fonts folder explicitly in code for non-Windows os (at the start and before using any other Aspose.Cells for Java APIs). Please note, Aspose.Cells APIs search the operating system’s default fonts directory for the required fonts (used in the workbook). In case the required fonts are not available in the system’s font directory then the APIs search through the custom (user defined) directories which you have set using the FontConfigs class. Anyways, it is always better to specify fonts folder in code using suggested APIs in the referred document.

The output PDF you shared does not use the underlying fonts (used in the workbook), so probably the issue is due to missing fonts on Linux machine on your end.

Thanks, It got resolved after font installation.

@rutuja.mahajan,

Good to know that your issue is resolved after installing the fonts. Feel free to contact us any time if you have further queries or issue, we will be happy to assist you soon.