TotalPrintPages

Description (requires ScriptX v7 or later)

Knowing the total number of pages to be printed may be of use in scenarious such as printing only a particular range of pages.

The TotalPrintPages method returns the number of pages that will be printed, for the displayed document or for a frame.

Please note that determining the number of pages is a synchronous operation (blocking call) and may take some time as the whole document must be paginated.

Syntax

nPages = printing.TotalPrintPages([frame])

Parameter Description
frame [optional] the frame that would be printed, if not given the current document is used.

Applies To

printing

Example

Check out the source code of the Enhanced Formatting Page Range example.

See Also

enhancedFormatting, SetPageRange, pageRange