You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please use the PageSetup.customPaperSize() method with the most recent version/fix: Aspose.Cells for Java v22.6 for your needs. Please see the following code for your reference.
e.g. Sample code:
//Create workbookWorkbookworkbook = newWorkbook("f:\\files\\Book1.xlsx");
//Access first worksheetWorksheetws = workbook.getWorksheets().get(0);
//Set custom paper size, you need to convert cm to inchesws.getPageSetup().customPaperSize(1.97,5.9);
//Save it as pdfworkbook.save("out1.pdf");
When excel is converted to PDF, the default paper size is A4. How can I realize the custom size (such as 15cm*5cm)?
The text was updated successfully, but these errors were encountered: