linux ubuntu下怎样将pdf格式文件转换为doc格式文件,pdftotext —— Linux/Unix中将PDF文件转化为Text文本格式的利器...

安装 pdftotext 到 RedHat / RHEL / Fedora / CentOS / Ubuntu

在不同的Linux分发版本中使用poppler-utils包安装pdftotext(CentOS):

# yum install poppler-utils

或者在Debian / Ubuntu中使用如下指令:

$ sudo apt-get install poppler-utils

pdftotext 使用语法

pdftotext {PDF-file} {text-file}

如何将pdf转化为text?

将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

更多命令:

man page pdftotext

此外,还可以转化pdf为多种其他格式文件:

pdfto.png

如可以将pdf文件转化为html,但我测试了一下,效果貌似不佳,很多页面有错乱出现,但是pdftotext转化的效果还是不错的(图片都去掉了),而且速度很快。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值