JavaScript runlist object definitions

In the convenience functions, or when creating an imposition runlist using nothing but JavaScript objects directly, the following  type definitions are used.

Unit

A string used to identify the unit of a number. Can be one of "mm", "cm", "m", "in", "ft", "pt" or "pc".

Unit value

A number that is converted to point using the currently active unit (either explicitly set or inferred from the defaults).

Rectangle

The definition of a rectangle. An object with the following properties:

  • unit: Unit
    The unit for all other measurements. Optional.
  • left: Unit value
    The left hand side of the rectangle.  Default: 0.
  • bottom: Unit value
    The bottom side of the rectangle. Default: 0.
  • right: Unit value
    The right hand side of the rectangle. Default: 0.
  • top: Unit value
    The top side of the rectangle. Default: 0.
  • width: Unit value
    Optional. Overwrites "right" with "left + width" if present.
  • height: Unit value
    Optional. Overwrites "top" with "bottom + height" if present.

Bleed

The definition of where (and how much) bleed is required for a Rectangle.

  • unit: Unit
    The unit for all other measurements. Optional.
  • left: Unit value
    Bleed required on the left.  Default: 0.
  • bottom: Unit value
    Bleed required at the bottom. Default: 0.
  • right: Unit value
    Bleed required on the right. Default: 0.
  • top: Unit value
    Bleed required at the top. Default: 0.

Auto Shingling

  • unit: Unit
    Default: inherited, "pt"
  • method:
    String, one of "shift", "scale", "scale_proportional". Default: scale.
  • direction:
    String, one of "inwards", "outwards", "both". Default: inwards
  • increment: Unit value
    Default: 0
  • book_size: Integer
    Default: 0
  • staple_size: Integer
    Default: 0

Shingling

  • unit: Unit
    Default: inherited, "pt"
  • method:
    String, one of "shift", "scale", "scale_proportional"
    Default: “scale”
  • direction:
    String, one of "inwards", "outwards", "both". Default: inwards
  • value: Unit value
    Default: 0

Color Space

  • String
    One of "ALL", "CMYK", "RGB", "GRAY", "SPOT"

Color Components

  • Array of doubles (in percent)

Direction

  • String. One of:
    • "N": None
    • "L": Left
    • "R": Right
    • "T": Top
    • "B": Bottom

Crop Mark Directions

  • String. One of:
    • "N": None
    • "L": Left
    • "R": Right
    • "T": Top
    • "B": Bottom
    • "LT": Left and Top
    • "LB": Left and Bottom
    • "RT": Right and Top
    • "RB": Right and Bottom

Crop marks

  • unit: Unit
    Default: inherited, "pt"
  • left_bottom:
    Crop Mark Direction, Default: "N".
  • left_top:
    Crop Mark Direction, Default: "N".
  • right_bottom:
    Crop Mark Direction, Default: "N".
  • right_top:
    Crop Mark Direction, Default: "N".
  • length: Unit value
    Default: 10
  • gap: Unit value
    Default: 3
  • width: Unit value
    Default: 1
  • color_space: Color Space
    Default: "ALL"
  • color_components: Color Components
    Default: [0,0,0,100]
  • tint_value: double [0,100]
    Default: 100

Text

  • unit: Unit
    Default: inherited, “pt”
  • font:
    String, Default: "Helvetica"
  • size: Unit value
    Default: "12"
  • color_space: Color Space
    Default: "ALL"
  • color_components: Color Components
    Default: [0,0,0,100]
  • tint_value: double [0,100]
    Default: 100

Scale

  • horizontal: Double
  • vertical: Double

Slot definition

  • id: String
  • isolated: Boolean
  • clip_mode: Clip Mode
    Default: "P"
  • crop_marks:
    Crop mark specification
  • text:
    Text specification
  • rect:
    Rectangle
  • bleed:
    Bleed Definition
  • scale:
    Double or Scale definiftion
  • rotation:
    Number, one of 0, 90, 180,270
  • binding_margin
    Direction
  • bleed_shingling:
    Boolean

Placement

  • slot: Id or index of slot to be used for placement
    String or number
  • page: Page index to be placed in slot
    Number, zero based
  • text: A text to be placed in the slot
  • shingling: Shingling Definition.
    If “value” property is defined automatic shingling is disabled and value is used directly.  

Simple JavaScript runlist sample

A very simple sample can be found here, which is just placing the 3rd page into 1 of 3 slots.