VB.NET PDF: How to HTML5 PDF Viewer PDF Create PDF Export File & Page Process PDF Read PDF Write Form Process Document Protect Annotation & Drawing PDF Print WPF PDF Viewer Work with Other SDKs Barcode Read Barcode Create OCR Twain
Convert PDF to Png, Gif, Bitmap ... Images
  |  
Home ›› XDoc.PDF ›› VB.NET PDF: PDF to Png, Gif, Bitmap ... Images

VB.NET PDF - PDF to Raster Images Conversion in VB.NET


Supports Conversion of PDF Document to PNG, BMP, GIF and Bitmap Images in VB.NET Class




Best adobe PDF to image converter SDK for Visual Studio .NET


Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint


VB.NET components for batch convert high resolution images from PDF


Convert PDF documents to multiple image formats, including Jpg, Png, Bmp, Gif, Tiff, Bitmap, .NET Graphics, and REImage


Turn multipage PDF file into image files in .NET WinForm application


Create image files including all PDF contents, like watermark and signature


Resize converted image files in VB.NET


Convert PDF to Jpg, Png, Bmp, Gif, Tiff and Bitmap in ASP.NET


Embed PDF to image converter in viewer


Quick evaluation source codes for VB.NET class


Free library and control for .NET framework


Sometimes, to convert PDF document into BMP, GIF, JPEG and PNG raster images in Visual Basic .NET applications, you may need a third party tool and have some questions on API and sample codes.


Using our VB.NET PDF to Raster Images Conversion Control, you will not worry about the Whether the API, sample codes are provided for PDF document to raster images conversion, because we offer a detailed guide for this product. Our website offers PDF to Raster Images Conversion Control for VB.NET developers. Using this mature and advanced control, developers are able to load target PDF document from local file or stream and convert it into BMP, GIF, JPEG and PNG raster images through VB.NET programming. In addition, our PDF document conversion library also enables developers to render and convert PDF document to TIFF and vector image SVG. In the PDF document rendering process, developers can set PDF rendering options in VB.NET project.


On the guide page, you can not only get APIs and VB.NET sample codes for converting Microsoft PDF document to PNG, BMP, GIF and bitmap, but also gain specific knowledge of the four raster images.




VB.NET Project: Necessary DLLs for Conversion of PDF to Images



In order to run the sample code, the following steps would be necessary.


Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Raster.dll


  RasterEdge.XDoc.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PDF;




VB.NET Sample Code for PDF to Png Conversion



This is a VB.NET programming sample code to convert PDF file to Png image.




' Load a PDF file.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Get the first page of PDF file.
Dim page As PDFPage = doc.GetPage(0)

' Convert the first PDF page to a PNG file.
page.ConvertToImage(ImageType.PNG, Program.RootPath + "Output.png")





VB.NET Sample Code for PDF to Bmp Conversion



You can use this piece of VB.NET code to implement PDF to Bmp conversion.




' Load a PDF file.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Get the first page of PDF file.
Dim page As PDFPage = doc.GetPage(0)

' Convert the first PDF page to a BMP file.
page.ConvertToImage(ImageType.BMP, Program.RootPath + "\\Output.bmp")





VB.NET Sample Code for PDF to Gif Conversion



Or directly change PDF to Gif image file in VB.NET program with this demo code.




' Load a PDF file.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Get the first page of PDF file.
Dim page As PDFPage = doc.GetPage(0)

' Convert the first PDF page to a GIF file.
page.ConvertToImage(ImageType.GIF, Program.RootPath + "\\Output.gif")





VB.NET Sample Code for PDF to Bitmap Conversion



Moreover, our SDK also allows you to render PDF to Bitmap in VB.NET programming.




' Load a PDF file.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Get the first page of PDF.
Dim page As PDFPage = doc.GetPage(0)

' Render the page to a Bitmap with default setting.
Dim bitmap1 As Bitmap = page.GetBitmap()
bitmap1.Save(inputFilePath + "_1.bmp")
'  ...

' Enlarge the page with factor 2.
Dim zoomRatio As Single = 2.0F
Dim bitmap2 As Bitmap = page.GetBitmap(zoomRatio)
bitmap2.Save(inputFilePath + "_2.bmp")
'  ...

' Render the page with a resolution of 300 dpi.
Dim targetResolution As Integer = 300
Dim bitmap3 As Bitmap = page.GetBitmap(targetResolution)
bitmap3.Save(inputFilePath + "_3.bmp")
'  ...