无法在 wkhtmltopdf 中生成超过 20 个页面(大约)
Not able to generate more than 20 pages in wkhtmltopdf (approx)
我正在尝试使用 wkhtmltopdf 生成 30-35 页的 pdf,但在 20 页(有时是 21/22)之后有空白页。为了证实这一点,我尝试使用循环生成相同的页面 35 次(请注意 html 文件中没有错误)。
我正在使用 NReco.PdfGenerator (C#)。
使用 JavaScript 探查器 (chrome ) 并尽可能优化您的代码,如果
wkhtmltopdf.exe 抛出超时异常。
在基于上述方法进行重构之后,我们还添加了
--no-stop-slow-scripts 参数以及 3 分钟超时
wkhtmpltopdf 可执行文件。现在我可以生成 80 多页 :)
我正在尝试使用 wkhtmltopdf 生成 30-35 页的 pdf,但在 20 页(有时是 21/22)之后有空白页。为了证实这一点,我尝试使用循环生成相同的页面 35 次(请注意 html 文件中没有错误)。
我正在使用 NReco.PdfGenerator (C#)。
使用 JavaScript 探查器 (chrome ) 并尽可能优化您的代码,如果 wkhtmltopdf.exe 抛出超时异常。 在基于上述方法进行重构之后,我们还添加了 --no-stop-slow-scripts 参数以及 3 分钟超时 wkhtmpltopdf 可执行文件。现在我可以生成 80 多页 :)