GetDefaultPageSizes Document Query Command

Retrieves the list of page sizes PageStream uses.

count = GetDefaultPageSizes (namestem/s [,measurement/k] [,custom/k] [,DOCUMENT document | CHAPTER document:... | WINDOW document-window])


Parameters:
namestem/s is the name to give the array of pages.

measurement/k is a keyword switch [STANDARD|USER] which defaults to STANDARD. STANDARD will cause the page measurements to be returned as normally defined for that page size. E.g., inches for US Letter, centimeters for A4. USER will cause the page measurements to be returned using the user defined measurement system.

custom/k is a keyword switch [NOCUSTOM|CUSTOM] which defaults to NOCUSTOM. CUSTOM will cause the list of pages include a "Custom" page size entry at the end (translated in user defined localization).

Results:
returns the number of entries in the named array of pages.

a named array of pages named namestem, containing three named entries for each page. name will be the name of the page, width is the width of the page, and height is the height of the page.

Notes:


See Also:


Examples:
Python:

print GetDefaultPageSizes('user','Custom')['user']
[{'width': 8.5, 'name': 'US Letter', 'height': 11.0}, {'width': 8.5, 'name': 'US Legal', 'height': 14.0}, {'width': 11.0, 'name': 'US Tabloid', 'height': 17.0}, {'width': 17.0, 'name': 'US Poster', 'height': 22.0}, {'width': 5.5, 'name': 'US Letterhalf', 'height': 8.5}, {'width': 7.0, 'name': 'US Legalhalf', 'height': 8.5}, {'width': 3.5, 'name': 'US Business Card', 'height': 2.0}, {'width': 8.375, 'name': 'US Magazine', 'height': 10.875}, {'width': 8.125, 'name': 'US Magazine Narrow', 'height': 10.875}, {'width': 9.0, 'name': 'US Magazine Wide', 'height': 10.875}, {'width': 10.0, 'name': 'US Magazine Broad', 'height': 12.0}, {'width': 9.5, 'name': '#10 Envelope', 'height': 4.125}, {'width': 4.75, 'name': 'Compact Disc', 'height': 4.75}, {'width': 11.692913055419922, 'name': 'A3', 'height': 16.535432815551758}, {'width': 8.2677164077758789, 'name': 'A4 Letter', 'height': 11.692913055419922}, {'width': 5.8267717361450195, 'name': 'A5 Letterhalf', 'height': 8.2677164077758789}, {'width': 9.8425197601318359, 'name': 'B4', 'height': 13.897637367248535}, {'width': 6.9291338920593262, 'name': 'B5', 'height': 9.8425197601318359}, {'width': 6.3779525756835938, 'name': 'C6 Envelope', 'height': 4.4881887435913086}, {'width': 8.6614170074462891, 'name': 'DL Envelope', 'height': 4.3307085037231445}, {'width': 0.0, 'name': 'Custom', 'height': 0.0}]

ARexx:

Applescript:

The following is a rough example of how to create a page size listing in a requester. It presumes that an appropriate resource file exists and has been opened. In this dialog the drop down list is control number 30 and reqH is the requester handle.

Python:

listH = CreateList()['.result']
PageList = GetDefaultPageSizes('user','Custom')['user']
for page in PageList:
AppendListString(listH, page['name'])
SetControlAttr(reqH, 30, ControlAttr_List, listH)
FreeList(listH)

 

GetDefaultPageSizes  Command Definition  url:PGScmd/getdefaultpagesizes
  created:2006-05-03 18:35:59   last updated:2006-05-06 16:46:51
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For GetDefaultPageSizes
There are no user contributed comments for this page.