You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by karthick g <ik...@gmail.com> on 2011/06/10 08:10:27 UTC

PDPageLabels with Junks in Particular Pdf

Hi all.

While extracting Page number with particular PDF, the last page number was
with Junk values which is also extracted.

Here by I attaching the particular PDF and kindly guide me in that
particular issue.

Here by I show my snippet of code which is working fine in all PDF but
adding junk values with the particular PDF.

*CODE*:

  PDDocumentCatalog cat = pd.getDocumentCatalog();

  String[] labels = cat.getPageLabels().getLabelsByPageIndices();

  System.out.println("Hi"+labels[0] +"Hi");

   System.out.println("Hi"  +labels[labels.length - 1] + "Hi");


*OUTPUT*

*Hi1Hi  Correct Output for First Page*
Hi3   Orginal output for Last Page(bug)
Hi3Hi Expected output for Last Page


Kindly guide me in this issue .i attach the sample PDF with this file.

Thank you

Regards
Karthick.g

Re: PDPageLabels with Junks in Particular Pdf

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,

Am 10.06.2011 08:10, schrieb karthick g:
> Hi all.
>
> While extracting Page number with particular PDF, the last page number was with
> Junk values which is also extracted.
>
> Here by I attaching the particular PDF and kindly guide me in that particular
> issue.
>
> Here by I show my snippet of code which is working fine in all PDF but adding
> junk values with the particular PDF.
>
> *CODE*:
>
> PDDocumentCatalog cat = pd.getDocumentCatalog();
>
>    String[] labels = cat.getPageLabels().getLabelsByPageIndices();
>
>    System.out.println("Hi"+labels[0] +"Hi");
>
>     System.out.println("Hi"  +labels[labels.length - 1] + "Hi");
>
>
> *OUTPUT*
>
> *Hi1Hi  Correct Output for First Page*
> Hi3 Orginal output for Last Page(bug)
> Hi3Hi Expected output for Last Page
>
>
> Kindly guide me in this issue .i attach the sample PDF with this file.
I'm afreaid your attachment didn't make it due to some restrictions to the 
mailing list. Please file on issue on JIRA instead and attach your pdf to it.

> Thank you
>
> Regards
> Karthick.g

BR
Andreas Lehmkühler