High CPU / Memory utilization on generating PDF

We faced this similar issue today.

Code Snippet is as below

PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setCompliance(PdfCompliance.PDF_A_1_B);
saveOptions.setAllColumnsInOnePagePerSheet(true);

for (int i = 0; i < workbook.getWorksheets().getCount(); i++)
{
Worksheet sheet = workbook.getWorksheets().get(i);
sheet.autoFitRows();
sheet.getPageSetup().setOrientation(0);
sheet.getPageSetup().setHeaderMargin(0.5);
}
workbook.save(filename,saveOptions);

@lyash
Could you share your template file here. We will check it soon.

@simon.zhao - We don’t have a template file. We are just creating the data based on the dataset which we have in the worksheets and then saving it as PDFs.

@lyash,

Could you please create a standalone JAVA program (source code without compilation errors) which we can evaluate and execute to reproduce the issue on our end. We will check your issue soon.

@lyash
You can save it as Excel file before saving as pdf.
We can check it.

@simon.zhao - You mean in the application to save as excel first and then to pdf?

@lyash,

Please add a line in your code segment to save to Excel (e.g., XLSX) file. Zip the file and provide us. We will evaluate and trace your issue using your saved Excel file.