Hello,
Thanks for your feedback.
Through your comments on other posts, I guess that you use the following code before converting excel to pdf, if so, please refer to the following code to achieve the effect you wanted. However, if my guess is wrong, please offer a simple Java project, you can create a simple console project that can reproduce your issue. The project may be a big file, you could upload your large file via Dropbox or OneDrive server, then share us with the download link.
In addition, how is the jar file I provided running on your side?
Looking forward to your reply.
- Code: Select all
//Create a Workbook instance and load an Excel file
Workbook workbook = new Workbook();
workbook.loadFromFile("data/balance-sheet.xlsx");
workbook.getConverterSetting().setSheetFitToWidth(true);
//Set worksheets to fit to page when converting
workbook.getConverterSetting().setSheetFitToPage(true);
//Save the resulting document to a specified path
workbook.saveToFile("output/balance-sheet.pdf", FileFormat.PDF);
Sincerely
Abel
E-iceblue support team