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:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.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 OK 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) ]
Created 5th August 2016, last changed 12nd March 2020
DynaPDF.GetImage - DynaPDF.GetImportDocInfo
Feedback: Report problem or ask question.