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

saveIncremental java.lang.NullPointerException

    XMLWordPrintableJSON

Details

    Description

      Loading a document and saving it via saveIncremental throws java.lang.NullPointerException.

      PDDocument doc = PDDocument.load(input);
      doc.saveIncremental(...);


      Exception in thread "..." java.lang.NullPointerException
      at org.apache.pdfbox.pdfparser.PDFXRefStream.getStream(PDFXRefStream.java:90)
      at org.apache.pdfbox.pdfwriter.COSWriter.doWriteXRefInc(COSWriter.java:697)
      at org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1139)
      at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:578)
      at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1516)
      at org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1397)
      at org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1372)
      at ...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              striderapache dennis lucero
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: