Sample source code below will display you how to manage a complex task like make thumbnail from pdf with pdf renderer sdk in C#. ByteScout PDF Suite can make thumbnail from pdf with pdf renderer sdk. It can be applied from C#. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.
The SDK samples given below describe how to quickly make your application do make thumbnail from pdf with pdf renderer sdk in C# with the help of ByteScout PDF Suite. Follow the instructions from scratch to work and copy the C# code. Use of ByteScout PDF Suite in C# is also described in the documentation included along with the product.
The trial version of ByteScout PDF Suite can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.
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.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); } } }
60 Day Free Trial or Visit ByteScout PDF Suite Home Page
Explore ByteScout PDF Suite Documentation
Explore Samples
Sign Up for ByteScout PDF Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF Suite Home Page
Explore ByteScout PDF Suite Documentation
Explore Samples
Sign Up for ByteScout PDF Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: