You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2012/04/26 18:56:18 UTC

[jira] [Created] (PDFBOX-1297) ExtractText fails to extract text from packaged PDFs

Michael McCandless created PDFBOX-1297:
------------------------------------------

             Summary: ExtractText fails to extract text from packaged PDFs
                 Key: PDFBOX-1297
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1297
             Project: PDFBox
          Issue Type: Improvement
          Components: Text extraction
    Affects Versions: 1.6.0
         Environment: Fedora 13 Linux
            Reporter: Michael McCandless


Apparently a PDF is able to contain multiple files (like a Zip file); it's called
a PDF Package, described at
http://help.adobe.com/en_US/Reader/8.0/help.html?content=WSE034CA46-D08F-4fff-AA3C-FF04510DAEF0.html

I have a simple example PDF Package, containing two sub-PDFs, but ExtractText
fails to extract their text.

It does run successfully (no exceptions), but the text it extracts is just the boilerplate text
saying you should upgrade to Adobe Acrobat version 8 or later to view this PDF.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PDFBOX-1297) ExtractText fails to extract text from packaged PDFs

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

Michael McCandless updated PDFBOX-1297:
---------------------------------------

    Attachment: PDFPackage.pdf

Example document showing that ExtractText doesn't extract the text from the embedded documents.

The document was created with Adobe Acrobat.

It renders fine with Acrobat Reader: I see the two PDFs and when I click on each I can see their text "PDF1" and "PDF2".
                
> ExtractText fails to extract text from packaged PDFs
> ----------------------------------------------------
>
>                 Key: PDFBOX-1297
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1297
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Text extraction
>    Affects Versions: 1.6.0
>         Environment: Fedora 13 Linux
>            Reporter: Michael McCandless
>         Attachments: PDFPackage.pdf
>
>
> Apparently a PDF is able to contain multiple files (like a Zip file); it's called
> a PDF Package, described at
> http://help.adobe.com/en_US/Reader/8.0/help.html?content=WSE034CA46-D08F-4fff-AA3C-FF04510DAEF0.html
> I have a simple example PDF Package, containing two sub-PDFs, but ExtractText
> fails to extract their text.
> It does run successfully (no exceptions), but the text it extracts is just the boilerplate text
> saying you should upgrade to Adobe Acrobat version 8 or later to view this PDF.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (PDFBOX-1297) ExtractText fails to extract text from packaged PDFs

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

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

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

I applied the in revision 1339245 as proposed with one exception. I removed the else part about other formats as only pdfs are relevant here.

Thanks for the contribution!
                
> ExtractText fails to extract text from packaged PDFs
> ----------------------------------------------------
>
>                 Key: PDFBOX-1297
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1297
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Text extraction
>    Affects Versions: 1.6.0
>         Environment: Fedora 13 Linux
>            Reporter: Michael McCandless
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.7.0
>
>         Attachments: PDFBOX-1297.patch, PDFPackage.pdf, testPDFPackage.pdf
>
>
> Apparently a PDF is able to contain multiple files (like a Zip file); it's called
> a PDF Package, described at
> http://help.adobe.com/en_US/Reader/8.0/help.html?content=WSE034CA46-D08F-4fff-AA3C-FF04510DAEF0.html
> I have a simple example PDF Package, containing two sub-PDFs, but ExtractText
> fails to extract their text.
> It does run successfully (no exceptions), but the text it extracts is just the boilerplate text
> saying you should upgrade to Adobe Acrobat version 8 or later to view this PDF.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (PDFBOX-1297) ExtractText fails to extract text from packaged PDFs

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

Michael McCandless updated PDFBOX-1297:
---------------------------------------

    Attachment: testPDFPackage.pdf
                PDFBOX-1297.patch

Patch, adding embedded PDF handling to ExtractText, plus a test case
(and test document).

I would really appreciate someone who's more familiar with PDFBox's
APIs having a look at what I did... I had to dig into various classes
that I don't really understand: PDDocumentCatalog,
PDDocumentNameDictionary, PDEmbeddedFilesNameTreeNode,
PDComplexFileSpecification, PDEmbeddedFile.

I only extract text for embedded PDFs but not other content-types.

I noticed Tika's parser also fails to visit embedded documents within
a PDF... I'll open a separate issue.

                
> ExtractText fails to extract text from packaged PDFs
> ----------------------------------------------------
>
>                 Key: PDFBOX-1297
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1297
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Text extraction
>    Affects Versions: 1.6.0
>         Environment: Fedora 13 Linux
>            Reporter: Michael McCandless
>         Attachments: PDFBOX-1297.patch, PDFPackage.pdf, testPDFPackage.pdf
>
>
> Apparently a PDF is able to contain multiple files (like a Zip file); it's called
> a PDF Package, described at
> http://help.adobe.com/en_US/Reader/8.0/help.html?content=WSE034CA46-D08F-4fff-AA3C-FF04510DAEF0.html
> I have a simple example PDF Package, containing two sub-PDFs, but ExtractText
> fails to extract their text.
> It does run successfully (no exceptions), but the text it extracts is just the boilerplate text
> saying you should upgrade to Adobe Acrobat version 8 or later to view this PDF.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (PDFBOX-1297) ExtractText fails to extract text from packaged PDFs

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

Andreas Lehmkühler edited comment on PDFBOX-1297 at 5/16/12 4:08 PM:
---------------------------------------------------------------------

I applied the patch in revision 1339245 as proposed with one exception. I removed the else part about other formats as only pdfs are relevant here.

Thanks for the contribution!
                
      was (Author: lehmi):
    I applied the in revision 1339245 as proposed with one exception. I removed the else part about other formats as only pdfs are relevant here.

Thanks for the contribution!
                  
> ExtractText fails to extract text from packaged PDFs
> ----------------------------------------------------
>
>                 Key: PDFBOX-1297
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1297
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Text extraction
>    Affects Versions: 1.6.0
>         Environment: Fedora 13 Linux
>            Reporter: Michael McCandless
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.7.0
>
>         Attachments: PDFBOX-1297.patch, PDFPackage.pdf, testPDFPackage.pdf
>
>
> Apparently a PDF is able to contain multiple files (like a Zip file); it's called
> a PDF Package, described at
> http://help.adobe.com/en_US/Reader/8.0/help.html?content=WSE034CA46-D08F-4fff-AA3C-FF04510DAEF0.html
> I have a simple example PDF Package, containing two sub-PDFs, but ExtractText
> fails to extract their text.
> It does run successfully (no exceptions), but the text it extracts is just the boilerplate text
> saying you should upgrade to Adobe Acrobat version 8 or later to view this PDF.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira