On this page you will learn from code samples for programming in C#.Writing of the code to render text vector image layers in PDF in C# can be done by developers of any level using ByteScout PDF Renderer SDK. ByteScout PDF Renderer SDK is the component (SDK) that renders PDF into high quality images and thumbnails. Includes various functions like page by page processing, BMP, PNG, TIFF or stream output. Can be used from web and desktop applications. It can be used to render text vector image layers in PDF using C#.
This code snippet below for ByteScout PDF Renderer SDK works best when you need to quickly render text vector image layers in PDF in your C# application. Follow the instructions from the scratch to work and copy the C# code. Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
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"; RenderingOptions renderingOptions = new RenderingOptions(); // Enable text objects rendering renderingOptions.RenderTextObjects = true; // DISABLE vector objects rendering renderingOptions.RenderVectorObjects = false; // DISABLE image objects rendering renderingOptions.RenderImageObjects = false; // 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 + ".png", RasterImageFormat.PNG, i, 300, renderingOptions); } // 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