在PyPDF2包的文档中,有一个指令是“使用:py:attr:is\_encrypted”,它引用了不推荐的函数isEncrypted。
我在以下函数中使用isEncrypted:
def encryption_test(input_file: str) -> bool:
with open(input_file, 'rb') as pdf_file:
pdf_reader = PdfFileReader(pdf_file, strict=False)
return pdf_reader.isEncrypted # <-- the call to the deprecated function.我的问题是,这意味着什么/我应该做什么?
指向PyPDF2文档中相关部分的链接:isEncrypted。
发布于 2022-06-09 06:44:36
正如@Kris和@ymmx所评论的,它仅仅意味着使用pdf_reader.is_encrypted而不是pdf_reader.isEncrypted。
https://stackoverflow.com/questions/72555573
复制相似问题