java : pdfbox 读取 PDF文件内中文

旧的信息:  http://blog.csdn.net/wlxtaking/article/details/5543268

新的信息:  http://pdfbox.apache.org/2.0/commandline.html#extracttext

ExtractText

This application will extract all text from the given PDF document.

usage: java -jar pdfbox-app-2.y.z.jar ExtractText [OPTIONS] <inputfile> [Text file]

例如:读取PDF 目录 从第4页起,到第13页
java -jar pdfbox-app-2.0.2.jar ExtractText -startPage 4 -endPage 13 Gradle.in.Action.pdf gradle.txt 

java -jar pdfbox-app-2.0.2.jar ExtractText Commons-BeanUtils研究心得.pdf  beanutils.txt


https://pdfbox.apache.org/2.0/commandline.html#extractimages

ExtractImages  读取图片
This application will extract all images from the given PDF document.

Usage: java -jar pdfbox-app-2.y.z.jar ExtractImages [OPTIONS] <inputfile>

Command-Line Parameter DefaultDescription
-password The password to the PDF document.
-prefix PDF nameImage prefix to use.
-directJPEG falseForces the direct extraction of JPEG images regardless of colorspace.

java -jar pdfbox-app-2.0.2.jar ExtractImages -prefix j JUnit实战第二版.pdf

pdfbox 读取 PDF文件内书签, 请看
https://blog.csdn.net/belldeep/article/details/80147034

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值