Sample source code below will show you how to cope with a difficult task like convert PDF to high quality PNG in VB.NET. ByteScout PDF Renderer SDK is the software development kit for rendering of PDF files into high quality images or thumbnails. Various functions are included as well: batch processing, PNG, TIFF output, selection area to render, layers management to render text or images or vectors only. Designed for use from web, desktop and middleware applications and you can use it to convert PDF to high quality PNG with VB.NET.
This rich sample source code in VB.NET for ByteScout PDF Renderer SDK includes the number of functions and options you should do calling the API to convert PDF to high quality PNG. In your VB.NET project or application you may simply copy & paste the code and then run your app! This basic programming language sample code for VB.NET will do the whole work for you to convert PDF to high quality PNG.
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.
Imports Bytescout.PDFRenderer Class Program Friend Shared Sub Main(args As String()) ' Create an instance of Bytescout.PDFRenderer.RasterRenderer object and register it. Dim renderer As New RasterRenderer() renderer.RegistrationName = "demo" renderer.RegistrationKey = "demo" ' Set high quality resolution 600 dpi (600 dots per inch) Dim renderingResolution As Single = 600 ' Load PDF document. renderer.LoadDocumentFromFile("multipage.pdf") For i As Integer = 0 To renderer.GetPageCount() - 1 ' Render first page of the document to PNG image file. renderer.Save("image" & i & ".png", RasterImageFormat.PNG, i, renderingResolution) Next ' Cleanup renderer.Dispose() ' Open the first output file in default image viewer. System.Diagnostics.Process.Start("image0.png") End Sub End Class