XMPie Scripting Plug-in
Summary: This article provides information on the XMPie scripting plug-in, the XMPie extension to InDesign scripting model
Audience: XMPie customers who look to automate the creation and manipulation of XMPie print documents.
Prerequisites: Basic InDesign and scripting knowledge is assumed.
Overview
XMPie scripting plug-in is an extension to the Adobe InDesign scripting model. It allows a developer using InDesign scripting to affect XMPie related document properties, such as the Plan reference, and to retrieve Plan and ADOR information, in addition to the existing InDesign scripting features.
The scripting plug-in may be used both in desktop and server environments, with slightly varying capabilities. It is ideal for automating tasks that create and manipulate XMPie print documents. As opposed to the regular uProduce SDK, the scripting plug-in deals with the document template itself and not with the production functionality.
The scripting plug-in automates the following processes:
-
The building of an XMPie template from a regular InDesign document, by attaching a Plan and automatically adding ADOR objects.
-
Converting other variable template formats to XMPie template, via constructing the InDesign document and adding the Plan and ADOR objects associations. For example, using a combination of MS-Word scripting and InDesign/XMPie scripting you can convert a Word mail merge template to XMPie.
-
Modifying a Document template, including references to ADOR Objects, based on customization logic in a Web-To-Print application
This article provides information about how the plug-in may be used with uCreate Print (desktop) and uProduce (server).
It also contains a reference for the various functions and objects that the plug-in adds to InDesign scripting model.
Using the scripting plug-in
This section will demonstrate how to use the scripting plug-in by reviewing a simple example.
Assume that you are working with a graphic designer who does not own XMPie software to create some designs in which you wish to allow the use of ADOR Objects. The designer creates a design using InDesign. To mark variable fields, for example in the text, they write the variable name surrounded by angle brackets (“<” and “>”). For example, the opening sentence in a mailer may look like this:
Hello <Salutation> <First Name>,
Thank you for registering to our upcoming event…
In this text there are two marks for variables – <Salutation>, which will denote that person’s salutation (Mr, Miss, Mrs etc.), and <First Name> to refer to the person’s first name.
Once the Document reaches you, you are supposed to link that document to a Plan, and then associate each of the marks with a matching ADOR Object in the Plan. You may have agreed on a set of variable names with the designer, or just built the Plan based on their variables usage, or maybe knew which ADOR to use for each of the designer marks. In any case, you must now go through the design and tag each mark with the relevant ADOR objects of the Plan.
Using XMPie scripting plug-in can assist here, because it can automate the tagging process. In fact, using a combination of the plug-in and uProduce API you can automatically get from a state in which you receive the design to a state where you have the document ready for production on your uProduce server.
The following sections will go through installing the plug-in on the desktop, and writing the script to handle this task. The complete script and a sample document are available with the tech-note materials.
Installing the scripting plug-in
The XMPie scripting plug-in is provided as part of XMPie scripting materials. Depending on the InDesign version that you are using, it will be named XMPScriptingXXX.apln. For example, for InDesign CS6, it would be XMPScripting8.apln. In addition, for plug-ins to be installed on InDesign version that is higher than CS4 there will be a library named (XMPScriptingXXX Resources).
To install the scripting plug-in:
-
Copy both the plug-in and the folder into the XMPie plug-in folder in InDesign. Normally the library path would look like: <System Drive>:\Program Files (x86)\Adobe\Adobe InDesign YYY\Plug-Ins\XMPie
-
Register the scripting license that you received. Follow these steps:
-
Open InDesign.
-
Locate the XMPie uCreate Print palette and activate it.
-
From the palette menu choose Add License.
-
In the License Key field, place the license key that you received for the scripting plug-in, and press Activate.
-
This should activate the license.
Using Extendscript
Adobe CS installation comes with Adobe Extendscript Toolkit. This is the development environment for writing scripts. These scripts may later be run on InDesign using various methods (for example, the Extendscript toolkit).
Open the toolkit application. You may locate it in the Adobe CS Program Files folder. Once opened, the main application window is displayed:
The editor window opens with an empty scripting editor, and you can start writing script. To run the script, you need to select the appropriate application from the applications drop-down list:
While writing the script you can run it, pause, continue and define breakpoints like you would expect from any IDE. The controls for running scripts are located at the top right of the screen:
Now, let’s write the script.
Writing the script
The script that we will write does the following:
-
Opens the desired Document in InDesign.
-
Associate the Document with a Plan that we prepared.
-
Associate all Text ADOR Objects in the Plan with the locations in the Document that match them.
-
Pack the Document as DPKG.
That’s it, now we are ready.
Open the Document in InDesign and associate it with the Plan
At the top of the script write the following variables:
var PlanFilePath = "/C/stuff/testPlan.plan";
var DocumentFilePath = "/C/stuff/testDocument.indd";
var targetFilePath = "/C/stuff";
var targetFileName = "testDocumentXMPie";
These variables set up various file references for the script. You will change them for the Document that you wish to use the script with (alternatively you can find another method to get the required information).
PlanFilePath specifies the Plan file path. Note that it is defined using “Unix” style paths, as is the custom with Adobe scripting. DocumentFilePath refers to the path to the Document that we wish to convert to an XMPie template. targetFilePath indicates the folder path to which we’ll save the end result DPKG, and testDocumentXMPie contains the file name.
To open the Document and associate it with a Plan, write the following:
var workDocument = app.open(File(DocumentFilePath));
workDocument.plan.filePath = File(PlanFilePath);
The first line opens the Document, and saves the Document reference to workDocument. The second line uses the Plan property of a Document that refers to the XMPie Plan. This property is defined by the scripting plug-in. Its filePath property may be used to set a reference to a file, or get it. The Plan property may also be used to query Plan information, such as to get the ADOR listing. This will become useful as we assign the ADOR Objects.
As of this point, the document is associated with a Plan.
Associate Plan ADOR Objects with the Document
The next task is to go over all markups in the design and associate them with the Plan ADOR Objects. For the sake of simplicity, we will assume that there are only text markups (for text ADOR Objects), and that the markup names fit the Plan ADOR Objects. If the names do not fit, you can code in also some mapping method.
The code does this by iterating the Plan ADOR Objects, looking for markups that fit that ADOR, and setting up the ADOR on those markups. Here is how it’s done:
var planAdors = workDocument.plan.adors;
for (var i=0;i< planAdors.length;++i)
{
var planAdor = planAdors [i];
if(planAdor.objectType == ADORTypes.TEXTADOR)
{
app.findTextPreferences = NothingEnum.nothing;
app.findTextPreferences.findWhat = "<" + planAdor.name + ">";
var textsToChangeToADOR = workDocument.findText ();
for (var
j=0;j<textsToChangeToADOR.length;++j)
textsToChangeToADOR[j].adorName
= planAdor.name;
}
}
The first line retrieves the list of ADOR Objects from the Plan, using the ADOR Objects property of the now associated Plan. It then iterates it. For each ADOR, it checks that its type is “text” by looking into its objectType property and checking if it is equal to a TEXTADOR which is a member of the ADORType enumeration.
For each such ADOR it uses the findText method of a document, which is a regular InDesign method. It looks for the text “<” + planAdor.name + “>”, which, for example, for the ADOR “FirstName” will look for “<FirstName>”.
The findText method returns a list of results, which are simply range objects in various text contents in the document. This list is iterated, and for each range object, its adorName value is set to the name of an ADOR Object in the Plan. adorName property for text range objects is an XMPie property that allows setting an ADOR Object reference to it, or querying for it.
After this part is finished, the document is now associated with all the text ADOR objects, as required.
Pack the Document as DPKG
To finish the task, the document is saved as a DPKG. Make sure to save the document prior to exporting the dpkg because the exporting process will revert the document to its initial state:
workDocument.Save();
app.createXmpiePackage (targetFileName,
File(targetFilePath),
XmpiePackageTypes.LAYOUT);
app.activeDocument.close(SaveOptions.NO);
The second line uses the XMPie scripting function createXmpiePackage in order to create a DPKG. The first parameter is the target DPKG file name. The second parameter is the folder path in which the DPKG file is created. The third parameter is the package type which is set to XmpiePackageTypes.LAYOUT, which is a DPKG. You can also pack to CPKG, or XLIM Document, as well as other possible XMPie packages.
The last line closes the document. Note that workDocument is no longer used. At this point, since the document is re-opened, it is invalid.
Done.
Scripting plug-in capabilities review
So, we learned that you can get and set the Plan object for a document, as well as iterate the ADOR objects over a Plan. We associated text ranges with text ADOR objects and created an XMPie DPKG. All of these capabilities are added via the scripting plug-in.
The following provides a review of everything that you can do with the plug-in. In the end of this document a complete reference is provided, so this is just a survey.
Document Plan
An InDesign document object has a Plan property once the XMPie plug-in is installed. For XMPie documents this property will refer to the Plan object. This Plan may be either embedded, or a linked Plan file. In either case you can use the Plan properties to iterate Plan objects. The Plan objects are available via 3 properties:
-
Plan ADOR Objects are available via plan.adors
-
Plan Variables are available via plan.variables
-
Plan fields (DB schema for recipient list are available via plan.planFields
In addition, the Plan primary field name can be retrieved via the plan.primaryField property.
All these properties make it possible for a person to write general scripts that manipulate Documents based on different Plans. By using Plan information queries one can write a script that, for example, assigns ADOR objects to a document in a pre-determined manner, as demonstrated by the example.
Document placeholders
Using scripting you can also query, add and modify document placeholders, which are the assignments of Plans into a document.
Various objects that can potentially have ADOR assignments to them, such as boxes, or layers, or text ranges, have the property adorName once the plug-in is installed. Through this property you can both get and set an ADOR reference. If the property value is an empty string it means that this object is not affected by an ADOR. Objects that can have a Style ADOR affecting them own the property styleADORName (such as boxes and text ranges).
For example, a layer can be assigned a Visibility ADOR, hence the following is valid:
app.activeDocument.layers[0].adorName = “myVisibilityADOR”;
where myVisibilityADOR is a name of a visibility ADOR.
It is also possible to query the document for its ADOR objects based on types. For example, you can get all Graphic ADOR placeholders by calling the following function:
Document.findGraphicAdors()
To find a specific ADOR usage (myADORName):
Document.findGraphicAdors(myADORName)
The return value is a list of page elements that either have Graphic ADOR Objects or Graphic ADOR Objects with a particular name.
Using similar methods, you can also find all usages of Visibility ADOR, as well as Object style ADOR Objects, with Document.findVisibilityAdors and Document.findStyleAdors. For more information, see Scripting reference.
Document.findVisibilityAdors()
Document.findStyleAdors()
The method for finding characters Style ADOR Objects and Text ADOR Objects is slightly different, and goes through the InDesign method of findText.
To look for Text ADOR usages, use this code:
app.findTextPreferences = NothingEnum.nothing;
app.findTextPreferences.adorName = "myADORName";
var textsToChangeToADOR = myDocument.findText();
The code sets up find preferences with the particular ADOR name for which we want to find usages, and then executes findText. In turn it will return a list of text ranges using this ADOR.
If you want to retrieve all texts that use ADOR Objects, set the adorName property of app.findTextPreferences to an empty string (“”).
The return values are text ranges, and you can check their adorName property to realize which ADOR Objects they use.
Using a similar method you can find Character Style ADOR usages. Instead of app.findTextPreferences.adorName = “myADORName”, use app.findTextPreferences.styleAdorName = “myStyleADORName”.
Package creation
Last but not least, you can create packages from an XMPie document that is currently the active document. The types of packages that you can create are the same as those that are available via the export option in the XMPie palette menu.
You do this using the createXmpiePackage method that the scripting plug-in adds to the application object. We used this method in the example script like this:
app.createXmpiePackage (targetFileName,
File(targetFilePath),
XmpiePackageTypes.LAYOUT);
As demonstrated then, the first parameter designates the package name, and the second is the folder path in which to place the package. The third parameter denotes the package type, which can be one of the values in the XmpiePackageTypes enumerator:
-
XmpiePackageTypes.CAMPAIGN – a CPKG, based on the InDesign template
-
XmpiePackageTypes.LAYOUT – a DPKG, based on the InDesign template
-
XmpiePackageTypes.PROOF – a Proof Set, for cases where the Plan is embedded in the Document. The Proof Set is generated based on the database link that is currently connected to the document, and the embedded Plan
-
XmpiePackageTypes.WEBCAMPAIGN – a Web Campaign CPKG. To be used in Hosted eMedia solutions. Contains only embedded Plan logic, without the document.
-
XmpiePackageTypes.XLIM – a XLIM layout Document representation of the InDesign document.
-
XmpiePackageTypes.XLIMCAMPAIGN – a CPKG, based on a XLIM representation of the InDesign document.
-
XmpiePackageTypes.XLIMLAYOUT – a DPKG, based on a XLIM representation of the InDesign document
Note that this method is available only with the desktop version of the scripting plug-in. So it is possible to execute a code that contains a call to it in uCreate Print environment, but not in uProduce.
Viewing the available commands and constructs
You can see which methods and objects exist in InDesign scripting model in general, and in particular what is added by XMPie, by using the Object Model Viewer of the Extendscript toolkit. When the application is open, press F1 to open the Object Model Viewer window. When the Object Model Viewer window opens select the latest InDesign version from the browser:
You can now review the various objects that are available by the scripting model. Note that both original and XMPie commands and objects exist, each with a reference and description.
How to run scripts at the desktop
Section Using the Scripting plug-in showed one way of running scripts in the desktop, namely the Extendscript toolkit. In the toolkit you can save the script to a JSX file for future use. You can also run scripts from InDesign.
To run scripts from InDesign:
-
Open InDesign, and open the Scripts panel:
-
Once opened, go to the User folder and right-click to open the location in Explorer:
-
Once the Explorer window is opened, copy the script file (JSX) into the Scripts panel sub-folder. The script will become visible in the Scripts panel.
-
Now, to run the scripts just double-click on the entry in the Scripts panel.
You can also run scripts on the desktop InDesign through application interfaces such as AppleScripts (on Mac) or COM Automation (On PC).
Running Scripts in uProduce
Running scripts on uProduce is possible because uProduce is using InDesign Server behind the scenes. Running scripts (with or without XMPie scripting commands) on the server can be done in 3 ways, which will be explained in this section:
-
Directly with InDesign server, via its port
-
As part of customization dials
-
As part of the “Custom Output” feature
Each method fits a different scenario, but all are common in being able to execute InDesign scripts.
Scripting plug-in installation and setup for uProduce
To install the scripting plug-in for uProduce you should:
-
Copy the scripting plug-in to XMPie plug-in folder on InDesign server.
Note that starting with CS6 the scripting plug-in for InDesign server is different from the desktop plug-in, and will have XMPScriptingYYYX64.apln structure to its name (where YYY is the InDesign CS version), noting that it is a 64 bit plug-in.The XMPie plug-ins folder location on InDesign server is similar to the desktop application location. In the case of CS6 that would be: <System Drive>:\Program Files\Adobe\Adobe InDesign CS6 Server x64\Plug-Ins\XMPie\
-
Install the scripting plug-in license key. This can be by way of activating the license key via the uProduce GUI:
-
Log in as “Admin”.
-
Press the Settings tab.
-
Press the License Manager tab at the Settings sidebar. The following window appears:
-
-
Get the activation key for the license key via the http://il.xmpie.com/activation/ site, by placing the scripting license key, and pressing Get Activation Key.
-
Back in the License Manager window, place the license key for the scripting plug-in, and the activation code. Press Install.
Done.
-
Running scripts directly with InDesign server
As part of InDesign server infrastructure, you can direct calls for InDesign server through SOAP protocol. Provided that the XMPie scripting plug-in is installed, those calls may contain XMPie script commands. Discussing this option is outside of the scope of this Document. Getting information about this option is possible via the InDesign Scripting SDK available from Adobe’s Web site - http://www.adobe.com/devnet/indesign/sdk.html.
Running scripts as part of Customization Dials
It is possible to run scripts as part of the customization behavior in uStore. Similarly, uProduce API users that utilize the customization feature can do the same. This allows you to extend the customization abilities beyond what is supported by XMPie ADOR Objects, and in fact customize a Document to any extent that is available through InDesing scripting. By also having the ability to affect XMPie objects, through the XMPie scripting plug-in, the options are quite limitless.
As an example for why you would want to run scripts as part of the customization process, consider that you wish to provide a box that is colored based on a variable/customizable color value. If you allow for a large quantity of color values (like the full RGB or CMYK scale) you cannot do so with regular Style ADOR Objects, however it is possible to script such a change. With the XMPie scripting plug-in you can customize the identity of an ADOR affecting a certain image box.
Running scripts through Customization Dials is possible by using ADOR Objects (which are customized). To run a script in the beginning of the job, and thus customize the Document for the production process, define two Text ADOR Objects in your Plan:
InitialScriptFileName
InitialScriptParameter
You should mark them as dials to make them visible as customization options in uStore. The customization value for InitialScriptFileName provides a script file (JSX) name reference (like myscript.jsx). This file should be placed adjacent to the InDesign Document on uProduce. To achieve that, you can place that JSX file next to the Document on the desktop environment, and once packed as DPKG or CPKG, uCreate Print will automatically pack the JSX file with the Document (it simply scans all JSX files placed next to the Document and packs them).
You can provide a parameter to the script, with which you can further parameterize the customization (other than the choice of customization script). You can later get the parameter in the script by using this code:
var custPatams = app.scriptArgs.getValue("CUST_PARAMS");
Note that in general those scripts DO NOT have to use the XMPie scripting plug-in commands, therefore you can use this option for customizing a Document even though you are not in possession of the scripting plug-in. However, to be able to query and setup ADOR Objects in the Document, or use any of the XMPie scripting commands, you must have the plug-in installed.
If you also wish to have a cleanup method, once the job finishes, for any actions carried out in the initial script you can define the following:
FinalScriptFileName
FinalScriptParameter
Similarly to the “Initial” scripts, the FinalScriptFileName denotes a name of a script file, and FinalScriptParameter is a parameter that can be passed to it for further parameterizing the cleanup action.
Running scripts as part of custom output feature
XMPie provides a feature to allow creating custom outputs, that are not supported by the regular XMPie output formats. The article 0026 Using the Custom Output Feature discusses this feature. Since it is based on InDesign scripting it can also use the XMPie scripting plug-in added functionality, provided that the scripting plug-in is installed. Note that any actions adding ADOR Objects during the main running script (the per-record script) will not be affective, because the ADOR Objects value population phase is passed by then. Therefore it only makes sense to either query ADOR Objects then, or set them up at the initial script.
Scripting reference
The following provides reference to the constructs and methods added by the scripting plug-in.
Application object
The application object (available via app) has the following additions through the scripting plug-in:
CreateXmpiePackage method
Application.createXmpiePackage(
name:
string ,
parentFolder:
File ,
packageType:
XmpiePackageTypes = XMPiePackageTypes.LAYOUT,
exportFonts:
Boolean = false)
Description
Exports the current Document as one of 7 XMPie package types.
Return value
Nothing
Parameters
name: string, The name of the package to be created
parentFolder: File, The folder to contain the package
packageType: XmpiePackageTypes, The package type (Optional)
exportFonts: Boolean, Export fonts and agree to terms and conditions (Optional)
XmpiePackageTypes is an enumerator with the following possible values:
-
XmpiePackageTypes.CAMPAIGN – a CPKG, based on the InDesign template
-
XmpiePackageTypes.LAYOUT – a DPKG, based on the InDesign template
-
XmpiePackageTypes.PROOF – a Proof Set, for cases where the Plan is embedded in the document. The Proof Set is generated based on the database link that is currently connected to the document, and the embedded Plan
-
XmpiePackageTypes.WEBCAMPAIGN – a Web Campaign CPKG. To be used in hosted eMedia solutions. Contains only embedded Plan logic, without the document.
-
XmpiePackageTypes.XLIM – a XLIM layout Document representation of the InDesign document.
-
XmpiePackageTypes.XLIMCAMPAIGN – a CPKG, based on a XLIM representation of the InDesign document.
-
XmpiePackageTypes.XLIMLAYOUT – a DPKG, based on a XLIM representation of the InDesign document
Note that this method is only available with the desktop version of the scripting plug-in.
findTextPreferences Properties
Application.findTextPreferences.styleAdorName: string
Application.findTextPreferences.adorName: string
Description
The styleAdorName and adorName properties of the findTextPreferences property of the application object set up ADOR placeholder search for a later Document.findText method call. styleAdorName should be set to a string value in order to look for text ranges with style ADOR references. Empty string value will set an all style ADOR placeholder search, while a non-empty value will look for a particular ADOR name. Similarly, adorName should be set to a string value to look for text ranges with text ADOR placeholder references. Make sure to call app.findTextPreferences = NothingEnum.nothing prior to setting the property to make sure all relevant search properties are nulled.
Document object
The Document object has 3 methods added through the scripting plug-in, and a “Plan” property.
findGraphicAdors Method
Document.findGraphicAdors(adorName:string = ””)
Description
findGraphicAdors retrieves graphic (image) placeholders. Passing empty string will retrieve all graphic placeholders. Passing a string will retrieve all placeholders where the ADOR object is used.
For each placeholder the object that contains them is retrieved, among other properties this object:
-
ADOR name (Document.findGraphicAdors()[i]. adorName)
-
Container ID (Document.findGraphicAdors()[i].id)
Return value
List of page items that contain graphic ADOR references
Parameters
adorName: string, Name of the ADOR Object that is being searched. If empty, will look for all Graphic ADOR placeholders.
findVisibilityAdors Method
Document.findVisibilityAdors(adorName: string=””)
Description
findVisibilityAdors retrieves visibility placeholders. Passing empty string will retrieve all visibility placeholders. Passing a string will retrieve all placeholders where the ADOR object is used.
For each place holder the object that contains them (either spread or layer) is retrieved. The returned object will have the following information, among the regular properties:
-
ADOR name (Document. findVisibilityAdors ()[i]. adorName)
-
Container (spread or layer item) ID (Document. findVisibilityAdors ()[i].id)
-
The layer name (if layer) (Document. findVisibilityAdors ()[i].name)
Return value
A list of layers and spreads that contain visibility ADOR references
Parameters
adorName: string, Name of the ADOR Object that is being searched. If empty, will look for all visibilty ADOR placeholders.
findStyleAdors Method
Document.findStyleAdors(adorName:string = ””)
Description
findStyleAdors retrieves object style placeholders. Passing empty string will retrieve all object style placeholders. Passing a string will retrieve all placeholders where the ADOR object is used.
For each place holder the object that contains them is retrieved, among other properties this object:
-
Style ADOR name (Document.findStyleAdors()[i]. styleAdorName)
-
Container ID (Document.findStyleAdors()[i].id)
Return value
List of page items that contain object style ADOR references
Parameters
adorName: string, name of ADOR to look references for. If empty, will look for all object style ADOR placeholders.
plan Property
Document.plan
Description
The document plan property contains a reference to the Plan object of the document. If it is an XMPie document it will be a none-null. The Plan object information may be retrieved whether the Plan is embedded or not.
The Plan object has the following properties:
-
filePath: File
Both set and get property for the Plan file path (in case it is an external Plan). Plan may be set up through this property.
-
ADOR Objects: ADOR Objects
List of Plan ADOR Objects. For each ADOR Object the following properties are available:
-
name: string, ADOR name
-
dial: bool, indication of Dial property
-
rule: string, Plan expression for this ADOR Object
-
annotation: string, description for this ADOR Object
-
objectType: ADORTypes, type of ADOR. Can be one of:
-
ADORTypes.GRAPHICADOR - Graphic ADOR Object
-
ADORTypes.STYLEADOR - Style ADOR Object
-
ADORTypes.TABLEADOR - Table ADOR Object
-
ADORTypes.TEXTADOR - Text ADOR Object
-
ADORTypes.TEXTFILEADOR - Text file ADOR Object
-
ADORTypes.VISIBILITYADOR - Visibility ADOR Object
-
-
variables: Variables
List of Plan variables. For each variable the following properties are available:
-
name: string, Variable name
-
dial: bool, indication of Dial property
-
rule: string, Plan expression for this variable
-
annotation: string, description for this ADOR Object
-
objectType: VariableObjectTypes, type of Variable. Can be one of:
-
VariableObjectTypes.BOOLEANVAR – Boolean
-
VariableObjectTypes.DATEVAR - Date
-
VariableObjectTypes.NUMBERVAR - Number
-
VariableObjectTypes.TEXTVAR - Text
-
-
-
PlanFields: PlanFields
List of Plan field, that is the Recipient list schema fields. For each field the following properties are available:
-
name: string, field name
-
objectType: FieldObjectTypes, type of Variable. Can be one of:
-
FieldObjectTypes.BOOLEAN – Boolean
-
FieldObjectTypes.DATE - Date
-
FieldObjectTypes.NUMBER - Number
-
FieldObjectTypes.TEXT - Text
-
-
-
primaryField:string
Name of primary field.
styleAdorName and adorName properties
Objects that can have placeholders will have adorName or styleAdorName properties. adorName is used to designate a reference to an ADOR object that is Visibility, Text or Image. styleAdorName is used to designate a Style ADOR. You can both get and set these properties, in order to query an ADOR reference, or attach an ADOR to an object. You can use these properties to set the following ADOR Objects:
-
Visibility ADOR Objects (using the adorName property of a spread or a layer)
-
Text ADOR/Text File ADOR (using the adorName property of a text range)
-
Style ADOR (either text style or object style. Use the styleADORName property of either a box or a text range, accordingly)
-
Graphic ADOR (using the adorName property of a graphic box)
Story object
Story objects (the objects in InDesign that represent a complete text content stream that uses one or more text frames to appear in) can have two extra properties, with the scripting plug-ins:
Story.suppressTrailingSpaces
A boolean value that determines whether trailing spaces are suppressed in case ADOR Objects are empty.
Story.suppressEmptyTables
A boolean value that determines whether table headers/footers are to be removed in case dynamic tables are empty.
Story.copyFitting
A boolean value that determines whether copy fitting will get a default value. Default values are overflow and font size.
Note that these properties are available only for the desktop version of the scripting plug-in.
Created by: Gal Kahana, last updated: April 30, 2020