How to customize style/visual properties while converting Excel file to PDF format

Hi,


I am using Aspose Cells 8.4.2 for converting my Excel file to PDF format. Please find the provided Excel file (country-wise-sales.xlsx) and the generated PDF document (example-output.pdf) in the attachment.

I found below issues in the generated PDF document.
  1. Last few characters of the column headers have been trimmed and hence cannot be read fully.
  2. Total value is missing.

So, how can I increase column size and show grand total in the generated PDF document?

API version: Aspose Cells 8.4.2
Language: Java
Example code: workbook.save(OutputStream os, SaveFormat.PDF)

Hi,


Please try the following sample code (see the lines in bold), it should fix your issue:
e.g
Sample code:

Workbook wb = new Workbook(“country-wise-sales.xlsx”);
wb.calculateFormula();
wb.getWorksheets().get(0).autoFitColumns();
wb.save(“e:\test2\out1.pdf”);

Let us know if you still have any issue.

Thank you.