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.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Checks whether a page is a color page or if all graphic elements of the page use black & white only.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 5.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
GrayIsColor | Boolean whether gray should count as color. Default is 0. Pass 1 to count gray as color. |
0 | Optional |
Returns 1, 0 or error.
See also IsColorPage function in DynaPDF manual.
Check if first page has color:
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) ]
# Query image list
Set Variable [ $r ; Value: MBS("DynaPDF.EditPage"; $pdf; 1) ]
Show Custom Dialog [ MBS( "DynaPDF.IsColorPage"; $PDF ) ]
Set Variable [ $r ; Value: MBS("DynaPDF.EndPage"; $pdf) ]
Set Variable [ $r ; Value: MBS("DynaPDF.Release"; $pdf) ]
This function checks for a license.
Created 6th February 2015, last changed 9th November 2021