TdxPDFPageInfo.Images Property
Provides access to the collection of images on the PDF document page.
Declaration
property Images: TdxPDFImageList read;
Property Value
| Type | Description |
|---|---|
| TdxPDFImageList | The collection of images on the PDF document page. |
Remarks
Use the Images field to access individual images on the page by their indexes.
Code Example: Saves the First Document Image to a File
You can use an image collection item’s Bitmap property to download a copy of an image on a PDF document page.
var
ABitmap: TBitmap;
begin
if not dxPDFViewer1.IsDocumentLoaded then Exit;
// Obtains the first image on the first document page as a bitmap
ABitmap := dxPDFViewer1.Document.PageInfo[0].Images[0].Bitmap;
if ABitmap <> nil then
ABitmap.SaveToFile('D:\Image0.bmp'); // Saves the obtained bitmap as the Image0.bmp file on the D drive
end;
Refer to the following topic for additional information: How to: Extract Content from PDF Documents.
Note
You cannot obtain images from a page if one of the following conditions is met:
- Content extraction operations are forbidden for the loaded PDF document (the
Imagesfield value isnil(in Delphi) ornullptr(in C++Builder)). - The PDF document page has no images (the
Images.Count property returns0).
See Also