旧的信息: http://blog.youkuaiyun.com/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.youkuaiyun.com/belldeep/article/details/80147034
本文介绍如何使用Apache PDFBox工具包从PDF文档中提取文本和图像。通过命令行工具,可以灵活地指定要提取的页面范围,并且可以选择是否直接提取JPEG格式的图像,不受颜色空间限制。
1万+

被折叠的 条评论
为什么被折叠?



