安装 pdftotext 到 RedHat / RHEL / Fedora / Centos / ubuntu 在不同的linux分发版本中使用poppler-utils包安装pdftotext(CentOS): #
在不同的linux分发版本中使用poppler-utils包安装pdftotext(CentOS):
# yum install poppler-utils
或者在Debian / Ubuntu中使用如下指令:
$ sudo apt-get install poppler-utils
pdftotext {PDF-file} {text-file}
将PHP-manual.pdf 转化为 php-manual.txt:
$ pdftotext php-manual.pdf php-manual.txt
只转化前 5 页和后 10 页:
$ pdftotext -f 5 -l 10 php-manual.pdf php-manual.txt
转化加密过的pdf文件( owner passWord ):
$ pdftotext -opw 'password' php-manual.pdf php-manual.txt
转化加密过的pdf文件( user password ):
$ pdftotext -upw 'password' php-manual.pdf php-manual.txt
Sets the end-of-line convention to use for text output. You can set it to unix, dos or Mac. For UNIX / Linux oses, enter:
$ pdftotext -eol unix php-manual.pdf php-manual.txt
此外,还可以转化pdf为多种其他格式文件:
如可以将pdf文件转化为html,但我测试了一下,效果貌似不佳,很多页面有错乱出现,但是pdftotext转化的效果还是不错的(图片都去掉了),而且速度很快。
--结束END--
本文标题: pdftotext —— Linux/Unix中将PDF文件转化为Text文本格式的利器
本文链接: https://www.lsjlt.com/news/11270.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0