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.
是否有任何 Perl 脚本可以读取多个 PDF 文件并获取其中的页数?
通过使用 PDFlib 或 pdftet。
将 Perl 与 PDF::API2 一起使用怎么样?
#!/usr/bin/perl use PDF::API2; foreach $doc (@ARGV) { $pdf = PDF::API2->open($doc); $pages = $pdf->pages; $totalpages += $pages; print "$doc contains $pages pages\n"; } print "Total pages of pdf pages = $totalpages\n";