ByteScout PDF Renderer SDK - C# - Render Part of PDF Page - ByteScout

ByteScout PDF Renderer SDK – C# – Render Part of PDF Page

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Renderer SDK – C# – Render Part of PDF Page

How to render part of PDF page in C# with ByteScout PDF Renderer SDK

Write code in C# to render part of PDF page with this step-by-step tutorial

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout PDF Renderer SDK can render part of PDF page. It can be used from C#. 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.

The SDK samples like this one below explain how to quickly make your application do render part of PDF page in C# with the help of ByteScout PDF Renderer SDK. In your C# project or application you may simply copy & paste the code and then run your app! Further enhancement of the code will make it more vigorous.

Download free trial version of ByteScout PDF Renderer SDK from our website with this and 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)

Program.cs
      
using System; using System.Diagnostics; using Bytescout.PDFRenderer; namespace RenderPartOfPdfPage { 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("sample_table.pdf"); // Set extraction area renderer.SetExtractionArea(205.5f, 108.75f, 331.5f, 121.5f); // Render part of document to PNG image file. renderer.Save({code}quot;result_{renderingResolution}.png", RasterImageFormat.PNG, 0, renderingResolution); // Cleanup renderer.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo({code}quot;result_{renderingResolution}.png"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

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

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 Renderer SDK Home Page

Explore ByteScout PDF Renderer SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Renderer SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next