PyPDF 2 Decrypt Not Working

前端 未结 7 1272
悲哀的现实
悲哀的现实 2020-12-15 20:38

Currently I am using the PyPDF 2 as a dependency.

I have encountered some encrypted files and handled them as you normally would (in the following code):

<         


        
7条回答
  •  忘掉有多难
    2020-12-15 21:03

    To Answer My Own Question: If you have ANY spaces in your file name, then PyPDF 2 decrypt function will ultimately fail despite returning a success code. Try to stick to underscores when naming your PDFs before you run them through PyPDF2.

    For example,

    Rather than "FDJKL492019 21490 ,LFS.pdf" do something like "FDJKL492019_21490_,LFS.pdf".

提交回复
热议问题