1
0
mirror of https://github.com/kanzure/pdfparanoia.git synced 2024-12-04 23:15:52 +01:00

make eraser handle more pdf formats

This commit is contained in:
Bryan Bishop 2013-02-07 03:56:18 -06:00
parent f3d8475c79
commit e108a43e26

View File

@ -21,7 +21,7 @@ def manipulate_pdf(content, objid, callback, *args):
for line in lines:
if not skip_mode:
if last_line in ["endobj", "endobj ", None]:
if line[-3:] == "obj" or line[-4:] == "obj " or " obj<<" in line[0:50]:
if line[-3:] == "obj" or line[-4:] == "obj " or " obj <<" in line[0:50] or " obj<<" in line[0:50]:
if line.startswith(str(objid) + " "):
skip_mode = True
last_line = line