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 (JIRA)" <ji...@apache.org> on 2011/06/22 12:24:47 UTC

[jira] [Created] (PDFBOX-1047) PDPageLabels with Junks in Particular Pdf

PDPageLabels with Junks in Particular Pdf
-----------------------------------------

                 Key: PDFBOX-1047
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1047
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 1.5.0
            Reporter: karthick
             Fix For: 1.6.0
         Attachments: pagelabelwithjunk.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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (PDFBOX-1047) PDPageLabels with Junks in Particular Pdf

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler reopened PDFBOX-1047:
----------------------------------------


One of the tests fails, I thought I checked that before checking in the code ...

> PDPageLabels with Junks in Particular Pdf
> -----------------------------------------
>
>                 Key: PDFBOX-1047
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1047
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: karthick
>            Assignee: Andreas Lehmkühler
>              Labels: PageLabel
>             Fix For: 1.7.0
>
>         Attachments: pagelabelwithjunk.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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1047) PDPageLabels with Junks in Particular Pdf

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler updated PDFBOX-1047:
---------------------------------------

    Fix Version/s:     (was: 1.6.0)

> PDPageLabels with Junks in Particular Pdf
> -----------------------------------------
>
>                 Key: PDFBOX-1047
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1047
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: karthick
>              Labels: PageLabel
>         Attachments: pagelabelwithjunk.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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (PDFBOX-1047) PDPageLabels with Junks in Particular Pdf

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-1047.
----------------------------------------

    Resolution: Fixed

I limited the trimming to null bytes in revision 1142470

> PDPageLabels with Junks in Particular Pdf
> -----------------------------------------
>
>                 Key: PDFBOX-1047
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1047
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: karthick
>            Assignee: Andreas Lehmkühler
>              Labels: PageLabel
>             Fix For: 1.7.0
>
>         Attachments: pagelabelwithjunk.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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1047) PDPageLabels with Junks in Particular Pdf

Posted by "karthick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

karthick updated PDFBOX-1047:
-----------------------------

    Attachment: pagelabelwithjunk.pdf

> PDPageLabels with Junks in Particular Pdf
> -----------------------------------------
>
>                 Key: PDFBOX-1047
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1047
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: karthick
>              Labels: PageLabel
>             Fix For: 1.6.0
>
>         Attachments: pagelabelwithjunk.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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (PDFBOX-1047) PDPageLabels with Junks in Particular Pdf

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-1047.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7.0
         Assignee: Andreas Lehmkühler

The page label definition for the third page ends with 3 null-bytes which leads to a scrambled output. 

I fixed this behaviour by adding a trim to all labels in revision 1142450


> PDPageLabels with Junks in Particular Pdf
> -----------------------------------------
>
>                 Key: PDFBOX-1047
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1047
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>            Reporter: karthick
>            Assignee: Andreas Lehmkühler
>              Labels: PageLabel
>             Fix For: 1.7.0
>
>         Attachments: pagelabelwithjunk.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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira