NReco / wkhtmltopdf尝试打印大于页数的页码失败

时间:2018-09-30 06:23:48

标签: wkhtmltopdf nreco

不确定是NReco问题还是wkhtmltopdf问题,但我有一个程序可以从动态创建的html页面生成pdf报告。对于其中的某些页面,我一直收到“((退出代码:-1073741819)”)错误。奇怪的是,当我检查日志消息时,它尝试打印总页数以外的页面时似乎失败了。例如,在下面的日志中,它未能在表示正在打印第12页(共11页)的行上失败。我们将不胜感激!

Loading pages (1/6)
[>                                                           ] 0%
[======>                                                     ] 10%
[==============================>                             ] 50%
[============================================================] 100%
QWin32PrintEngine::initialize: OpenPrinter failed (The printer name is invalid.)
QWin32PrintEngine::initialize: OpenPrinter failed (The printer name is invalid.)
Counting pages (2/6)                                               
[============================================================] Object 1 of 1
Resolving links (4/6)                                                       
[============================================================] Object 1 of 1
Loading headers and footers (5/6)                                           
[>                                                           ] 0%
[>                                                           ] 0%
[>                                                           ] 1%
[>                                                           ] 1%
[=>                                                          ] 2%
[=>                                                          ] 2%
[=>                                                          ] 3%
[=>                                                          ] 3%
[==>                                                         ] 4%
[==>                                                         ] 4%
[===>                                                        ] 5%
[===>                                                        ] 5%
[===>                                                        ] 5%
[===>                                                        ] 6%
[===>                                                        ] 6%
[====>                                                       ] 7%
[====>                                                       ] 7%
[====>                                                       ] 8%
[====>                                                       ] 8%
[=====>                                                      ] 9%
[=====>                                                      ] 9%
[======>                                                     ] 10%
[======>                                                     ] 11%
[========>                                                   ] 14%
[=========>                                                  ] 15%
[==========>                                                 ] 18%
[============>                                               ] 20%
[=============>                                              ] 22%
[==============>                                             ] 24%
[===============>                                            ] 26%
[================>                                           ] 28%
[==================>                                         ] 30%
[===================>                                        ] 32%
[====================>                                       ] 34%
[=====================>                                      ] 36%
[======================>                                     ] 38%
[========================>                                   ] 40%
[=========================>                                  ] 42%
[==========================>                                 ] 44%
[===========================>                                ] 46%
[============================>                               ] 48%
[==============================>                             ] 50%
[===============================>                            ] 52%
[=================================>                          ] 55%
[=================================>                          ] 56%
[===================================>                        ] 59%
[====================================>                       ] 60%
[=====================================>                      ] 63%
[=======================================>                    ] 65%
[========================================>                   ] 67%
[=========================================>                  ] 69%
[==========================================>                 ] 71%
[===========================================>                ] 73%
[=============================================>              ] 75%
[==============================================>             ] 77%
[===============================================>            ] 79%
[================================================>           ] 81%
[=================================================>          ] 83%
[===================================================>        ] 85%
[====================================================>       ] 87%
[=====================================================>      ] 89%
[======================================================>     ] 91%
[=======================================================>    ] 93%
[=========================================================>  ] 95%
[==========================================================> ] 97%
[============================================================] 100%
Printing pages (6/6)                                               
[>                                                           ] Preparing
[=====>                                                      ] Page 1 of 11
[==========>                                                 ] Page 2 of 11
[================>                                           ] Page 3 of 11
[=====================>                                      ] Page 4 of 11
[===========================>                                ] Page 5 of 11
[================================>                           ] Page 6 of 11
[=====================================>                      ] Page 7 of 11
[===========================================>                ] Page 8 of 11
[================================================>           ] Page 9 of 11
[======================================================>     ] Page 10 of 11
[============================================================] Page 11 of 11
[============================================================] Page 12 of 11
Exception thrown: 'NReco.PdfGenerator.WkHtmlToPdfException' in NReco.PdfGenerator.dll
Exception thrown: 'System.Exception' in NReco.PdfGenerator.dll

0 个答案:

没有答案