1.4
Table Of Contents
- Table of Contents
- Welcome to PlanetPress Connect 1.4.2
- Setup And Configuration
- DataMapper Module
- The Designer
- Mark Position Options
- Additional Text Settings
- Additional Image Settings
- Barcode Options
- Codabar Settings
- Code 128 Settings
- Code 39 Settings
- Additional Datamatrix Settings
- Additional EAN 128 Settings
- Additional EAN 13 Settings
- Additional EAN 8 Settings
- Additional Interleave 2 of 5 Settings
- Additional PDF417 Settings
- Additional QR Code Settings
- Additional UPC A Settings
- Additional UPC E Settings
- Additional OMR Mark Settings
- Keystore
- PDF Signature
- Copyright Information
- Legal Notices and Acknowledgements
Next, the script can modify the selected pieces of content, using values from the record that is
merged to the template at the time the script runs. It can, for example, hide, replace or add text
or change the style of those pieces of content. This is how scripts personalize documents.
Creating a new script
Writing a script starts with this procedure:
1.
On the Scripts pane at the bottom left, click New. A new script appears in the list. Double-
click on it to open it.
2. Change the name of the script, so that it reflects what the script does.
3.
Choose which kind of selector you want to use. Running a script starts with searching the
template for pieces of content that match the script's selector. The collected pieces of
content are passed on to the script, so that the script can modify them.
The selector can be:
l
Text, for example: @lastname@, or {sender}. The text doesn't have to have any
special characters, but special characters do make them easier to recognize for
yourself. In the Script Wizard, click Text and type the text to find.
l
A selector (HTML/CSS):
n HTML elements of a certain type, such as a paragraph: <p>. In the script
Wizard, click Selector and type the HTML tag without the angle brackets: p.
n HTML elements with a specific CSS class (.green). In the script Wizard, click
Selector and type the class name, including the preceding dot: .green.
n An HTML element with a specific ID (#intro). In the script Wizard, click
Selector and type the ID, including the preceding #: #intro.
In an HTML file, each ID should be unique. This means that a particular ID can
be used only once in each section.
n Etcetera. See http://www.w3schools.com/cssref/css_selectors.asp for more
selectors and combinations of selectors.
l
A selector and text. This is text inside an HTML element (or several HTML
elements) with a specific HTML tag, CSS class or ID. In the script Wizard, click
Selector and Text.
Tip
When output speed matters, choose selector or selector and text. Searching text
Page 377