View Single Post
Old 03-01-2009, 03:12 PM   #87
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,745
Karma: 4382514
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X
Adobe 6 or 7 error message

Who is still using Acrobat 6 or 7 will probably get an error message after opening the PDF. It still works but its the fault of the EBX_* custom properties.

For removing this adjust your

---------------------------------------------------------------------------
def serialize_object(self, obj):
if isinstance(obj, dict):
self.write('<<')
kc = re.compile(r'EBX_\w*')
for key, val in obj.items():
# remove the EBX_ custom properties (Adobe 6 is complaining about)
if kc.match(key):self.write('')
else:
self.write('/%s' % key)
self.serialize_object(val)
self.write('>>')
---------------------------------------------------------------------------

The problem is that some PDFs have aditional metadata so it still complains. I haven't found out yet how to filter these out.
joblack is offline   Reply With Quote