DynaPDF.ListImages
------------------

Lists images in a PDF.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [6.4](newinversion64.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [DynaPDF.GetImage](DynaPDFGetImage.md) instead.

MBS( "DynaPDF.ListImages"; PDF { ; Flags; Page } ) 

**MBS**( **"DynaPDF.ListImages";** /\* Lists images in a PDF. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Flags**; /\* Optional; Optional, various flags for PDF parsing.e.g. 0 \*/   
**$Page**) /\* Optional; The page number to look at.  
If missing or empty, we process all pages.e.g. 123 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Flags | Optional, various flags for PDF parsing. | 0 | Optional |
| Page | The page number to look at.   If missing or empty, we process all pages. | 123 | Optional |

### Result

Returns list or error.

### Description

Lists images in a PDF.  
This is similar to [DynaPDF.ExtractImages](DynaPDFExtractImages.md), but does not write to disk, but returns information.  
For the flags, please check the pf flags in dynapdf manual.  
  
The result is a list of values.  
First value is the number of images.  
Than for each image you get  
- Index of image.
- Page Numbers this image is on separated by space.
- Type of image file we would write when extracting: TIFF, JPEG or JPEG2000.
- Size of image in bytes
- Bits per Pixel, e.g. 8
- Number of Components, e.g. 3 for RGB, 4 for CMYK
- Width in Pixel
- Height in Pixel
- 1 for inline graphic, else 0.
- 1 for interpolation enabled, else 0.
- 1 for transparency enabled, else 0.
- Rendering Intent, e.g. AbsoluteColorimetric, Perceptual, RelativeColorimetric, Saturation or None.
- Size of metadata stream (XMP)
- Color Space Type, e.g. DeviceRGB
- ICC Color Profile Type if one exists, else none.
- ICC Color Profile alternate color space.
- Size of ICC Profile data
- Number of input components
- Number of output components
- Number of colors (for palettes)
- Colorants Count
- Colorants names separated by tab.
- Horizontal resolution of JPEG if available.
- Vertical resolution of JPEG if available.
- Display Width
- Display Height

The ICC Profile is often not part of the PDF as most software converts to DeviceCMYK or uses current profile set in PDF. Display width and height is calculated by the plugin. That is the size of points on the page the PDF is drawn. If Display width and pixel width are the same, the image is displayed with 72 dpi.  
  
This function uses the parser interface in DynaPDF and needs a Pro license.  
  
Deprecated in favor of [DynaPDF.GetImage](DynaPDFGetImage.md) and [DynaPDF.GetImageCount](DynaPDFGetImageCount.md).  
  
If you have an open page, we close it automatically for you before doing the import.  
### See also

- [DynaPDF.ExtractImages](DynaPDFExtractImages.md)
- [DynaPDF.GetImage](DynaPDFGetImage.md)
- [DynaPDF.GetImageCount](DynaPDFGetImageCount.md)
- [DynaPDF.Initialize](DynaPDFInitialize.md)
- [DynaPDF.InsertImage](DynaPDFInsertImage.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 11.4**
    - Deprecated [DynaPDF.ExtractImages](https://www.mbsplugins.eu/DynaPDFExtractImages.shtml) and [DynaPDF.ListImages](https://www.mbsplugins.eu/DynaPDFListImages.shtml) in favor of [DynaPDF.GetImage](https://www.mbsplugins.eu/DynaPDFGetImage.shtml) function.

### Example Databases

- [DynaPDF/List Images](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/List%20Images.shtml#4ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 11.4pr1](https://www.mbsplugins.de/archive/2021-08-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.4pr1](https://www.mbsplugins.de/archive/2016-07-20/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th July 2016 , last changed 25th September 2024

  
[DynaPDF.List](DynaPDFList.md) - [DynaPDF.LockLayer](DynaPDFLockLayer.md)

[HTML Version](DynaPDFListImages.shtml)