WkHtmlToPdf on V4 .net 6 stopped working - Permission denied

Kiel White 0 Reputation points
2023-02-08T12:53:43.7+00:00

We have a queue trigger that fires when a message enters the queue, on .net 3.1 v3 we had no issues and PDF assets would get created from HTML and stored in blob storage for future use.

But since we have updated to .net 6 v4 Linux based our PDF from HTML conversion is failing. The error we get is:

Exception while executing function: QueueBaseTrigger An error occurred trying to start process '/tmp/OpenHtmlToPdf/1.12.0.0_64/OpenHtmlToPdf.WkHtmlToPdf.exe' with working directory '/'. Permission denied

Any thoughts on what we need to do to fix this?

Anyone having the same issue?

Example code where html is the content to be converted:User's image

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,257 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chris Nateghi 0 Reputation points
    2024-02-06T10:03:22.5566667+00:00

    I had the exact same error when building my project in Azure using 'ubuntu-latest'. Changing the build server to 'windows-latest' fixed the issue for me.

    0 comments No comments