HiQPdf Multi-Platform HTML to PDF Library for .NET

The HiQPdf Multi-Platform Solution delivers the same power and quality to your .NET Core applications on many platforms, including the most restrictive ones. The solution consists in HiQPdf Server application which can run as an Azure Cloud Service or as a Windows Service and a client library for .NET Core that can be used in any .NET Core application on any platform which offers support for .NET Core or .NET Standard 2.0 and above.

The full list of features can be seen at https://www.hiqpdf.com/multiplatform-html-to-pdf-library-net-core.aspx

HiQPdf Multi-Platform HTML to PDF Library for .NET

You can deploy your .NET Core applications on Windows, Linux and MacOS operating systems or in more restrictive environments like Azure App Service for Windows and Linux. You can also use the library in Universal Windows Platform applications or in Xamarin applications for Android and iOS.

Download the Server Zip Package from downloads page. and extract it in a folder close to the root folder to avoid working with long file path names. Follow the detailed instructions from ‘Installation Guide.pdf’ document to install the server and get the server IP address that you will use in the client applications. For a quick testing you can use either the Windows Service installed on localhost or the Azure Cloud Service started in emulator and in this case the IP address is 127.0.0.1.

Download Client Library for .NET Core Zip Package, extract it into a folder, open in Visual Studio the demo application from Samples folder to build and run it. By default the application is using the localhost IP address. If everything works well on localhost you can start the production deployment. Instead of using our demo application you can create your own application for .NET Core in Visual Studio, add a reference to HiQPdf.Client NuGet Package or to assembly from product package and use the simple code below to convert an URL to PDF document you can save into a file or send it for download in browser.

using HiQPdfClient;

 // Create the converter object
 HtmlToPdf converter = new HtmlToPdf("{server_ip_address}");

 // Convert the HTML page from URL to memory
 byte[] pdfData = converter.ConvertUrlToMemory(UrlToConvert);

 // Save the PDF data to a file
 System.IO.File.WriteAllBytes("output.pdf", pdfData);

 // Alternatively convert and save to a file in one step
 converter.ConvertUrlToFile(UrlToConvert, "output.pdf");

 // Send the PDF data for download in ASP.NET Core applications
 FileResult fileResult = new FileContentResult(pdfData, "application/pdf");
 fileResult.FileDownloadName = "Output.pdf";
 return fileResult;

 // Send the PDF data for download in ASP.NET Web Forms applications
 HttpResponse httpResponse = HttpContext.Current.Response;
 httpResponse.AddHeader("Content-Type", "application/pdf");
 httpResponse.AddHeader("Content-Disposition",
            String.Format("attachment; filename=ConvertHtmlPart.pdf; size={0}",
            pdfData.Length.ToString()));
 httpResponse.BinaryWrite(pdfData);
 httpResponse.End();

The multi-platform solution offers the same features as the regular library for .NET and .NET Core that you can use now at the same power and quality on various operating systems and in the most restrictive environments.