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

Free Support Forum - aspose.com

Facing performance issue in generating PDF


I am converting excel to PDF using Aspose . I am facing performance issue in generating PDF reports . It is taking 20 to 30 seconds in generating excel report where as for PDF it is taking more than one minute.Below is the code I am using for PDF . Please suggest me.

for(int index=0; index<workbook.getWorksheets().getCount(); index++)


Worksheet ws = workbook.getWorksheets().get(index);



//Accessing the first worksheet in the Excel file

Worksheet sheet = workbook.getWorksheets().get(ZERO);

PageSetup printPageSetup = sheet.getPageSetup();

//Setting the orientation to Portrait





//Setting the printing order of the pages to over then down





//Defining row numbers 1 - 2 as title rows



printPageSetup.setFooter (ONE, " &12 &B Page &P of &N");




int remainder=noOfColumns%EIGHT;

int setNoOfPages=noOfColumns/EIGHT;










PdfSaveOptions saveOpt = new PdfSaveOptions(SaveFormat.PDF);

workbook.save(pdfOutputPath, saveOpt);

Hi Kishore,

Thank you for contacting Aspose support.

The spreadsheet to PDF conversion time mainly depends on the contents of the spreadsheet. If a given spreadsheet has lots of data, graphics or shape objects such as charts and others, it will definitely take some time for the rendering process. In order to evaluate your presented scenario on our end, we need your sample spreadsheet along with your environment details such as follow.

  • Operating system version
  • Operating system architecture
  • Operating system service pack version (if any)
  • JDK type and version

Moreover, please calculate the execution time on your end. We will use that value to benchmark the execution on our end and perform tests to improve the execution time by tweaking your provided code snippet.


Thanks for the response.

The excel sheet is having simple data .Please find the attached excel sheet. To generate the attached excel sheet in the Linux operating System it took around 30 seconds , where as for PDF it took almost 150 seconds.

Hi Kishore,

I am afraid, we are still missing key information to properly investigate this scenario. Most important information to simulate your environment on our end is the following.

  • Flavor and version of Linux
  • Architecture (32bit/64bit)
  • JDK type (OpenJDK/Oracle’s JDK)
  • JDK version

Moreover, please state if we should execute your complete code on this spreadsheet to evaluate the scenario for spreadsheet to PDF conversion or we simply convert it to the PDF while using the following statements. We are asking this because you have probably performed other operations on the provided spreadsheet.


PdfSaveOptions saveOpt = new PdfSaveOptions(SaveFormat.PDF);
workbook.save(pdfOutputPath, saveOpt);