简体   繁体   English

DOMPDF缓慢呈现动态表的解决方案

[英]Solutions for DOMPDF Rendering Dynamic Table Slowly

I am using DOMPDF to render HTML tables. 我正在使用DOMPDF呈现HTML表。 However, because large tables we'll say greater that 150 rows render extremely slowly. 但是,由于大型表,我们将说大于150行的渲染速度非常慢。 I know this is a known issue for DOMPDF. 我知道这是DOMPDF的已知问题。

Does anyone know of any good work around? 有人知道周围有什么好办法吗? Maybe using a different html to pdf converter? 也许使用其他html到pdf转换器? How to write html code that is formatted like a table without using a table? 如何在不使用表的情况下编写格式像表的html代码?

Any idea? 任何想法?

Using big and unnecessary css-files caused slowness for me. 使用大而不必要的css文件对我来说很慢。 I was using 8000 line css-file. 我正在使用8000行CSS文件。 Example 1-page pdf rendered 5.5 seconds. 示例1页pdf呈现了5.5秒。

I removed my css-links from html-template and made a custom css-file containing only things I need ie. 我从html模板中删除了CSS链接,并制作了一个仅包含我需要的东西的自定义CSS文件。 bootstrap's grid, table and panel css. 引导程序的网格,表格和面板CSS。 Now rendering takes less than 1 second so over 80% render time improvement. 现在渲染时间不到1秒,因此可以将渲染时间提高80%以上。

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

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