vcl-dxpdfdocument-dot-tdxpdfpageinfo-7ebde8db.md
Provides access to the collection of images on the PDF document page.
property Images: TdxPDFImageList read;
| Type | Description |
|---|---|
| TdxPDFImageList |
The collection of images on the PDF document page.
|
Use the Images field to access individual images on the page by their indexes.
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;
TBitmap *ABitmap;
//...
if(!dxPDFViewer1->IsDocumentLoaded()) { return; }
// Obtains the first image on the first document page as a bitmap
ABitmap = dxPDFViewer1->Document->PageInfo[0].Images->Items[0]->Bitmap;
if(ABitmap != NULL)
ABitmap->SaveToFile("D:\Image0.bmp"); // Saves the extracted bitmap as the Image0.bmp file on the D drive
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:
Images field value is nil (in Delphi) or nullptr (in C++Builder)).Images.Count property returns 0).See Also