Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
DynaPDF.GetImageCount
Queries number of images in PDF.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 6.4 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| The PDF reference returned from DynaPDF.New. |
Result
Returns OK or error.
Description
Queries number of images in PDF.Returns the number of image objects which were loaded with DynaPDF functions or imported from external PDF files. This does not include inline images.
The images can be accessed with DynaPDF.GetImage.
If you need to write all files to disk, you can use DynaPDF.ExtractImages or use DynaPDF.ListImages to list them all with details.
See also GetImageCount function in DynaPDF manual.
Examples
Loop and get all images in various formats:
Go to Layout [ “Start” (Start) ; Animation: None ]
Set Variable [ $pdf ; Value: MBS("DynaPDF.New") ]
# Load PDF from container
Set Variable [ $r ; Value: MBS("DynaPDF.OpenPDFFromContainer"; $pdf; Start::SourcePDF) ]
Set Variable [ $r ; Value: MBS("DynaPDF.ImportPDFFile"; $pdf) ]
# Put result in records
Go to Layout [ “List” (List) ; Animation: None ]
Delete All Records [ With dialog: Off ]
Set Variable [ $imageCount ; Value: MBS( "DynaPDF.GetImageCount"; $PDF ) ]
Set Variable [ $imageIndex ; Value: 0 ]
If [ $imageCount > 0 ]
Loop
New Record/Request
Set Field [ List::Index ; $imageIndex ]
Set Field [ List::Image ; MBS("DynaPDF.GetImage"; $pdf; $ImageIndex; "Picture"; ""; "") ]
Set Field [ List::JPEG ; MBS("DynaPDF.GetImage"; $pdf; $ImageIndex; "Picture"; "test.jpg"; "JPEG") ]
Set Field [ List::BMP ; MBS("DynaPDF.GetImage"; $pdf; $ImageIndex; "Picture"; "test.bmp"; "BMP") ]
Set Field [ List::PNG ; MBS("DynaPDF.GetImage"; $pdf; $ImageIndex; "Picture"; "test.png"; "PNG") ]
Set Field [ List::TIFF ; MBS("DynaPDF.GetImage"; $pdf; $ImageIndex; "Picture"; "test.tif"; "TIFF") ]
Commit Records/Requests [ With dialog: On ]
Set Variable [ $imageIndex ; Value: $imageIndex + 1 ]
Exit Loop If [ $imageIndex >= $imageCount ]
End Loop
End If
Set Variable [ $r ; Value: MBS("DynaPDF.Release"; $pdf) ]
See also
- DynaPDF.GetCMapCount
- DynaPDF.GetImportPageCount
- DynaPDF.GetOCGCount
- DynaPDF.GetPageCoords
- DynaPDF.GetPageCount
- DynaPDF.GetTemplCount
- DynaPDF.List
- DynaPDF.New
- DynaPDF.Release
- DynaPDF.ReplaceImage
Example Databases
Blog Entries
Created 5th August 2016, last changed 12nd March 2020
DynaPDF.GetImage - DynaPDF.GetImportDocInfo
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins