These sample source codes on this page below are demonstrating how to make thumbnail image from PDF in VB.NET. ByteScout PDF Renderer SDK is the SDK for rendering of PDF into high-quality thumbnails and images. Includes various functions like batch processing, PNG, TIFF output. Can be used from web and desktop applications. It can be used to make thumbnail image from PDF using VB.NET.
Fast application programming interfaces of ByteScout PDF Renderer SDK for VB.NET plus the instruction and the code below will help you quickly learn how to make thumbnail image from PDF. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Implementing VB.NET 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.
You can download free trial version of ByteScout PDF Renderer SDK from our website to see and try many others source code samples for VB.NET.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports System.Drawing
Imports Bytescout.PDFRenderer
Module Module1
Sub Main()
' Create an instance of Bytescout.PDFRenderer.RasterRenderer object and register it
Dim renderer As 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")
Dim rectangle As RectangleF = renderer.GetPageRectangle(0)
Dim width, height As Integer
If rectangle.Width < rectangle.Height Then ' 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
End If
' Render first page of the document to JPEG image file
renderer.Save("thumbnail.jpg", RasterImageFormat.JPEG, 0, width, height)
' Cleanup
renderer.Dispose()
' Open the output image file in default image viewer
System.Diagnostics.Process.Start("thumbnail.jpg")
End Sub
End Module
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