简体   繁体   English

如何在symfony2中以精确的外观将PDF转换为HTML

[英]How to convert PDF to HTML with exact look and feel in symfony2

I am a beginner in Symfony2. 我是Symfony2的初学者。
I want to convert a PDF file in to HTML keeping the same look and feel 我想将PDF文件转换为HTML,并保持相同的外观

Well, I tried some libraries, exclusively for Linux, but here is my intermediate conclusion. 好吧,我尝试了一些专门针对Linux的库,但这是我的中间结论。

PDFtoHTML is too old and doesn't take in consideration all new PDF Specifications, for example PDF 1.7 (mainly because it use xpdf 2.02, while xpdf is already in his 3 version) PDFtoHTML太旧,没有考虑所有新的PDF规范,例如PDF 1.7(主要是因为它使用xpdf 2.02,而xpdf已经是他的3版本)

Instead of PDFTOHTML I found Poppler that continues the PDFtoHTML development plus some new utils very useful. 我发现Poppler代替了PDFTOHTML,它继续PDFtoHTML的开发以及一些新的实用程序非常有用。 Actually, in Open Source Poppler was the one who rendered better my complex PDF. 实际上,在开放源代码中,Poppler可以更好地渲染我的复杂PDF。 Here one almost equal I've to use. 在这里,我必须使用几乎相等的一个。

Finally, here is it what I'm gonna use. 最后, 这里是我知道该怎么使用。 ImageMagick + Poppler. ImageMagick + Poppler。 I will convert my PDF to images and use the XML output from Poppler of PDFtoHTML to add a new layer on my image. 我将PDF转换为图像,并使用PDFtoHTML的Poppler的XML输出在图像上添加一个新层。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM