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.
(Note: The application deployment target is Linux, hence ‘Grapecity.Documents.Html.Windows .X64’ package is only needed for local debugging on Windows)
#web #.net #desktop #document apis