PDF

A placed PDF file.

Methods:

exportFile, extractLabel, insertLabel, markup, move, place, placeXML, remove, resize, rotate, shear, store, unlink

Objects:

BlendMode, Boolean, ClippingPathSettings, DisplaySettingOptions, FeatherCornerType, FeatherMode, Link, Number, Object, PDFAttribute, ShadowMode, String, Swatch, XMLElement

Hierarchy:

Superclass: Graphic

Class: PDF

Property Listing

Property

Type

Access

Description

absoluteHorizontalScale

Number

read/write

The horizontal scale of the PDF relative to its containing object.

absoluteRotationAngle

Number

read/write

The rotation angle of the PDF relative to its containing object. (Range: -360 to 360)

absoluteShearAngle

Number

read/write

The skewing angle of the PDF relative to its containing object. (Range: -360 to 360)

absoluteVerticalScale

Number

read/write

The vertical scale of the PDF relative to its containing object.

associatedXMLElement

XMLElement

readonly

Returns the associated XML element

blendMode

BlendMode

BlendMode.COLOR

BlendMode.COLOR_BURN

BlendMode.COLOR_DODGE

BlendMode.DARKEN

BlendMode.DIFFERENCE

BlendMode.EXCLUSION

BlendMode.HARD_LIGHT

BlendMode.HUE

BlendMode.LIGHTEN

BlendMode.LUMINOSITY

BlendMode.MULTIPLY

BlendMode.NORMAL

BlendMode.OVERLAY

BlendMode.SATURATION

BlendMode.SCREEN

BlendMode.SOFT_LIGHT

read/write

The blend mode used to combine the background with the color of the PDF.

clippingPath

ClippingPathSettings

readonly

Clipping path settings.

featherCornerType

FeatherCornerType

FeatherCornerType.DIFFUSION

FeatherCornerType.ROUNDED

FeatherCornerType.SHARP

read/write

The type of feathering.

featherMode

FeatherMode

FeatherMode.NONE

FeatherMode.STANDARD

read/write

The feather-enabling mode.

featherWidth

Number

read/write

The width of the feathering

geometricBounds

Array of Number

Array of String

read/write

The bounds of the PDF excluding the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box.

horizontalScale

Number

read/write

The horizontal scaling applied to the PDF.

id

Number

readonly

The unique ID of the PDF.

imageTypeName

String

readonly

The type of the image.

index

Number

readonly

The index of the PDF within its containing object.

isolateBlending

Boolean

read/write

If true, the PDF blends in isolation.

itemLink

Link

readonly

The source file of the link.

knockoutGroup

Boolean

read/write

If true, the PDF is a knockout group.

label

String

read/write

A property that can be set to any string.

localDisplaySetting

DisplaySettingOptions

DisplaySettingOptions.DEFAULT_VALUE

DisplaySettingOptions.HIGH_QUALITY

DisplaySettingOptions.OPTIMIZED

DisplaySettingOptions.TYPICAL

read/write

Display performance options for the PDF.

nonprinting

Boolean

read/write

If true, the PDF does not print.

opacity

Number

read/write

The opacity of the object

parent

Button

GraphicLine

Group

Oval

Polygon

Rectangle

State

PageItem

XMLElement

readonly

The parent of the PDF (a PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group, Button or XMLElement).

pdfAttributes

PDFAttribute

readonly

PDF attribute settings.

properties

Object

read/write

A property that allows setting of several properties at the same time.

rotationAngle

Number

read/write

The rotatation angle of the PDF. (Range: -360 to 360)

shadowBlendMode

BlendMode

BlendMode.COLOR

BlendMode.COLOR_BURN

BlendMode.COLOR_DODGE

BlendMode.DARKEN

BlendMode.DIFFERENCE

BlendMode.EXCLUSION

BlendMode.HARD_LIGHT

BlendMode.HUE

BlendMode.LIGHTEN

BlendMode.LUMINOSITY

BlendMode.MULTIPLY

BlendMode.NORMAL

BlendMode.OVERLAY

BlendMode.SATURATION

BlendMode.SCREEN

BlendMode.SOFT_LIGHT

read/write

The blend mode to use for drawing the shadow.

shadowBlurRadius

Number

read/write

The radius of the shadow blur.

shadowColor

Swatch

read/write

The swatch (color or mixed ink) applied to the shadow.

shadowMode

ShadowMode

ShadowMode.DROP

ShadowMode.NONE

read/write

The shadow mode.

shadowOpacity

Number

read/write

The opacity of the shadow

shadowXOffset

Number

read/write

The horizontal offset of the shadow.

shadowYOffset

Number

read/write

The vertical offset of the shadow.

shearAngle

Number

read/write

The skewing angle applied to the PDF. (Range: -360 to 360)

verticalScale

Number

read/write

The vertical scaling applied to the PDF.

visibleBounds

Array of Number

Array of String

read/write

The bounds of the PDF including the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box.

Method Listing

undefined exportFile (format:Varies ExportFormat String, to:File, [showingOptions:Boolean=Boolean], using:PDFExportPreset)

Exports the object(s) to a file.

Parameter

Type

Description

format

ExportFormat

ExportFormat.EPS_TYPE

ExportFormat.INCOPY

ExportFormat.JPG

ExportFormat.PDF_TYPE

