-
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'm sorry if this is really a noobie question, but how do I add this as a Function App in Azure? I found the function app and I created one as an app plan. I get an error that "the host.json file is missing the required 'version' property " . On the Function App Settings page I see the host.json and the only thing in it is { "version": "1.0" }
I n View Files on the function I have the function.json, project.json, and run.cmx files. What am I missing? The tutorials on Azure are terrible.