Heim  >  Artikel  >  Backend-Entwicklung  >  纠结了一天的转pdf有关问题,还是不行

纠结了一天的转pdf有关问题,还是不行

WBOY
WBOYOriginal
2016-06-13 10:11:33998Durchsuche

纠结了一天的转pdf问题,还是不行
用谷歌转,可以,,但是背景样式丢失

用html2pdf转,可以,但是排列不具样式,背景倒有了,


纠结。。。。

------解决方案--------------------
按照公司项目的html转pdf的过往经验,历史脚步是这样地

html2pdf(table嵌套不支持,各种不支持) -> dompdf(使用方便,可引入css..) -> wkhtmltopdf命令行转换(webkit引擎,基本可以说chrome浏览器看到的效果,pdf就相应转成什么样)

但是距离客户的目标还有一些距离,需要微调。
------解决方案--------------------
使用tcpdf吧,支持html
------解决方案--------------------

探讨

引用:

按照公司项目的html转pdf的过往经验,历史脚步是这样地

html2pdf(table嵌套不支持,各种不支持) -> dompdf(使用方便,可引入css..) -> wkhtmltopdf命令行转换(webkit引擎,基本可以说chrome浏览器看到的效果,pdf就相应转成什么样)

但是距离客户的目标还有一些距离,需……

------解决方案--------------------
最近可能要用到相关解决方案,学习了。
问下dompdf和wkhtmltopdf的差距在哪呢。
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:微博为什么不能转发Nächster Artikel:php数字循环,$a如何写