ByteScout Premium Suite - C# - Make thumbnail from pdf with pdf renderer sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Premium Suite – C# – Make thumbnail from pdf with pdf renderer sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Make thumbnail from pdf with pdf renderer sdk

How to make thumbnail from pdf with pdf renderer sdk in C# using ByteScout Premium Suite

Step-by-step tutorial on how to make thumbnail from pdf with pdf renderer sdk in C#

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout Premium Suite can make thumbnail from pdf with pdf renderer sdk. It can be applied from C#. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for make thumbnail from pdf with pdf renderer sdk below and use it in your application. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Applying C# application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.

ByteScout Premium 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.Drawing; using System.Diagnostics; using Bytescout.PDFRenderer; namespace MakeThumbnail { static class Program { static void Main() { // 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"); // Get size of the page in Points (standard PDF document units; 1 Point = 1/72") RectangleF rectangle = renderer.GetPageRectangle(0); int width, height; if (rectangle.Width < rectangle.Height) // portrait page orientation { width = -1; // width will be calculated from height keeping the aspect ratio height = 100; } else // landscape page orientation { width = 100; height = -1; // height will be calculated from width keeping the aspect ratio } // Render first page of the document to JPEG image file renderer.Save("thumbnail.jpg", RasterImageFormat.JPEG, 0, width, height); // Cleanup renderer.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("thumbnail.jpg"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next