PDFBox
  1. PDFBox
  2. PDFBOX-911

Method PDDocument.getNumberOfPages() returns wrong number of pages

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.8.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP, Eclipse 3.5.2 Galileo

      Description

      Hello,

      I use PDFbox and are very pleased.
      For one PDF file however getNumberOfPages() returns the wrong number of pages (1 instead of 2 pages).

      Test code:
      File xx = new File("c:\\temp
      test.pdf");
      PDDocument pdoc = PDDocument.load(xx);
      int x = pdoc.getNumberOfPages();

      The PDF file could be provided.

      Thanks in advance.

      Regards

      1. test.unc.pdf
        202 kB
        Adam Nichols
      2. ASF.LICENSE.NOT.GRANTED--Martijn Brinkers.jpg
        205 kB
        nielsen
      3. ASF.LICENSE.NOT.GRANTED--atest.pdf
        151 kB
        nielsen
      4. ASF.LICENSE.NOT.GRANTED--test.pdf
        151 kB
        nielsen

        Issue Links

          Activity

          nielsen created issue -
          nielsen made changes -
          Field Original Value New Value
          Attachment test.pdf [ 12464956 ]
          nielsen made changes -
          Attachment atest.pdf [ 12465035 ]
          Attachment Martijn Brinkers.jpg [ 12465036 ]
          Adam Nichols made changes -
          Attachment test.unc.pdf [ 12465052 ]
          Adam Nichols made changes -
          Link This issue is related to PDFBOX-796 [ PDFBOX-796 ]
          Adam Nichols made changes -
          Link This issue is related to PDFBOX-912 [ PDFBOX-912 ]
          Andreas Lehmkühler made changes -
          Link This issue depends on PDFBOX-1000 [ PDFBOX-1000 ]
          Gavin made changes -
          Link This issue depends on PDFBOX-1000 [ PDFBOX-1000 ]
          Gavin made changes -
          Link This issue depends upon PDFBOX-1000 [ PDFBOX-1000 ]
          Andreas Lehmkühler made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Andreas Lehmkühler [ lehmi ]
          Fix Version/s 1.8.1 [ 12324297 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Andreas Lehmkühler
              Reporter:
              nielsen
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development