Saving a PDF file currently writes out the DecodeParms
entry of stream dictionaries using indirect object
references instead of explicit dictionary objects. This
seems to break two different Java PDF viewers I've
tried (JPedal and activetree's SmartJPrint), although
Adobe Acrobat reader v5 handles it fine. This could
well be a fault with these two packages and not with
PDFBox but I would appreciate confirmation of this.
Example:
Imput file snippet:
431 0 obj
<<
/Type /XObject
/Subtype /Image
/Width 32
/Height 1752
/BitsPerComponent 1
/ImageMask true
/Length 2776
/Filter [ /ASCII85Decode /CCITTFaxDecode ]
/DecodeParms [ null << /K -1 /Columns 32 >> ]
>>
stream
On writing this becomes:
431 0 obj
<<
/Type /XObject
/Subtype /Image
/Width 32
/Height 1752
/BitsPerComponent 1
/ImageMask true
/Length 531 0 R
/Filter [ /ASCII85Decode /CCITTFaxDecode ]
/DecodeParms [ null 532 0 R ]
>>
stream
I've tweaked my version of PDFBox to output
Dictionaries explicitly within Arrays, but I would like
to know whether PDFBox is at fault here.
Logged In: YES
user_id=601708
I reread the PDF Specification regarding the DecodeParms
entry, it doesn't appear to say that the dictionary can't be an
indirect reference.
It appears to be a bug in the other APIs, but if you submit a
patch for the change I will add it to the COSWriter and have a
flag to turn it on/off.
As a side note, please submit an RFE for functionality that is
missing in PDFBox that is causing you to use
JPedal/SmartJPrint, I make no promises that it will get
implemented, but I do promise that if there is no RFE it won't.
Logged In: YES
user_id=601708
closing this issue because I have not heard back from the
user and it appears to be valid functionality. Feel free to
reopen if you have more information.
Ben Litchfield