Loading repository data…
Loading repository data…
adamhockemeyer / repository
A sample .Net Core web app that is containerized with Docker and can be deployed to Azure App Service to generate PDF documents from HTML.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repo demonstrates how to use DinkToPdf which is a Nuget package that acts as a wrapper around the very popular wkhtmltopdf library to provide HTML to PDF generation capabilities.
Many PDF generation solutions leverage User32/GDI32 and these are largely blocked in the Azure Web App sandbox. (https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#pdf-generation-from-html).
This example runs wkhtmltopdf as a Docker container which allows us to add the (Linux) system dependencies that are required to generate PDFs.
You could potentually deploy this solution and use it as a sort of "microservice" for generating PDF's based on HTML content.
Disclaimer: This is a simple demo and may need to be modified by you for your specific use case (i.e. Custom Fonts, Authentication, etc).
Technologies Utilized:
Example passing a url and having a PDF generated from it:

You can try out this example quickly by using a Docker image that is built based on this repo and is published to Docker Hub.
