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.
|