We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to convert HTML to PDF in Azure website

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.

Assemblies Required

  • Syncfusion.Compression.Base.dll
  • Syncfusion.HtmlConverter.Base.dll
  • Syncfusion.Pdf.Base.dll
  • 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

  1. Create a new ASP.NET MVC project.

  1. 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,

http://nuget.syncfusion.com/

2.4 Select the added source name and install the Syncfusion.HtmlToPdfConverter package.

  1. 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.

  1. Add an Export To PDF button in index.cshtml.

  1. Include below namespace and code snippet in controller for converting HTML to PDF. Please refer below UG link,

UG: https://help.syncfusion.com/file-formats/pdf/converting-html-to-pdf

  1. Now check the conversion in local machine.

Publish as Azure Web application:

  1. Right click on the project and select publish.

  1. Create new profile in publish window.

  1. Create App service using Azure subscription and select a hosting plan.

  1. 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.

  1. After creating a profile click the publish button.

  1. Now the published website will open in the browser, then you can export the webpage to PDF.

  1. Output PDF document screen shot.

 

Sample can be downloaded from below link,

http://www.syncfusion.com/downloads/support/directtrac/general/ze/HTMLtoPDF_Azure-1854272112

Article ID: Published Date: Last Revised Date: Platform: Control:
7543 03/06/2017 05/17/2018 ASP.NET MVC PDF
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon