【问题标题】:Count Number of Pages in PDF Files of a folder计算文件夹的 PDF 文件的页数
【发布时间】:2015-03-23 10:08:36
【问题描述】:

如何获取(子)文件夹中 pdf 的总页数?

我喜欢这样的回报:

c:\pdfs\path1 83
c:\pdfs\path2 12
c:\pdfs\path2\subfolder 3
etc.

使用下面的代码,我可以获得每个 pdf 文件的总页数。但这不是我需要的。我想得到每个文件夹的总数。

REM PDF-Pages.cmd
@echo off
del output.txt
for /r %1 %%f in (*.pdf) do pdfinfo.exe -meta "%%f" >out.txt & echo "%%f",, | tr.exe -d "\r\n" >>output.txt & find "Pages:" out.txt | tr.exe -d "\r\n\055\056\072[:alpha:][:space:]" >>output.txt & echo , | tr.exe -d "\r\n" >>output.txt & find "File size:" out.txt | tr.exe -d "\055\056\072[:space:][:alpha:]" >>output.txt & echo. >>output.txt
del out.txt

【问题讨论】:

    标签: pdf count directory


    【解决方案1】:

    也许你可以使用 Pdf Page Count - http://sourceforge.net/projects/pdfpagecount/;但我对这个工具没有个人经验。 AFAIR,类似“多 PDF 页数”之类的东西也存在,也许在 Sourceforge 上也存在。

    【讨论】:

    • 能否请您详细说明您的答案,添加更多关于您提供的解决方案的描述?
    猜你喜欢
    • 2014-06-29
    • 2021-12-28
    • 1970-01-01
    • 1970-01-01
    • 2016-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多