Adobe InDesign CS2 (4.0) Object Model JS: TrapPreset

InDesign CS2

Class

TrapPreset

 A trap preset.

QuickLinks

duplicate, extractLabel, getElements, insertLabel, remove, toSource, toSpecifier

Hierarchy

Application | Document
TrapPreset

Properties

PropertyTypeAccessDescription
blackColorThresholdnumber (range: 0 - 100) r/wThe minimum amount (as a percentage) of black ink required before the black width setting is applied. (Range: 0 to 100)
blackDensitynumber (range: 0 - 10) r/wThe neutral density value at or above which an ink is considered black. (Range: .001 to 10)
blackWidthMeasurement Unit (Number or String) (range: 0 - 8) r/wThe black width. (Range depends on unit. For points: 0.0 to 8.0; picas: 0p0 to 0p8; inches: 0 to 0.1111; mm: 0 to 2.822; cm: 0 to .2822; ciceros: 0c0 to 0c7.507)
colorReductionnumber (range: 0 - 100) r/wThe degree (as a percentage) to which components from abutting colors are used to reduce the trap color. (Range: 0 to 100) Note: 0% makes a trap whose neutral density is equal to the neutral density of the darker color.
defaultTrapWidthMeasurement Unit (Number or String) (range: 0 - 8) r/wThe default width for trapping all colors except those involving solid black. (Range depends on unit. For points: 0.0 to 8.0; picas: 0p0 to 0p8; inches: 0 to 0.1111; mm: 0 to 2.822; cm: 0 to .2822; ciceros: 0c0 to 0c7.507)
idnumber readonlyThe unique ID of the TrapPreset.
imagePlacementTrapImagePlacementTypes:
TrapImagePlacementTypes.CENTER_EDGES
TrapImagePlacementTypes.CHOKE
TrapImagePlacementTypes.IMAGE_NEUTRAL_DENSITY
TrapImagePlacementTypes.IMAGES_OVER_SPREAD
r/wThe trap placement between vector objects and bitmap images.
imagesToImagesbool r/wIf true, turns on trapping along the boundary of overlapping or abutting bitmap images.
indexnumber readonlyThe index of the TrapPreset within its containing object.
internalImagesbool r/wIf true, turns on trapping among colors within individual bitmap images.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the TrapPreset.
objectsToImagesbool r/wIf true, ensures that vector objects overlap bitmap images.
oneBitImagesbool r/wIf true, ensures that one-bit images trap to abutting objects.
parentApplication
Document
readonlyThe parent of the TrapPreset (a Application or Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
slidingTrapThresholdnumber (range: 0 - 100) r/wThe difference (as a percentage) between the neutral densities of abutting colors at which the trap is moved from the darker side of a color edge toward the centerline. (Range: 0 to 100)
stepThresholdnumber (range: 1 - 100) r/wThe amount (as a percentage) that components of abutting colors must vary before a trap is created. (Range: 1 to 100)
trapEndTrapEndTypes:
TrapEndTypes.MITER_TRAP_ENDS
TrapEndTypes.OVERLAP_TRAP_ENDS
r/wThe shape to use at the intersection of three-way traps.
trapJoinEndJoin:
EndJoin.MITER_END_JOIN
EndJoin.ROUND_END_JOIN
EndJoin.BEVEL_END_JOIN
r/wThe join type of the trap preset.

Methods

Instances

TrapPreset duplicate ()
Duplicates the TrapPreset.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of Object getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove (replacingWith: TrapPreset)
Deletes the trap preset.

ParameterTypeDescription
replacingWithTrapPresetThe trap preset to apply in place of the deleted preset.

string toSource ()
Generates a string which, if executed, will return the TrapPreset.

string toSpecifier ()
Retrieves the object specifier.

Element of

Page.appliedTrapPreset

Used in:

void TrapPreset.remove (replacingWith: TrapPreset)

array of TrapPreset TrapPresets.itemByRange (from: any, to: any)

TrapPreset TrapPresets.nextItem (obj: TrapPreset)

TrapPreset TrapPresets.previousItem (obj: TrapPreset)

Return

TrapPreset TrapPreset.duplicate ()

TrapPreset TrapPresets.add ([withProperties: Object])

TrapPreset TrapPresets.anyItem ()

Array of TrapPreset TrapPresets.everyItem ()

TrapPreset TrapPresets.firstItem ()

TrapPreset TrapPresets.item (index: any)

TrapPreset TrapPresets.itemByID (id: number)

TrapPreset TrapPresets.itemByName (name: string)

Array of TrapPreset TrapPresets.itemByRange (from: any, to: any)

TrapPreset TrapPresets.lastItem ()

TrapPreset TrapPresets.middleItem ()

TrapPreset TrapPresets.nextItem (obj: TrapPreset)

TrapPreset TrapPresets.previousItem (obj: TrapPreset)

Jongware, 27-Jun-2010 v3.0.3dContents :: Index