-
This sample is based around
Haukcode.DinkToPdf
which is a fork of https://github.com/rdvojmoc/DinkToPdf https://www.nuget.org/packages/Haukcode.DinkToPdf/ -
Note that you need to include the correct
libwkhtmltox
for your platform. See links in the repos above. -
Tested on Azure Functions v3 running on a Standard Windows App Service Plan. Last time I checked concumption plans were not supported because the don't support GDI+.
To test this function in the azure portal you simply need to post some HTML in the request body. For example:
<!DOCTYPE html>
<html>
<head><meta charset='UTF-8'>
<title>Title</title>
</head>
<body>Body text...</body>
</html>
28/04/2020: Updated for azure functions v3 using a different nuget package
I received the same rendering issue, however was able to solve it. To be able to render the text use a "App Plan" (Basic or Higher) rather than "Consumption Plan" as this allows GDI+, which is required by the PDF converter.