Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4314

IndexOutOfBoundsException when saving a document (at random)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: Writing
    • Labels:

      Description

      When saving documents it randomly error's. We have 2 functions that call this, they are financial docs a privacy notice and a credit disclosure. They are generated then saved ans sent to customers 9/5/2018 from 11 customers 2 failed one failed at the first document the send failed at the second document. Code below.

      var pnPages = page2.getDocumentCatalog().getAllPages();
      document.addPage((PDPage)pnPages.get(0));
      document.addPage((PDPage)pnPages.get(1));

      string fileName = "Credit_Score_Disclosure_" + borrowerName + "_";
      string fullFileName = System.IO.Path.GetTempPath() + fileName + Guid.NewGuid() + ".pdf";

      document.save(fullFileName);
      document.close();

      There is a try catch around the code which is how we collect the failure. We have the blank file it creates so it gets as far as the save then errors.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              neilcrouch Neil Crouch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: