Hi. Have the same problem with "EOF marker not found" (it is first time
for some years of PDF Shuffle using)

Patch ofAndrew Lundin (galundin) exists in (for my case)
/usr/lib/python2.7/dist-packages/PyPDF2/pdf.py

Row 1692

        last1K = stream.tell() - 1024 + 1 # offset of last 1024 bytes of stream 
                                                                                
                                                   
        line = b_('')                                                           
                                                                                
                                                   
        while line[:5] != b_("%%EOF"):                                          
                                                                                
                                                   
            if stream.tell() < last1K:                                          
                                                                                
                                                   
                raise utils.PdfReadError("EOF marker not found")                
                                                                                
                                                   
            line = self.readNextEndLine(stream)                                 
                                                                                
                                                   
            if debug: print("  line:",line)   


But error still appears as it seems EOF not in 1024 bytes range.

So I increase it to 8024 bytes and things become fine.


        last1K = stream.tell() - 8024 + 1 # offset of last 1024 bytes of stream 
                                                                                
                                                   
        line = b_('')                                                           
                                                                                
                                                   
        while line[:5] != b_("%%EOF"):                                          
                                                                                
                                                   
            if stream.tell() < last1K:                                          
                                                                                
                                                   
                raise utils.PdfReadError("EOF marker not found")                
                                                                                
                                                   
            line = self.readNextEndLine(stream)                                 
                                                                                
                                                   
            if debug: print("  line:",line)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/656382

Title:
  "EOF marker not found" prevents saving document

To manage notifications about this bug go to:
https://bugs.launchpad.net/pdf/+bug/656382/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to