PDFBOX:将pdf转换为文本或html,包括pdf中的图像 [英] PDFBOX: Convert a pdf to text or html, including images from the pdf

查看:1150
本文介绍了PDFBOX:将pdf转换为文本或html,包括pdf中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发将pdf转换为html的移动应用程序.我找到了PDFBox,效果很好.我在一侧获得了PDF文本或html,而在另一侧获得了图像. 但我想走得更远,我需要生成的html包含pdf中的图像. 可以用PDFBox完成吗?如何? 如果您知道另一个免费的库函数可以执行此操作,请告诉我.

I am developing a mobile application that converts pdf to html. I found PDFBox, which works very well. I obtained the PDF text or html on one side and the other images. But I want to go a little further, I need the generated html contains the images in the pdf. Can it be done with PDFBox? How? If you know of another free library function to do this, tell me.

谢谢.

推荐答案

看看

Take a look at ExtractImages.java - this will guide you on how to extract images from PDF file.

接下来研究

Next investigate the PrintImageLocations.java example - you will need those locations to properly format HTML file.

这篇关于PDFBOX:将pdf转换为文本或html,包括pdf中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