HTML 转 PDF 的工作原理(特别是 abcPDF)
我的新项目是使用 URL 将 HTML 即时转换为 PDF。 我在初期进行了很多搜索,并提出了解决方案,以便 HTML 转换为 IMAGE,IMAGE 转换为 PDF。 但它不是理想的解决方案,因为用户无法从 PDF 文件复制粘贴。
最近我遇到了 abcPDF 组件,你可以在这里查看他们的演示 http://www.abcpdfeditor.com/
现在我想知道他们如何能够生成具有所有这些功能的如此漂亮的 PDF。他们的逻辑会是什么?我不认为他们会解析每个 HTML 标签来创建文档。你们有什么想法吗?
任何帮助将不胜感激
My new project is converting the HTML into PDF on the fly using the URL.
I have searched a lot in my initial period and come up with the solution so that HTML convert to IMAGE and IMAGE goes to PDF.
But its not ideal solution as user can not copy paste from the PDF file.
Recently i came across abcPDF component, you can check their demo here http://www.abcpdfeditor.com/
Now i am wondering how they are able to produce such a nice PDF with all such feature. What will be their logic? I dont think they are going to parse each and every HTML tag to create document. Do you guys have any idea?
Any help will be much appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简而言之,这就是大多数 HTML 到 PDF 转换的工作原理。
HTML ----转换为 ----> EMF(图元文件/矢量图像)----> PDF
您可以利用这个开源 Web 浏览器控件来实现此目的。
http://groups.google.com/group/csexwb
In short, this is how most HTML to PDF conversion works.
HTML ----Converted To ----> EMF (Metafile/Vector Image) ----> PDF
You can make use of this open-source web browser control for this purpose.
http://groups.google.com/group/csexwb