Skip to main content
.NET Framework 4.5.2+

PdfDocumentProcessor.GetImages(PdfDocumentArea) Method

Retrieves the images found within the specified document area.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v22.2.dll


public IList<Bitmap> GetImages(
    PdfDocumentArea area


Name Type Description
area PdfDocumentArea

A PdfDocumentArea object.


Type Description

A collection of Bitmap objects.


The overloaded GetImages method uses the page coordinate system. See the Coordinate Systems topic to learn more.

The GetImages method requires that your application runs under Full Trust.


The GetImages method uses GDI/GDI+ rendering and works only on Windows OS. The PlatformNotSupportedException is thrown on other operating systems.


This example illustrates the use of the PdfDocumentProcessor.GetImages method for obtaining document bitmaps in code by using PDF Document API.

View Example

Imports System
Imports System.Collections.Generic
Imports System.Drawing
Imports DevExpress.Pdf
' ...
        Shared Sub Main(ByVal args() As String)
            Dim processor As New PdfDocumentProcessor()

            Dim xCount As Integer = 8
            Dim yCount As Integer = 2
            Dim cardWidth As Double = 150.5 ' Measured in points (equals 2.09 inches).
            Dim cardHeight As Double = 442 ' Measured in points (equals 6.138 inches).
            Dim xMargin As Double = 122 ' Measured in points (equals 1.694 inches).
            Dim yMargin As Double = 77 ' Measured in points (equals 1.069 inches).
            Dim yCoord As Double = yMargin

            Dim y As Integer = 0
            Do While y < yCount
                Dim xCoord As Double = xMargin
                Dim x As Integer = 0
                Do While x < xCount
                    Dim area As New PdfDocumentArea(1, New PdfRectangle(xCoord, yCoord, xCoord + cardWidth, yCoord + cardHeight))
                    Dim bitmaps As IList(Of Bitmap) = processor.GetImages(area)
                    If bitmaps.Count <> 0 Then
                        bitmaps(0).Save(String.Format("{0}_{1}.bmp", x, y))
                    End If
                    x += 1
                    xCoord += cardWidth
                y += 1
                yCoord += cardHeight
        End Sub
See Also