Java的PDF阅读器为pdf.js

发布于 2025-01-28 20:22:40 字数 569 浏览 3 评论 0原文

我们有一个项目,我们使用pdf.js将PDF渲染到网页中,并为PDF页面创建HTML容器元素。 pdf的内容在视图中以HTML span的形式拆分。

附件是显示PDF文本在视图中呈现的图像。它还显示,每个span都有data-key与PDF中的一行不对应。

现在,我需要一个用于Java的PDF阅读器,该读取器将内容读取并用span使用data-key或仅span span按顺序。

有很多Java库可读取PDF内容,这些内容逐行获取内容,但不能解决我的问题。我需要一个Java库,该库可能会破坏等于span的内容。

We have a project where we use pdf.js to render a PDF into webpage and it creates HTML container elements for the PDF pages. The content of the PDF is split as HTML span in the view.

Attached is the image which shows how pdf text is rendered in the view. It also shows, each span has a data-key does not corresponds to a line in PDF.

enter image description here

Now, I need a pdf reader for java which reads and breaks the content as span with data-key or just the span in the order.

There are lot of java libraries available to read PDF content which gets the content line by line but that does not solve my issue. I need a java library which could break the content equivalent to span in the view.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文