Hi all,
I am copying the pages of a 81284 page pdf file, and saving to a new file with linearization. However, the save call came back with an exception during execution:
Exception: An error occurred during linearization: Operation file seek failed
What possible causes are there for the save command to fail with this error? I’ve attached my python code below.
new_doc = PDFDoc()
doc = PDFDoc("./test.pdf")
doc.InitSecurityHandler()
copy_pages = VectorPage()
itr = doc.GetPageIterator()
while itr.HasNext():
page = itr.Current()
copy_pages.push_back(page)
itr.Next()
imported_pages = new_doc.ImportPages(copy_pages)
i = iter(imported_pages)
for x in i:
new_doc.PagePushBack(x)
doc.Close()
new_doc.Save("./test_resave.pdf", SDFDoc.e_linearized)
new_doc.Close()
I know that it may be difficult to debug this without the original pdf, so just pointing me at possible causes of this error message would be great. I cannot provide the pdf itself without approval from management, as it has confidential information in it.
Thanks for building an excellent product!
Spencer Rathbun
L & D Mail Masters, Inc.
110 Security Pkwy
New Albany, IN 47150
812.981.7161 X.171
Fax: 812.981.7169