Converting HTML to PDF on Linux Azure App Service

Converting HTML to PDF on Linux Azure App Service

Outlined below is the process of converting a web page to a PDF file on a Linux Azure app service using the GcHtmlRenderer class. Step 1: Create a Web Application that Converts HTML to PDF. Create a new ASP. Step 2: Publish the Application to Linux Azure App Service. Install Chrome Dependencies.

Organizations perform HTML to PDF conversions for many reasons, such as archiving web content, simplifying web content review processes, or creating a printer-friendly web page version.

GrapeCity Documents for PDF API features the GcHtml package. GcHtml lets users convert an HTML string or an HTML web page to PDF.

The RenderToPdf method of the GcHtmlRenderer class performs the conversion. Different overloads of this method let users save the HTML to a PDF file or a stream. Alter the generated PDF file settings (page height, width, header, footer, etc.) with the PdfSettings class.

Outlined below is the process of converting a web page to a PDF file on a Linux Azure app service using the GcHtmlRenderer class.

Step 1: Create a Web Application that Converts HTML to PDF

  • Create a new ASP. NET Core Web application using the Model-View-Controller template in VS2019 on a Windows machine.

Converting HTML to PDF on Linux Azure App Service

  • Install the following packages in the project using NuGet Package Manager
  • Grapecity.Documents.Html
  • Grapecity.Documents.Html.Windows.X64
  • Grapecity.Documents.Html.Linux.X64

(Note: The application deployment target is Linux, hence 'Grapecity.Documents.Html.Windows .X64' package is only needed for local debugging on Windows)

  • Use GcHtmlRenderer and RenderToPdf method
  • Add a method to HomeController.cs which implements the “Render HTML to PDF” feature

web .net desktop document apis

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Consume Web API Post method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, I will discussed about how to consume Web API Get method and display records in the ASP.NET View. Here, ...

Consume Web API Get method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, I will discussed about How to Consume Web API Get method in ASP NET MVC. Blog : http://aspdotnetexplorer...

Consume Web API Put method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, we learned how to consume Web API Get and Post methods in the ASP.NET View. Here, we will see how to con...

Consume Web API Delete Method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, we learned how to consume Web API Get,Post and PUT methods in the ASP.NET View. Here, we will see how to...

Create Asp Net Web API for CRUD operation | CRUD Using Asp Net Api

LIKE | COMMENT | SHARE | SUBSCRIBE Web API CRUD Operations Using Asp Net MVC and Entity Framework Contents * Web API Project For CRUD Operations - Insert Upd...