java.lang.StackOverflowError on saving as pdf

Posted by: srinivas.varma on 22 July 2019, 7:50 pm EST

  • Posted 22 July 2019, 7:50 pm EST

    Hi .
    i have excel file where i am trying to save it as PDF , but during the process i am getting below error

    java.lang.StackOverflowError: null
    at java.lang.String.equals(Unknown Source)
    at com.grapecity.documents.excel.drawing.y.a(Unknown Source)

    i am also attaching the excel file for your reference .
  • Replied 22 July 2019, 8:04 pm EST

    Sorry not able to attach the excel file, as its not allowing me.
  • Replied 22 July 2019, 8:12 pm EST

    this is My Code :

    Workbook finalOut = null;
    String tempFile ="E:\\ExcelFile.xlsx";
    String outFile ="excelPdf.pdf";
    try {
    finalOut = getWorkbook(new FileInputStream((tempFile)));
    if (finalOut != null) { FileOutputStream(outFile), SaveFileFormat.Pdf);
    } catch (Exception e) {
    System.err.println("Error => {} "+ e.toString());

    FYI :
    Excel file has conditional formats , cell styles ..
  • Replied 30 July 2019, 5:07 pm EST


    Apologies for the delayed response first of all. We missed out on this thread.

    However, with the help of Excel file shared in this, we could replicate the issue and hence we have escalated the same to the concerned team for the fix.

    We will update you as soon as we hear anything from our concerned team.

    Tracking id for your issue is #DOCXLS-1315

  • Replied 5 August 2019, 9:28 pm EST


    Your issue has been fixed by our developers and it will be out in the next hotfix build.

  • Marked as Answer

    Replied 8 August 2019, 2:43 pm EST


    Please test your case against the latest build v2.2.3 and let us know if it solves your issue. Latest build can be downloaded from this link:-

    Hope it helps.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels