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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Queries number of images in PDF.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 6.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. |
Returns number or error.
See also GetImageCount function in DynaPDF manual.
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) ]
This function checks for a license.
Created 5th August 2016, last changed 9th November 2021