ExportFormat.RTF

ExportFormat.SVG

ExportFormat.SVG_COMPRESSED

ExportFormat.TAGGED_TEXT

ExportFormat.TEXT_TYPE

ExportFormat.XML

String

The export format. Can accept: ExportFormat enumerator or String.

to

File

The path of the export file.

showingOptions

Boolean

If true, prompts the user to select export options. (Optional)

(default: false)

using

PDFExportPreset

The export style to use. (Optional)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

undefined markup (using:XMLElement)

Associates the page item with the specified XML element while preserving existing content.

Parameter

Type

Description

using

XMLElement

The XML element.

undefined move (to:Array of Varies 2 Units Page Spread Layer, by:Array of Number String)

Move Page Item to a new location. One of the To or By parameters is required.

Parameter

Type

Description

to

Array of 2 Units

Page

Spread

Layer

The new location of the object. Can accept: Array of 2 Units, Spread, Page or Layer. (Optional)

by

Array of Number

Array of String

Amount by which to move the object relative to its current position (Optional)

Varies place (fileName:File, placePoint:Array of Number String, destinationLayer:Array of Varies Layer Layers. , [showingOptions:Boolean=Boolean], [autoflowing:Boolean=Boolean], [retainingFormatting:Boolean=Boolean], [convertingQuotes:Boolean=Boolean], withProperties:Object)

Places a file in the document.

Parameter

Type

Description

fileName

File

The file to place.

placePoint

Array of Number

Array of String

The point where to place the object (only applicable if you are telling a page or spread to place) (Optional)

destinationLayer

Layer

Array of Layers.

The layer(s) to place the file on (only valid if you are telling a page or spread to place). Can accept: Layer or Array of Layers. (Optional)

showingOptions

Boolean

Whether to display the import options dialog (Optional)

(default: false)

autoflowing

Boolean

Whether to autoflow placed text (Optional)

(default: false)

retainingFormatting

Boolean

Whether to keep formatting of placed text files (Optional)

(default: true)

convertingQuotes

Boolean

Whether to convert to typographer's quotes (Optional)

(default: true)

withProperties

Object

Initial values for properties of the placed object(s) (Optional)

undefined placeXML (using:XMLElement)

Places XML content into the specified object. Note: Replaces any existing content.

Parameter

Type

Description

using

XMLElement

The XML element whose content you want to place.

undefined remove ()

Deletes the PDF.

undefined resize (horizontalScale:Number, verticalScale:Number, around:Array of Varies 2 Units AnchorPoint, [consideringCurrentScale:Boolean=Boolean], [transformingContent:Boolean=Boolean], [consideringParentsScale:Boolean=Boolean])

Resize the page item. You must specify either horizontal scale or vertical scale or both.

Parameter

Type

Description

horizontalScale

Number

The percentage of horizontal scale (Optional)

verticalScale

Number

The percentage of vertical scale (Optional)

around

Array of 2 Units

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

The point to scale around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional)

consideringCurrentScale

Boolean

If true then the object's current scale and new scale will be combined. If false then the new value is absolute. The default value is false. (Optional)

(default: false)

transformingContent

Boolean

If true then both the object and items within it are scaled (Optional)

(default: true)

consideringParentsScale

Boolean

If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread. (Optional)

(default: false)

undefined rotate (by:Number, around:Array of Varies 2 Units AnchorPoint, [consideringCurrentRotation:Boolean=Boolean], [transformingContent:Boolean=Boolean], [consideringParentsRotation:Boolean=Boolean])

Rotate the page item

Parameter

Type

Description

by

Number

Angle by which to rotate the page item

around

Array of 2 Units

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

The point to rotate around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional)

consideringCurrentRotation

Boolean

If true then the object's current rotation and new rotation will be combined. If false then the new value is absolute. The default value is false. (Optional)

(default: false)

transformingContent

Boolean

If true then both the object and items within it are rotated (Optional)

(default: true)

consideringParentsRotation

Boolean

If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread. Cannot rotate with considering current rotation and considering parents rotation both set at the same time. (Optional)

(default: false)

undefined shear (by:Number, around:Array of Varies 2 Units AnchorPoint, [consideringCurrentShear:Boolean=Boolean], [transformingContent:Boolean=Boolean], [consideringParentsShear:Boolean=Boolean])

Shear the page item

Parameter

Type

Description

by

Number

Angle by which to shear the object

around

Array of 2 Units

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

The point to shear around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional)

consideringCurrentShear

Boolean

If true then the object's current shear and new shear will be combined. If false then the new value is absolute. The default value is false. (Optional)

(default: false)

transformingContent

Boolean

If true then both the object and items within it are sheared (Optional)

(default: true)

consideringParentsShear

Boolean

If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread. Cannot shear with considering current shear and considering parents shear both set at the same time. (Optional)

(default: false)

Asset store (using:Library)

Store a page item in a library

Parameter

Type

Description

using

Library

The library in which to store

undefined unlink (from:UnlinkFrom)

Detaches an overridden master page item from the page or from the master

Parameter

Type

Description

from

UnlinkFrom

UnlinkFrom.MASTER_SPREAD

UnlinkFrom.PAGE

What to unlink from

Object of

ClippingPathSettings.parent

PDFAttribute.parent