Serenity: PDF generator returned error code 255!

Created on 5 Sep 2016  路  2Comments  路  Source: serenity-is/Serenity

Hi all, I'm using the ReportHelper to create a PDF rendered to the browser, which is working perfectly in dev (Windows 10), but I'm getting the following error in prod environment (Windows Server 2012 R2)

Server Error in '/' Application.

PDF generator returned error code 255!

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: PDF generator returned error code 255!

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: PDF generator returned error code 255!]
Serenity.Reporting.HtmlToPdfConverter.Execute() in P:\Sandbox\Serene\Serenity\Serenity.Web\Reporting\Tools\HtmlToPdfConverter.cs:164
PWB.ReportController.Execute(String key, String opt, String ext, Boolean download, Boolean printing)

Things I've checked:

  • wkhtmltopdf.exe is in folder '~\App_Data\Reporting'
  • App Pool account has read, write and execute permission on this folder
  • App Pool account has read & write permission on '%USERPROFILE%\AppData\Local\Temp'

Any suggestions for what to check next?

Most helpful comment

Solved! wkhtmltopdf.exe also has dependency on "Visual C++ Redistributable Packages for Visual Studio 2013" which weren't installed on the server.
-thx

All 2 comments

Check 32 bit/64 bit. Check exe file is not blocked in properties, unblock it.

Solved! wkhtmltopdf.exe also has dependency on "Visual C++ Redistributable Packages for Visual Studio 2013" which weren't installed on the server.
-thx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

newyearsoft picture newyearsoft  路  3Comments

kilroyFR picture kilroyFR  路  3Comments

stepankurdylo picture stepankurdylo  路  3Comments

JohnRanger picture JohnRanger  路  3Comments

ahsansolution picture ahsansolution  路  3Comments