Sample source code below will show you how to cope with a difficult task like convert PDF to high quality PNG in C#. What is ByteScout PDF Renderer SDK? It is the SDK for rendering of PDF into high-quality thumbnails and images. Includes various functions like batch processing, PNG, TIFF output. Can be used from web and desktop applications. It can help you to convert PDF to high quality PNG in your C# application.
The SDK samples like this one below explain how to quickly make your application do convert PDF to high quality PNG in C# with the help of ByteScout PDF Renderer SDK. Follow the instructions from the scratch to work and copy the C# code. Enjoy writing a code with ready-to-use sample codes in C#.
Free trial version of ByteScout PDF Renderer SDK is available on our website. Documentation and source code samples are included.
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 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); } } }
60 Day Free Trial or Visit ByteScout PDF Renderer SDK Home Page
Explore ByteScout PDF Renderer SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Renderer SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF Renderer SDK Home Page
Explore ByteScout PDF Renderer SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Renderer SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples