Itext7: render PDF page to image

余生颓废 提交于 2019-12-11 06:39:44

问题


Can I render a PDF Page to a real image object (e.g. BufferedImage) using IText 7?


回答1:


If you really want to do this, consider using GhostScript.

Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format (PDF) page description languages. Its main purposes are the rasterization or rendering of such page description language files, for the display or printing of document pages, and the conversion between PostScript and PDF files. -- wikipedia

As Bruno said, iText generally does not go into the rendering domain.

However, keep in mind what kind of a situation you're creating for the people who wish to use this "document" after you're done with it. Text-extraction will no longer work (unless you OCR it), you lose any search functionality or meta-information, etc.



来源:https://stackoverflow.com/questions/46109077/itext7-render-pdf-page-to-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!