Zend Framework

Unknown trailer dictionary key 'DocChecksum' with OpenOffice-made PDF

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.2
  • Fix Version/s: 1.5.1
  • Component/s: Zend_Pdf
  • Labels:
    None
  • Fix Version Priority:
    Should Have

Description

I opened a document in OpenOffice 2.3, and exported it to PDF with the default values. When I tried to load the PDF document, I got the following exception thrown:

Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Unknown trailer dictionary key: 'DocChecksum'.' in Zend/Pdf/Trailer.php:53 Stack trace: #0 Zend/Pdf/Trailer.php(68): Zend_Pdf_Trailer->_checkDictKey('DocChecksum')
#1 Zend/Pdf/Trailer/Keeper.php(64): Zend_Pdf_Trailer->__construct(Object(Zend_Pdf_Element_Dictionary))
#2 Zend/Pdf/Parser.php(335): Zend_Pdf_Trailer_Keeper->__construct(Object(Zend_Pdf_Element_Dictionary), Object(Zend_Pdf_Element_Reference_Context))
#3 Zend/Pdf/Parser.php(455): Zend_Pdf_Parser->_loadXRefTable('1197829')
#4 Zend/Pdf.php(291): Zend_Pdf_Parser->__construct('system/applicat...', Object(Zend_Pdf_ElementFactory_Proxy), true)
#5 Zend/Pdf.php(244): Z in Zend/Pdf/Trailer.php on line 53

How to reproduce:
Open OpenOffice v2.3, enter any text, and export to PDF. Then try to load that document using Zend_Pdf.

Suggested fix:
Unless you're against adding the DocChecksum key to the $_allowedKeys, I would just add it to it.

Tested on 1.0.2, but pretty sure the problem exists in 1.0.3.

  1. SampleDocument.odt
    19/Mar/08 10:52 AM
    7 kB
    Andries Seutens
  2. SampleDocument.pdf
    19/Mar/08 10:52 AM
    16 kB
    Andries Seutens

Issue Links

Activity

Hide
Andries Seutens added a comment -

Updated fix versions

Show
Andries Seutens added a comment - Updated fix versions
Hide
Willie Alberty added a comment -

Logan, I don't have OpenOffice on my computer. Can you upload a sample document so I can take a closer look?

Show
Willie Alberty added a comment - Logan, I don't have OpenOffice on my computer. Can you upload a sample document so I can take a closer look?
Hide
Andries Seutens added a comment -

The code freeze for 1.5.1 releases is currently scheduled for 21:00 (9:00pm) PST (GMT-8) on Friday, March 21. Would it be possible to address this issue before then? It would be sincerely appreciated

Show
Andries Seutens added a comment - The code freeze for 1.5.1 releases is currently scheduled for 21:00 (9:00pm) PST (GMT-8) on Friday, March 21. Would it be possible to address this issue before then? It would be sincerely appreciated
Hide
Willie Alberty added a comment -

I can fix it this week if someone is able to upload a sample document from OpenOffice.

Show
Willie Alberty added a comment - I can fix it this week if someone is able to upload a sample document from OpenOffice.
Hide
Andries Seutens added a comment -

I attached a sample PDF export from an open office document. I have not verified if the error occures with this file.

Show
Andries Seutens added a comment - I attached a sample PDF export from an open office document. I have not verified if the error occures with this file.
Hide
Andries Seutens added a comment -

also attached the source document.

Show
Andries Seutens added a comment - also attached the source document.
Hide
Willie Alberty added a comment -

Added "DocChecksum" to the valid trailer dictionary keys. Created ZF-2603 to remove trailer key limitations altogether.

Fixed in trunk and 1.5.1. Please verify and close.

Show
Willie Alberty added a comment - Added "DocChecksum" to the valid trailer dictionary keys. Created ZF-2603 to remove trailer key limitations altogether. Fixed in trunk and 1.5.1. Please verify and close.
Hide
Willie Alberty added a comment -

That is, created ZF-2944 to remove trailer key limitations altogether.

Show
Willie Alberty added a comment - That is, created ZF-2944 to remove trailer key limitations altogether.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: