Generating PDF for HTML Page

Generating PDF for HTML Page

Windows Server Containers in App Service

I recently came across this issue while trying to achieve HTML to PDF using Azure App Service. After some research, it is now a known issue for Azure App Service as it contains Graphics Device Interface (GDI) API calls.

Let’s take a look at the EvoPDF product for an example.

EvoPDF is an HTML to PDF converter product, and it comes with many solutions. One of them is the Azure solution which is what I will be discussing today.

Since it supports Azure App Service, I have proceeded to deploy it on the following services:

  1. Cloud service (Classic)
  2. Cloud service (Extended support)
  3. Azure App Service

The deployment and the testing for the above three services were relatively straightforward and quick. For the Cloud services, they were working as intended. For the Azure App Service, due to the known issue, it does not turn out well.

Due to some feedback, Azure came out with a new solution called Windows Server Containers in App Service. This solution provides deployment of the container image to bypass some restrictions that may have resulted in some products malfunctioning and to smoothen the digitalisation journey.

For this to work, I will have to deploy the EvoPDF server instead. If the solution is to avoid using a Virtual Machine, I would say that this solution will meet the requirement.

I have encountered a minor hiccup during the testing for Azure App Service:

  1. API calls to the Azure App Service are not responding
    1. As this is a self-exploration project, I have tried to minimize the cost by deploying the Free-tier App Service Plan, resulting in a request timeout issue.
    2. *Resolved by upgrading it to a Basic-tier instead.

With that, I have concluded this exploration and hope it helps those puzzled over why their PDF generator does not work on Azure App Service.