PyPDF2 fail sometimes with decryption of some PDF files, and I am trying do decrypt them with pikepdf but I am getting this error: Unable to find trailer dictionary while recovering damaged file Any ideas?
            Asked
            
        
        
            Active
            
        
            Viewed 2,533 times
        
    1 Answers
0
            
            
        You can fix broken PDF document with mutool from MuPDF:
mutool clean -d input.pdf output.pdf
However, the file might just be broken beyond recovery.
        Martin Thoma
        
- 124,992
 - 159
 - 614
 - 958