搜索
开启辅助访问切换到窄版
查看: 44|回复: 0

[Linux] centos 安装pdftotext (pdftotext: Linux / UNIX Convert a PDF File To Text ...

[复制链接]

35

主题

282

学分

0

好友

管理员

Rank: 9Rank: 9Rank: 9

积分
282
发表于 2018-10-6 14:37:23 | 显示全部楼层 |阅读模式
pdftotext: Linux / UNIX Convert a PDF File To Text Format
centos下安装pdftotext,用于提取文本内容


pdftotext is installed using poppler-utils package under various Linux distributions:
  1. yum install poppler-utils
复制代码


OR use the following under Debian / Ubuntu Linux
  1. sudo apt-get install poppler-utils
复制代码


pdftotext syntax

  1. pdftotext {PDF-file} {text-file}
复制代码



HOW DO I CONVERT A PDF TO TEXT?
Convert a pdf file called hp-manual.pdf to hp-manual.txt, enter:
  1. pdftotext hp-manual.pdf hp-manual.txt
复制代码


Specifies the first page 5 and last page 10 (select 5 to 10 pages) to convert, enter:
  1. pdftotext -f 5 -l 10 hp-manual.pdf hp-manual.txt
复制代码


Convert a pdf file protected and encrypted by owner password:
  1. pdftotext -opw 'password' hp-manual.pdf hp-manual.txt
复制代码

Convert a pdf file protected and encrypted by user password:
  1. pdftotext -upw 'password' hp-manual.pdf hp-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:
  1. pdftotext -eol unix hp-manual.pdf hp-manual.txt
复制代码

参考

https://www.cyberciti.biz/faq/co ... ext-format-command/


阿Q问答,程序员专属知识问答平台!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

阿Q问答

程序员专属知识问答平台!

关于我们

Archiver|手机版|小黑屋|阿Q问答  

Powered by Discuz! X3.3 © 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表