The sample source codes on this page shows how to convert html to pdf with pdf sdk in C#. What is ByteScout Premium Suite? It is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can help you to convert html to pdf with pdf sdk in your C# application.
Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for convert html to pdf with pdf sdk below and use it in your application. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Complete and detailed tutorials and documentation are available along with installed ByteScout Premium Suite if you’d like to learn more about the topic and the details of the API.
You can download free trial version of ByteScout Premium Suite from our website to see and try many others source code samples for C#.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using System; using System.Diagnostics; using System.Drawing.Printing; using Bytescout.PDF.Converters; namespace ConvertHtmlToPdf { class Program { [STAThread] static void Main(string[] args) { using (HtmlToPdfConverter converter = new HtmlToPdfConverter()) { converter.PageSize = PaperKind.A4; converter.Orientation = PaperOrientation.Portrait; converter.Footer = "FOOTER TEXT"; // optional footer text converter.ConvertHtmlToPdf("sample.html", "result.pdf"); // You can also pass a link instead of the input file: //converter.ConvertHtmlToPdf("http://google.com", "result.pdf"); } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: