制作一个 html 到 pdf 转换器
我对开发软件还很陌生,并且对外面的广阔世界很感兴趣!我有 C/C++ 和 Java 的工作知识..我正在考虑制作一个将网页转换为 pdf 文档的应用程序..我知道有很多可用的解决方案 - 在线和离线..但我想开发我自己的..我用谷歌搜索但找不到任何可以帮助我开始的东西.. 我想知道我们如何进行转换过程?如何开始?制作这样的转换器需要哪些语言和技术?
谢谢
I am pretty new to developing softwares and am intrigued by the huge world out there!! I have working knowledge of C/C++ and Java.. I was thinking of making an application that would convert a webpage to a pdf document.. I know there are many solutions available -- both online and offline..But I want to develop my own.. I googled but couldn't find anything that would help me get started..
I want to know how do we go about a conversion process?? How to get started?? What languages and technologies are pre-requisites for making a converter like this??
Thank You
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,至少您需要深入了解以下规范:
此外还有很多次要的东西,例如字体、描述/加密算法和许多其他次要但仍然必要的东西。
我想你可以想象,要让这一切顺利进行,还有很长的路要走。事实上,此类软件的复杂性正是许多公司在该领域赚钱的原因。
不管怎样,我建议你从简单的事情开始,逐步发展你的软件。首先将 HTML 转换为图像,因为它更简单一些。获取并解析 HTML、CSS、JavaScript。干净的 HTML。构建 HTML 文档的 DOM。应用样式。遍历 DOM 并将元素绘制到图像上。
祝你好运!
So at least you need to get to the bottom to following specifications:
Moreover here are a lot of minor stuff such as Fonts, Decription/Encription algorithms and many many other minor but still necessary things.
I think you can imagine that this is quite a long way to get all this working. In fact, the complexity of such software is the reason why so many companies make money in this field.
Anyway, I'd suggest you to start from the simple things and grow your software gradually. Start with converting HTML to Image, because it is a bit simpler. Take and parse HTML, its CSS, its JavaScript. Clean HTML. Build DOM of the HTML document. Apply styles. Go thru the DOM and draw elements to the image.
Good luck!