HTML to PDF conversion is possible in Azure web application using our HTML converter. Please refer below steps to publish and convert HTML to PDF in Azure.
- QtBinaries folder
All the above-mentioned assemblies can be get by installing the WebKit installer available in the below link.
WebKit HTML Converter: https://www.syncfusion.com/downloads/latest-version
- Create a new ASP.NET MVC project.
- Install the Syncfusion assemblies and QtBinaries from NuGet package. Please refer below steps to install the Syncfusion.HtmlToPdfConverter package.
2.1 Right click on the reference and select Manage NuGet Packages… option.
2.2 Click on the settings icon on the NuGet Package Manager.
2.3 Add the package name and source URL to the below window. You can get the source URL for Syncfusion NuGet packages from below link,
2.4 Select the added source name and install the Syncfusion.HtmlToPdfConverter package.
- After installing the package, copy the QtBinaries folder from packages folder to project folder. Then include the QtBinaries folder in project, and set copy always for all QtBinaries assemblies.
- Add an Export To PDF button in index.cshtml.
- Include below namespace and code snippet in controller for converting HTML to PDF. Please refer below UG link,
- Now check the conversion in local machine.
Publish as Azure Web application:
- Right click on the project and select publish.
- Create new profile in publish window.
- Create App service using Azure subscription and select a hosting plan.
- HTML to PDF conversion will works from basic hosting plan (B1). So, select the hosting plan based on the need. HTML to PDF conversion will not work if the hosting plan is Free/Shared.
- After creating a profile click the publish button.
- Now the published website will open in the browser, then you can export the webpage to PDF.
- Output PDF document screen shot.
Sample can be downloaded from below link,