Hi,

For the Scribus DTP software, I'm looking into the podofo-impose tool. I
discovered that the tool makes some mistakes in how images are copied into
the new document.

If I have in my source PDF file an Xobject with a reference to an SMask
object and in Length object as below:

15 0 obj <<
/Type /XObject
/Subtype /Image
/Width 400
/Height 250
/ColorSpace /DeviceRGB
/BitsPerComponent 8
/Length 16 0 R
/Filter /DCTDecode
/SMask 14 0 R
>>
stream ....

Then after podofo_impose this object is transformed into (linefeeds added
myself):

11 0 obj <<
/Type/XObject
/BitsPerComponent 8
/ColorSpace
/DeviceRGB
/Filter
/DCTDecode
/Height 250
/Length 18758
/SMask<</Type/XObject/BitsPerComponent
8/ColorSpace/DeviceGray/Filter/FlateDecode/Height 250/Length
120/Subtype/Image/Width 400>>
/Subtype/Image
/Width 400
>> stream ...

What you see here is that /Length and /SMask have been dereferenced and
became embedded instead of references. While for /Length this is
theoretically allowed, for /SMask this is illegal since it is a streaming
object. Also notice that the actual SMask stream is lost. Also, the
original /Length and /SMask objects are still in the output stream but
never referred to anymore.

I got this far, but now I'm lost in the pdodofo-impose source code. Can
anyone help me with getting this bug out, or tell me where this
dereferencing might occur in the code ?

I submitted a bug with corresponding files in
https://sourceforge.net/apps/mantisbt/podofo/view.php?id=46

Regards,

Jos
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to