简体   繁体   English

可编辑的 pdf 文件无法使用 pypdf2 读取

[英]Editable pdf file is not able to read using pypdf2

I have pdf file which is editable mean when i open the pdf i can select & change the drop down option in pdf form.我有Z437175BA4191210EE004EE1D937494D09Z文件,这是我打开Z437175BA4191210EE1D93749494D094D09999999999382F042F042F042F04118182181818182182182182182182182182941D9374D094D094D094D094D094D094D094D094D9374D094D094D094D0D转盘this pdf i am trying to read through pypdf2 module but nothing is coming as output.这个 pdf 我正在尝试通读 pypdf2 模块,但没有任何内容像 output 一样出现。 Can you guys please let me know how i can read and put the output from editable pdf to json format.你们能告诉我如何阅读 output 从可编辑的 pdf 格式到 json 格式。 Thanks in advance.As you can see in the screenshot image after opening pdf file we change change the data.提前致谢。正如您在打开 pdf 文件后的屏幕截图中看到的那样,我们更改了数据。 Code which i tried but nothing printsout我试过但没有打印出来的代码

import PyPDF2 as pypdf
pdfobject=open("Form11LLP_2019.pdf","rb")
pdf=pypdf.PdfFileReader(pdfobject)
print(pdf.getFormTextFields())

i will really appreciate this help.我将非常感谢您的帮助。 Thank you.谢谢你。 在此处输入图像描述

You can try to use library pdfrw .您可以尝试使用库pdfrw But this problem can exist in different viewers or pdf editors.但是这个问题可能存在于不同的查看器或 pdf 编辑器中。 You can try compare byte code of input file and out if the same.您可以尝试比较输入文件的字节码和输出是否相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM