简体   繁体   English

nreco pdf生成错误点网

[英]nreco pdf genreation error dot net

I am trying to generate pdf using nreco library and i am getting this exception while generating. 我正在尝试使用nreco库生成pdf,并且在生成时遇到了此异常。

(exit code: -1073741819) Description: An unhandled exception occurred during the execution of the current web request. (退出代码:-1073741819)说明:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code. 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。 Exception Details: NReco.PdfGenerator.WkHtmlToPdfException: (exit code: -1073741819) Source Error: An unhandled exception was generated during the execution of the current web request. 异常详细信息:NReco.PdfGenerator.WkHtmlToPdfException:(退出代码:-1073741819)源错误:在执行当前Web请求期间生成了未处理的异常。 Information regarding the origin and location of the exception can be identified using the exception stack trace below. 可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息。 Stack Trace: [WkHtmlToPdfException: (exit code: -1073741819)] NReco.PdfGenerator.HtmlToPdfConverter.CheckExitCode(Int32 exitCode, String lastErrLine, Boolean outputNotEmpty) +134 NReco.PdfGenerator.HtmlToPdfConverter.InvokeWkHtmlToPdf(PdfSettings pdfSettings, String inputContent, Stream outputStream) +644 NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdfInternal(WkHtmlInput[] htmlFiles, String inputContent, String coverHtml, String outputPdfFilePath, Stream outputStream) +1282 堆栈跟踪:[WkHtmlToPdfException:(退出代码:-1073741819)] NReco.PdfGenerator.HtmlToPdfConverter.CheckExitCode(Int32 exitCode,字符串lastErrLine,布尔值outputNotEmpty)+134 NReco.PdfGenerator.HtmlToPdfWSetPtFdFConverter(Int32) +644 NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdfInternal(WkHtmlInput [] htmlFiles,String inputContent,String coverHtml,String outputPdfFilePath,Stream outputStream)+1282

require assistance. 需要帮助。

This error (like "exit code: -1073741819") means that wkhtmltopdf process was crushed. 此错误(如“退出代码:-1073741819”)表示wkhtmltopdf进程已被压缩。 Possible reasons: 可能的原因:

  • wkhtmltopdf executable is incompatible with the OS. wkhtmltopdf可执行文件与操作系统不兼容。 Say, MSVC build - which is shipped in NReco.PdfGenerator nuget package - doesn't support legacy Windows versions like XP or 2003 Server (workaround is using MingGW build). 举例来说,MSVC版本-NReco.PdfGenerator nuget程序包中提供-不支持XP或2003 Server等旧版Windows版本(解决方法是使用MingGW版本)。 Or if windows executable is used with Linux or Mac OS environment (solution is using NReco.PdfGenerator.LT nuget + deploy/install correct wkhtmltopdf binaries for the target platform). 或者,如果Windows可执行文件与Linux或Mac OS环境一起使用(解决方案使用NReco.PdfGenerator.LT nuget +为目标平台部署/安装正确的wkhtmltopdf二进制文件)。
  • missed required Universal C runtime libs ( https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows ). 缺少必需的Universal C运行时库( https://support.microsoft.com/zh-cn/help/2999226/update-for-universal-c-runtime-in-windows )。 This is rare case, as usually these libs are already installed by Windows Update. 这种情况很少见,因为通常Windows Update已经安装了这些库。
  • if this error occurs only for concrete HTML this might be a problem with complex HTML layout or heavy JS script. 如果仅针对具体HTML发生此错误,则可能是复杂的HTML布局或笨拙的JS脚本存在问题。 For example, wkhtmltopdf 0.12.4 can crush when ChartsJS library is used by the page (workaround exists). 例如,当页面使用ChartsJS库时,wkhtmltopdf 0.12.4可能会崩溃(存在解决方法)。

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

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