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.PageStatistics
Queries the page statistics.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 3.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| The PDF reference returned from DynaPDF.New. | ||
| PageIndex | The page to check. Range is from one to DynaPDF.GetPageCount. | 1 |
Result
Returns statistics.
Description
Queries the page statistics.The statistics are returned as one value per line in a multi line text. The order of the values is:
- Number of patterns used.
- Number of templates
- Number of bezier curves
- Number of path clipping
- Number of path closing
- Number of shading drawings
- Number of images
- Number of lines
- Number of rectangles
- Number of texts
- Length of all texts together
- Number of layers
- Number of font loadings
This function uses the parser interface in DynaPDF and needs a Pro license.
Examples
Query page statistics:
# start new
Set Variable [ $PDF; Value:MBS("DynaPDF.New") ]
# open PDF
Set Variable [ $r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $PDF; Test::data) ]
# import pages
Set Variable [ $r; Value:MBS("DynaPDF.ImportPDFFile"; $PDF) ]
#if query page statistics
Set Variable [ $stat; Value:MBS("DynaPDF.PageStatistics"; $PDF; Test::PageIndex) ]
# split values:
Set Variable [ $Count; Value:ValueCount ( $stat ) ]
Set Variable [ $PatternCount; Value:MiddleValues ( $stat ; 1 ; 1 ) ]
Set Variable [ $TemplateCount; Value:MiddleValues ( $stat ; 2 ; 1 ) ]
Set Variable [ $BezierCount; Value:MiddleValues ( $stat ; 3 ; 1 ) ]
Set Variable [ $ClipPathCount; Value:MiddleValues ( $stat ; 4 ; 1 ) ]
Set Variable [ $ClosePathCount; Value:MiddleValues ( $stat ; 5 ; 1 ) ]
Set Variable [ $DrawShadingCount; Value:MiddleValues ( $stat ; 6 ; 1 ) ]
Set Variable [ $ImageCount; Value:MiddleValues ( $stat ; 7 ; 1 ) ]
Set Variable [ $LineCount; Value:MiddleValues ( $stat ; 8 ; 1 ) ]
Set Variable [ $RectangleCount; Value:MiddleValues ( $stat ; 9 ; 1 ) ]
Set Variable [ $TextCount; Value:MiddleValues ( $stat ; 10 ; 1 ) ]
Set Variable [ $TextLength; Value:MiddleValues ( $stat ; 11 ; 1 ) ]
Set Variable [ $LayerCount; Value:MiddleValues ( $stat ; 12 ; 1 ) ]
Set Variable [ $FontCount; Value:MiddleValues ( $stat ; 13 ; 1 ) ]
# show in text field
Set Field [ Test::PageStats; "PatternCount: " & $PatternCount &
"TemplateCount: " & $TemplateCount &
"BezierCount: " & $BezierCount &
"ClipPathCount: " & $ClipPathCount &
"ClosePathCount: " & $ClosePathCount &
"DrawShadingCount: " & $DrawShadingCount &
"ImageCount: " & $ImageCount &
"LineCount: " & $LineCount &
"RectangleCount: " & $RectangleCount &
"TextCount: " & $TextCount &
"TextLength: " & $TextLength &
"LayerCount: " & $LayerCount &
"FontCount: " & $FontCount ]
See also
- DynaPDF.GetPageCount
- DynaPDF.ImportPDFFile
- DynaPDF.Initialize
- DynaPDF.New
- DynaPDF.OpenPDFFromContainer
Example Databases
Blog Entries
Created 18th August 2014, last changed 19th March 2019
DynaPDF.PageLinkEx - DynaPDF.ParseContent
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins