ABCpdf-Team / ABCpdf-Azure-AppService

Azure App Service demonstrating HTML to PDF conversion using ABCpdf.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ABCpdf-Azure-AppService

.NET 7.0 Azure App Service demonstrating HTML to PDF conversion using ABCpdf.

This is an example solution for performing HTML to PDF conversion in a .NET 7.0 Azure App Service using ABCpdf's ABCWebKit engine.

Follow these steps to get your App Service up and running:

  • Clone the project.
  • Ensure that the ABCpdf and ABCpdf.ABCWebKit NuGet packages are restored/installed.
  • Follow the instructions in Startup.cs to paste your license into the code.
  • Build and test locally.
  • Create a Windows .NET 7 Web App in your Azure portal.
  • NB the minimum App Service plan the ABCWebkit will work on is a Basic B1 instance. This is Microsft's policy and may incur charges even for development.
  • Change the App Service platform to "64 Bit" in the App Service Configuration/General Settings. It will not work on 32-bit.
  • Publish the solution to the Azure App Service ensuring your target runtime is "win-x64".
  • Enjoy! 😀

Novices may like our App Service Azure Deployment Guide that contains a step by step walkthrough from clone to cloud using Azure Portal and Visual Studio 2022.

Notes

The ABCWebKit engine has been built on wkhtmltopdf which in turn is based on a version of QTWebKit from 2012 which was last updated in 2015! Therefore we strongly recommend that you only use the ABCWebkit engine to process HTML that you trust.

This solution was last tested in July 2023. Do bear in mind how often the Azure framework changes when following these instructions, especially in terms of nomenclature!

ABCpdf has extensive documentation and examples online and in the full ABCpdf installer package.

The ABCpdf Team

About

Azure App Service demonstrating HTML to PDF conversion using ABCpdf.


Languages

Language:C# 100.0%