ByteScout PDF Suite - C# - Convert pdf to high quality png with pdf renderer sdk - ByteScout

ByteScout PDF Suite – C# – Convert pdf to high quality png with pdf renderer sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Convert pdf to high quality png with pdf renderer sdk

How to convert pdf to high quality png with pdf renderer sdk in C# and ByteScout PDF Suite

How to write a robust code in C# to convert pdf to high quality png with pdf renderer sdk with this step-by-step tutorial

An easy to understand sample source code to learn how to convert pdf to high quality png with pdf renderer sdk in C# ByteScout PDF Suite: the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can convert pdf to high quality png with pdf renderer sdk in C#.

The following code snippet for ByteScout PDF Suite works best when you need to quickly convert pdf to high quality png with pdf renderer sdk in your C# application. Follow the instructions from scratch to work and copy the C# code. Use of ByteScout PDF Suite in C# is also described in the documentation included along with the product.

ByteScout PDF Suite free trial version is available on our website. C# and other programming languages are supported.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Diagnostics; using Bytescout.PDFRenderer; namespace PDF2PNG { class Program { static void Main(string[] args) { // Create an instance of Bytescout.PDFRenderer.RasterRenderer object and register it. RasterRenderer renderer = new RasterRenderer(); renderer.RegistrationName = "demo"; renderer.RegistrationKey = "demo"; // Set high quality resolution 600 dpi (600 dots per inch) float renderingResolution = 600; // Load PDF document. renderer.LoadDocumentFromFile("multipage.pdf"); for (int i = 0; i < renderer.GetPageCount(); i++) { // Render first page of the document to PNG image file. renderer.Save("image" + i + ".png", RasterImageFormat.PNG, i, renderingResolution); } // Cleanup renderer.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("image0.png"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next