PDF to BMP - pqScan.com
VB.NET PDF to BMP Converting PDF into BMP Image Files in Visual Basic.NET Online Demo Download Trial Purchase Now

How to Convert PDF to BMP in VB.NET?

back to home  >  PDF to Image SDK  >  How to Convert PDF to Image  >  Convert PDF to BMP

Load your PDF documents and convert them into BMP images with ease using pqScan PDF to Image library. As a standalone .NET assembly developers can just reference it in your .NET application and start coding right away. Our SDK does not depend on any other third party SDKs, so there is no worrying about the further licensing issues for you.

PDF to BMP -- Visual Basic sample

Wanting convert PDF to BMP images in VB.NET, all you need are a few simple lines of code.

Imports System.Drawing
Imports System.Drawing.Imaging
Imports PQScan.PDFToImage

Namespace PDF2BMP
  Class Program
    Private Shared Sub Main(args As String())
      ' Create an instance of PQScan.PDFToImage.PDFDocument object.
      Dim pdfDoc As New PDFDocument()

      ' Load PDF document.
      pdfDoc.LoadPDF("sample.pdf")

      'Get total page count.
      Dim count As Integer = pdfDoc.PageCount

      For i As Integer = 0 To count - 1
      'Convert page to image
      Dim bitmap As Bitmap = pdfDoc.ToImage(i)
      'Save image tobmp file type
      bitmap.Save("output" & i & ".bmp", ImageFormat.Bmp)
      Next
    End Sub
  End Class
End Namespace

Look at the second VB.NET sample, loading PDF stream and turn it to Bmp image is just a piece of cake to you.

Imports System.IO
Imports System.Drawing
Imports System.Drawing.Imaging
Imports PQScan.PDFToImage

Namespace PDFToBMP
  Class Program
    Private Shared Sub Main(args As String())
      ' Generate a new PDFDocument instance from PQScan.PDFToImage.
      Dim pdf As New PDFDocument()

      ' Open PDF document to file stream
      Dim stream As New FileStream("sample.pdf", FileMode.Open)

      ' Load message from PDF document stream.
      pdf.LoadPDF(stream)

      ' Specify bmp image width from PDF page
      Dim width As Integer = pdf.GetPageWidth(0) / 2
      ' Specify bmp image height from PDF page
      Dim height As Integer = pdf.GetPageHeight(0) / 2

      'Convert PDF first page to image with the customized size
      Dim bmp As Bitmap = pdf.ToImage(0, width, height)
      'Save image to bmp format
      bmp.Save("result.bmp", ImageFormat.Bmp)
    End Sub
  End Class
End Namespace

convert pdf to bmp in vb.net

The output BMP images, you can keep them with original size or change them to wanted size. If you want to resize image and change image quality, you can see "How to customize output images from PDF using VB.NET".

pqScan SDK
.NET DLL for PDF to Image
Online Guide
.NET Guide for PDF to Image
Conversion Type
C#: Convert PDF to JPEG C#: Convert PDF to TIFF C#: Convert PDF to Multi-page TIFF .NET: Convert PDF to JPEG VB.NET: Convert PDF to TIFF VB.NET: Convert PDF to BMP ASP.NET: Convert PDF to PNG ASP.NET: Convert PDF to BMP View All Image Types >>
I would like to share pqScan to my working partners. Your product is customizable, reliable and affordable. Your technical support is responsible and outstanding. Company like you is a rare find. Marcus Koorey