Is There An Open Source To Convert PDF To Image In C#?

Upload and start working with your PDF documents.
No downloads required

How To Convert PDF Online?

Upload & Edit Your PDF Document
Save, Download, Print, and Share
Sign & Make It Legally Binding

Easy-to-use PDF software

review-platform review-platform review-platform review-platform review-platform

Is there an open source to convert PDF to image in C#?

In C# you can utilize Office PDF third-party for creating PDF files in .Net. You can easily generate Pdf from Html by few lines of code. This library has very reliable and easy to use. T provide you lot of examples to merge, split documents and exports from view or db to Pdf . T provide lot of ready made examples for you so you cam easily utilize to convert html to pdf. Here is the simple example to generate PDF from HTML. using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Printing; using System.IO; using System.Text; using System.Threading.Tasks; using System.Threading; #if !WEB using System.Windows.Forms; #else using System.Web.UI; using System.Web.UI.WebControls; #endif using OfficeComponent.HtmlToPdf; namespace OfficeComponent.Samples { partial class HtmlToPdfBasicExample . ExampleBase #if WEB , IUIExample #endif { // Options public bool ConvertUrl { get; set; } public string Url { get; set; } public string HtmlString { get; set; } public string HtmlStringBaseUrl { get; set; } public int Width { get; set; } public int Height { get; set; } public OfficeComponent.HtmlToPdf.PageSize PageSize { get; set; } public bool Portrait { get; set; } public OfficeComponent.HtmlToPdf.PageMargins Margin { get; set; } public int ConversionDelay { get; set; } public int Timeout { get; set; } public bool SinglePage { get; set; } public EventHandler Progress; #if WEB public HtmlToPdfBasicExample . base(null,null) { } #endif public HtmlToPdfBasicExample(string commonDataPath, string outputDir) . base(commonDataPath, outputDir) { } public HtmlToPdfBasicExample(string commonDataPath, string outputDir, string xmlFile) . base(commonDataPath, outputDir, xmlFile) { } Action onComplete; Action onError; string outputPath; public void ExecuteAsync(Action onComplete, Action onError) { if (Width <= 0 || Height <= 0) { ShowError("Invalid Width or Height"); onComplete(null); return; } if (ConversionDelay < 0) { ShowError("Invalid conversion delay"); onComplete(null); return; } // Set output path. outputPath = Path.Combine(OutputDir, this.GetType .Name + ".pdf"); if (File.Exists(outputPath)) File.Delete(outputPath); // Create a new converter. var c = new HtmlToPdfConverter { ViewportWidth = Width, ViewportHeight = Height, PageSize = PageSize, PageMargin = Margin, Portrait = Portrait, Delay = ConversionDelay, Timeout = Timeout, SinglePage = SinglePage }; if (Progress != null) c.Progress += Progress; this.onComplete = onComplete; this.onError = onError; if (ConvertUrl) { if (string.IsNullOrWhiteSpace(Url)) { ShowError("Please specify the URL to convert."); onComplete(null); return; } // Convert URL c.ConvertAsync(Url, outputPath, OnConversionComplete); } else { if (string.IsNullOrWhiteSpace(HtmlString)) { ShowError("Please specify the HTML string to convert."); onComplete(null); return; } // Convert the specified HTML string. c.ConvertStringAsync(HtmlString, HtmlStringBaseUrl, outputPath, OnConversionComplete); } } void OnConversionComplete(object sender, AsyncCompletedEventArgs e) { if (e.Error != null) onError(e.Error); else onComplete(outputPath); } public override string Execute { if (Width <= 0 || Height < 0) { ShowError("Invalid Width or Height"); return null; } if (ConversionDelay < 0) { ShowError("Invalid conversion delay"); return null; } // Set output path. var outputPath = Path.Combine(OutputDir, this.GetType .Name + ".pdf"); if (File.Exists(outputPath)) File.Delete(outputPath); // Create a new converter. var c = new HtmlToPdfConverter { ViewportWidth = Width, ViewportHeight = Height, PageSize = PageSize, PageMargin = Margin, Portrait = Portrait, Delay = ConversionDelay, Timeout = Timeout, SinglePage = SinglePage }; if (Progress != null) c.Progress += Progress; try { if (ConvertUrl) { if (string.IsNullOrWhiteSpace(Url)) { ShowError("Please specify the URL to convert."); return null; } // Convert URL c.Convert(Url, outputPath); } else { if (string.IsNullOrWhiteSpace(HtmlString)) { ShowError("Please specify the HTML string to convert."); return null; } // Convert the specified HTML string. c.ConvertString(HtmlString, HtmlStringBaseUrl, outputPath); } } catch (Exception ex) { ShowError(ex.Message); } return outputPath; } } } I am using this library to create pdf in c#. It is very useful and easy to use. I hope it will also help you.

Customers love our service for intuitive functionality

4.5

satisfied

46 votes

Convert PDF: All You Need to Know

C you. This, create you. If you(The use it can you just to:[The to.' I. :I forth most:(This set

What Our Customers Say

Deborah W.
Deborah W.
I corrected a mistake in my form and replaced it with the right information. It took a few minutes only! Thanks a lot!
James S.
James S.
The process of PDF correction has never been so easy. I’ve managed to create a new document faster than ever before!
William G.
William G.
It was really easy to fill out my PDF document and add a signature to it! This is a great service! I recommend it to you!
Denis B.
Denis B.
I edited the document with my mobile phone. It was fast and, as a result, I’ve got a professional-looking document.

Supporting Forms

Submit important papers on the go with the number one online document management solution. Use our web-based app to edit your PDFs without effort. We provide our customers with an array of up-to-date tools accessible from any Internet-connected device. Upload your PDF document to the editor. Browse for a file on your device or add it from an online location. Insert text, images, fillable fields, add or remove pages, sign your PDFs electronically, all without leaving your desk.