Batch file to convert all pdf to text (with xpdf)

ぐ巨炮叔叔 提交于 2019-12-05 07:21:48

问题


I would like to run a batch conversion in a folder with full of pdf files. I have using xPDF and this is the command prompt for a single file:

c:\Test\pdftotext -layout firstpdftoconvert.pdf firstpdfconverted.txt

Could somebody help please to do it in one go (convert all the pdf files only) using a batch file? Thanks in advance!


回答1:


Combining your question with this answer iterating over files of a directory:

for /r %i in (*.pdf) do "c:\Test\pdftotext" -layout "%i"

This will work on all pdf files in the current directory.

Be sure to double the % signs if you run this from a batch file.



来源:https://stackoverflow.com/questions/21307682/batch-file-to-convert-all-pdf-to-text-with-xpdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!