The sample source code below will teach you how to convert PDF to JPEG in C#. ByteScout PDF Renderer SDK: the software development kit for rendering of PDF files into high quality images or thumbnails. Various functions are included as well: batch processing, PNG, TIFF output, selection area to render, layers management to render text or images or vectors only. Designed for use from web, desktop and middleware applications. It can convert PDF to JPEG in C#.
C# code samples for C# developers help to speed up coding of your application when using ByteScout PDF Renderer SDK. Follow the instructions from the scratch to work and copy the C# code. Detailed tutorials and documentation are available along with installed ByteScout PDF Renderer SDK if you’d like to dive deeper into the topic and the details of the API.
Free trial version of ByteScout PDF Renderer SDK is available for download from our website. Get it to try other 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 Bytescout.PDFRenderer; namespace PDF2JPEG { 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"; // Load PDF document renderer.LoadDocumentFromFile("multipage.pdf"); for (int i = 0; i < renderer.GetPageCount(); i++) { // Render document page to PNG image file. renderer.Save("image" + i + ".jpg", RasterImageFormat.JPEG, i, 96); } // Cleanup renderer.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("image0.jpg"); 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