Adobe InDesign CS4 Scripting Guide: JavaScript

the rules of XML, a new scripting feature that makes working with XML InDesign faster and easier. We assume you already read Adobe InDesign ….

More PDF Content

Adobe InDesign CS4 Scripting Guide: JavaScript
How to Use the Scripts in This Document … 7
About the structure of the scripts … 7
For More Information … 8
Scripting Features … 9
Script preferences … 9
Getting the current script … 10
Script versioning …
Targeting …
Compilation …
Interpretation …
Using the doScript method … 11
Sending parameters to doScript … 12
Returning values from doScript … 12
Controlling Undo with doScript … 14
Working with script labels … 14
Running scripts at start-up … 15
Session and main script execution … 16
Documents … 17
Basic document operations …
Creating a new document …
Opening a document …
Saving a document …
Closing a document …
Basic page layout …
Defining page size and document length …
Defining bleed and slug areas …
Setting page margins and columns …
Changing the appearance of the pasteboard …
Guides and grids …
Changing measurement units and ruler …
Defining and applying document presets …
Setting up master spreads …
Adding XMP metadata …
Creating a document template …
Printing a document …
Printing using page ranges …
Setting print preferences …
Printing with printer presets …
Exporting a document as PDF …
Exporting to PDF …
Setting PDF export options …
Exporting a range of pages to PDF …
Exporting individual pages to PDF …
Exporting pages as EPS …
Exporting all pages to EPS …
Exporting a range of pages to EPS …
Exporting as EPS with file naming …
Working with Page Items … 45
Creating Page Items … 45
Page Item Geometry … 46
Grouping Page Items … 48
Duplicating and Moving Page Items …
Creating Compound Paths …
Using Pathfinder Operations …
Converting Page Item Shapes …
Arranging Page Items …
Transforming Page Items …
Using the transform method …
Working with transformation matrices …
Coordinate spaces …
Transformation origin …
Resolving locations …
Transforming points …
Transforming again …
Resize and Reframe … 59
Text and Type … 60
Entering and importing text …
Creating a text frame …
Adding text …
Stories and text frames …
Replacing text …
Inserting special characters …
Placing text and setting text-import preferences … 63
Exporting text and setting text-export preferences … 67
Understanding text objects …
Working with text selections …
Moving and copying text …
Text objects and iteration …
Working with text frames …
Linking text frames …
Unlinking text frames …
Removing a frame from a story …
Splitting all frames in a story …
Creating an anchored frame …
Formatting text …
Setting text defaults …
Working with fonts …
Applying a font …
Changing text properties …
Changing text color …
Creating and applying styles …
Deleting a style …
Importing paragraph and character styles …
Finding and changing text …
About find/change preferences …
Finding and changing text …
Finding and changing text formatting …
Using grep …
Using glyph search …
Working with tables … 95
Path text … 98
Autocorrect … 98
Footnotes … 98
Setting text preferences … 99
User Interfaces … 100
Dialog overview … 100
Your first InDesign dialog … 101
Adding a user interface to “Hello World” … 102
Creating a more complex user interface … 102
Working with ScriptUI … 105
Creating a progress bar with ScriptUI … 105
Events … 107
Understanding the event-scripting model … 107
About event properties and event propagation … 109
Working with eventListeners … 110
An example “afterNew” eventListener … 112
Sample “beforePrint” eventListener … 114
Menus … 116
Understanding the menu model … 116
Localization and menu names … 118
Running a menu action from a script … 119
Adding menus and menu items … 119
Menus and events … 120
Working with scriptMenuActions … 121
A more complex menu-scripting example … 122
XML … 128
Overview … 128
The best approach to scripting XML in InDesign? … 128
Scripting XML elements … 129
Setting XML preferences … 129
Setting XML import preferences … 129
Importing XML … 130
Creating an XML tag … 130
Loading XML tags … 131
Saving XML tags … 131
Creating an XML element … 131
Moving an XML element … 131
Deleting an XML element … 131
Duplicating an XML element … 132
Removing items from the XML structure … 132
Creating an XML comment … 132
Creating an XML processing instruction … 132
Working with XML attributes … 133
Working with XML stories … 133
Exporting XML … 134
Adding XML elements to a layout … 134
Associating XML elements with page items and text … 134
Marking up existing layouts … 136
Applying styles to XML elements … 138
Working with XML tables … 139
XML Rules … 141
Overview … 141
Why use XML rules? … 142
XML-rules programming model … 142
XML rules examples … 148
Setting up a sample document … 148
Getting started with XML rules … 149
Changing the XML structure using XML rules … 153
Duplicating XML elements with XML rules … 154
XML rules and XML attributes … 155
Applying multiple matching rules … 157
Finding XML elements … 158
Extracting XML elements with XML rules … 161
Applying formatting with XML rules … 162
Creating page items with XML rules … 165
Creating tables using XML rules … 166
Scripting the XML-rules processor object … 167

Download Adobe InDesign CS4 Scripting Guide: JavaScript pdf from www.dreamweaverultradev.info, 168 pages, -KB.
Related Books

Leave a Reply