Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何检测损坏的 pdf(使用 python)?
我有很多pdf。其中一些 pdf 文件已损坏,应删除。如何检测和删除?
我用了 :
from pyPdf import PdfFileReader try : mypdf = PdfFileReader(file( 'sample.pdf', 'rb')) except: print ' is invalid pdf'
但是如何自动从文件中读取 pdf 并删除损坏的 pdf 呢?
Adobe Reader 实际上包含许多自动修复功能,因此它会打开大量损坏的 PDF 文件。
我正在为显示所选日期之间的天数而苦苦挣扎:<input type="date" id="date" />和今天。
<input type="date" id="date" />
基于此,我想展示一个特定的<div>. 例如,如果从输入值的日期到我们显示的日期之间有 20 天<div id="20day"></div>
<div>
<div id="20day"></div>