User Guide Version: 1.
User Guide Version 1.8 Last Revision: 2018-04-09 Objectif Lune, Inc. 2030 Pie-IX, Suite 500 Montréal, QC, Canada, H1V 2C8 +1 (514) 875-5863 www.objectiflune.com All trademarks displayed are the property of their respective owners. © Objectif Lune, Inc. 1994-2018. All rights reserved. No part of this documentation may be reproduced, transmitted or distributed outside of Objectif Lune Inc. by any means whatsoever without the express written permission of Objectif Lune Inc.
Table of Contents Table of Contents 4 Welcome to PlanetPress Connect 1.
MySQL Compatibility PostScript Print Presets Available Printer Models External Resources in Connect Using Capture After Installing Workflow 8 Capturing Spool Files After Installing Workflow 8 Colour Model in Stylesheets Image Preview in Designer Merge\Weaver Engines when Printing REST Calls for Remote Services Print Content and Email Content in PlanetPress Workflow Print Limitations when the Output Server is located on a different machine VIPP Output Server Configuration Settings Scheduling Preferences Serv
Using the wizard for CSV and Excel files Using the wizard for databases Using the wizard for PDF/VT and AFP files Using the wizard for XML files Data mapping workflow Creating a data mapping workflow Testing the extraction workflow Data source settings Extracting data Steps The Data Model Creating a Data Model Editing the Data Model Using the Data Model Fields Detail tables Data types Data Model file structure DataMapper User Interface Keyboard shortcuts Menus Panes Example Settings for location-based field
PDF File CSV File XML File JavaScript Toolbar Welcome Screen DataMapper Scripts API Using scripts in the DataMapper Setting boundaries using JavaScript Objects Example Example Examples Example Example Example Examples Examples Example Example Example Text XML Functions The Designer Designer basics Features Templates Contexts Sections Print Copy Fit Creating a Print template with a Wizard Print context Print sections Pages Master Pages 245 247 247 249 249 251 252 255 257 262 266 268 271 273 274 276 279 282
Media Email Designing an Email template Creating an Email template with a Wizard Email context Email templates Email header settings Email attachments Web Creating a Web template with a Wizard Web Context Web pages Forms Using Form elements Using JavaScript Capture OnTheGo COTG Forms Creating a COTG Form Filling a COTG template Testing the template Sending the template to the Workflow tool Using COTG data in a template Designing a COTG Template Capture OnTheGo template wizards Using Foundation COTG Elements
Selecting an element Deleting an element Styling and formatting an element Barcode Boxes Business graphics COTG Elements Date Forms Form Elements Hyperlink and mailto link Images Table Text and special characters Snippets Adding a snippet to the Resources Adding a snippet to a section Creating a snippet JSON Snippets Styling and formatting Local formatting versus style sheets Layout properties Styling templates with CSS files Styling text and paragraphs How to position elements Rotating elements Styling a t
Dynamic images Dynamic tables Snippets Scripts Loading data Variable Data Formatting variable data Showing content conditionally Conditional Print sections Dynamic Images Dynamic table Personalized URL Writing your own scripts Script types Creating a new script Writing a script Managing scripts Testing scripts Optimizing scripts Loading a snippet via a script Loading content using a server's RESTful API Control Scripts The script flow: when scripts run Selectors in Connect Designer User Interface Dialogs Ke
Examples Examples Examples Examples Examples Examples Examples Examples Examples Examples Examples Examples Example Example Example Example Example Examples Creating a table of contents Example Examples Examples Examples Examples Replace elements with a snippet Replace elements with a set of snippets Example Example Creating a Date object from a string Control Script API Examples Generating output Print output Email output Web output Optimizing a template Scripts 883 884 886 889 889 890 892 892 894 895 895
Images Generating Print output Saving Printing options in Print Presets Connect Printing options that cannot be changed from within the Printer Wizard Print Using Standard Print Output Settings Print Using Advanced Printer Wizard Adding print output models to the Print Wizard Splitting printing into more than one file Print output variables Generating Fax output Generating Tags for Image Output Generating Email output Email output settings in the Email context and sections Generating Email output from Conne
Overview OL Connect Send Connect 1.6.1 General Enhancements and Fixes Connect 1.6.1 Designer Enhancements and Fixes Connect 1.6.1 DataMapping Enhancements and Fixes Connect 1.6.1 Output Enhancements and Fixes Connect Workflow 8.6 Enhancements and Fixes Known Issues Overview Connect 1.5 Designer Enhancements and Fixes Connect 1.5 DataMapping Enhancements and Fixes Connect 1.5 Output Enhancements and Fixes Connect 1.5 General Enhancements and Fixes Connect 8.
Welcome to PlanetPress Connect 1.8 Note Since we are always looking for new ways to make your life easier, we welcome your questions and comments about our products and documentation. Use the feedback tool at the bottom of the page or shoot us an email at doc@ca.objectiflune.com. PlanetPress Connect is a series of tools designed to optimize and automate customer communications management. They work together to improve the creation, distribution, interaction and maintenance of your communications.
Setup And Configuration This chapter describes the PlanetPress Connect installation and the different considerations that are important in regards to the installation and use of PlanetPress Connect. l "System and Hardware Considerations" below l "Installation and Activation" on page 28 l "Known Issues" on page 79 l "Server Configuration Settings" on page 84 l Uninstalling System and Hardware Considerations There are a variety of considerations to be aware of.
IT managers and IT professionals then may decide the anti-virus strategy to follow for their internal requirements and needs depending on the statements outlined herein. Directories and folders Main installation folder All Connect applications are installed under an arbitrarily selectable main folder. We will speak of the "Installation Target" in the following. This installation target will hold the executables and required files and folders for the operation of the whole product suite.
the responsible person for the computer protection has to decide about the monitoring of such temporary folders following the company guidelines. Database 2 Another database instance for Connect will be hold and used under the folder, which is intended to hold data, accessible by and for all users. The path to this folder is stored in the standardized system variable %PROGRAMDATA%. The Connect database instance is located in the subfolder "Connect\MySQL".
l l l The MySQL account must have access to all permissions using the GRANT Command, including creating databases. The database configuration must include the options detailed in the "Using the MySQL Instance from the Installer" on the previous page topic above. The SQL instance must be open to access from other computers. This means the bindaddress option should not be set to 127.0.0.1 or localhost.
Objectif Lune Inc. will take no responsibility for database connections to any but the supplied MySQL database. Note Since PlanetPress Connect version 1.6 the minimum required version of the MS SQL Server is SQL Server 2012. l l l When MS SQL is selected, the default values for root user are sa and 1433 for the port.
l If local MySQL is added to an installation, the usual MySQL Configuration page with default values will be displayed. If the user has installed the Installer Supplied MySQL and then switches to an external Microsoft SQL by using the Server Configuration Tool, the supplied MySQL cannot be switched off. By design the installer adds a service dependency between Connect Server and the supplied MySQL service. Note The Microsoft SQL selection capability will be available only with 1.6 version and upwards.
l l IF there should possibly be available some foreign MySQL instance, which could be used intermediately, then this should be selected during the setup. This ensures, that no stuff gets installed. Otherwise the supplied MySQL needs to be installed and the switch to Microsoft SQL needs to be done as outlined above. It is not possible to uninstall the supplied MySQL in this case via a Connect 1.5 modify. Important If a Server Product and a MySQL Product were selected to be installed on Connect 1.5.
Environment Considerations Virtual Machine Support PlanetPress Connect supports VMWare Workstation, VMWare Server, VMWare Player, VMWare ESX (including VMotion), Microsoft Hyper-V and Microsoft Hyper-V/Azure infrastructure environments as software installed on the Guest operating system. Warning Copying (duplicating) a Virtual Machine with Connect installed and using both images simultaneously constitutes an infringement of our End-User License Agreement.
Antivirus Considerations l l Antivirus software may slow down processing or cause issues if they are scanning in temporary folders or those used by PlanetPress Connect. Please see KB-002: Antivirus Exclusions for more information. Antivirus software might interfere with installation scripts, notably a vbs script to install fonts. McAfee, in particular, should be disabled temporarily during installation in order for MICR fonts to install and the installation to complete successfully.
Language and Encoding Considerations Please note the following considerations: l Language: l PlanetPress Connect is currently offered in several languages. These languages can be switch between via the Preferences dialog. The current languages include: l English l French l German l Spanish l Italian l Korean l Portuguese l Chinese (Simplified) l Chinese (Traditional) l Japanese. The default language is English.
Firewall/Port considerations For Firewall/Port considerations, please see this article in the Knowledge Base: Connect Firewall/Port Configuration Performance Considerations This page is a comprehensive guide to getting the most performance out of PlanetPress Connect as well as a rough guideline to indicate when it's best to upgrade. Performance Analysis Details In order to get the most out of PlanetPress Connect, it is important to determine how best to maximize performance.
For each engine, it's necessary to modify the .ini file that controls its JAVA arguments. Edit as follows: l l l l For the Merge Engine: see C:\Program Files\Objectif Lune\OL Connect\MergeEngine\Mergeengine.ini For the Weaver Engine: see C:\Program Files\Objectif Lune\OL Connect\weaverengine\Weaverengine.ini The parameters are -Xms640m for the minimum RAM size, -Xmx640m for the maximum RAM size. Explaining Java arguments is beyond the scope of this document.
High-performance hardware The following is suggested when processing speed is important. Before looking into Performance Packs to enhance performance, ensure that the below requirements are met. l l l l MySQL Database on a separate machine. MySQL's main possible bottleneck is file I/O, and as such a high-performance setup will require this server to be on a separate machine, ideally with a high-performance, low-latency hard drive. A Solid State Drive (SSD) would be recommended. High-Quality 16+ GB Ram.
Note Windows 8.0, Windows XP, Windows 2003 and older versions of Windows are not supported by PlanetPress Connect. Minimum Hardware Requirements l NTFS Filesystem (FAT32 is not supported) l CPU Intel Core i7-4770 Haswell (4 Core) l 8GB RAM (16GB Recommended) l Disk Space: At least 10GB (20GB recommended) Note For tips and tricks on performance, see "Performance Considerations" on page 25.
l l If you are a Customer, the installers can be downloaded from the Objectif Lune Web Activations page: http://www.objectiflune.com/activations If you are a Reseller, the installers can be downloaded from the Objectif Lune Partner Portal: http://extranet.objectiflune.
l l In order to use the automation features in Version 1.8, PlanetPress Workflow 8 will need to be installed. This can be installed on the same machine as an existing PlanetPress® Suite 7.6 installation or on a new computer. For more information, please see Information about PlanetPress Workflow 8. As with any JAVA application, the more RAM available, the faster PlanetPress will execute! Users of Connect 1.1 In order for users of PlanetPress Connect 1.
User accounts and security Permissions for PlanetPress Connect Designer PlanetPress Connect Designer does not require any special permissions to run besides a regular program. It does not require administrative rights and only needs permission to read/write in any folder where Templates or Data Mapping Configurations are located. If generating Print output, PlanetPress Connect Designer requires permission on the printer or printer queue to send files.
Installation The Connect installer puts all required files, folders, registry entries and much more to their correct places and locations. As many of these locations are protected against malicious accesses, that very user under whose context the Connect installation is started and running, needs very extensive rights on the respective computer. This user must belong to the Local Administrators group on that machine.
to create documents or also to run some tasks will be already available (installed by the installer) or be accessible in a way, where no specific credentials are required. However some tasks like starting an email campaign will possibly require a respective account at a mail server. But this has generally nothing to do with the credentials of the Designer user.
updates are confirmed as being up to date, then complete the following steps: 1. Go to https://certs.godaddy.com/repository and download the following two certificates to copy to the offline machine: l l GoDaddy Class 2 Certification Authority Root Certificate - G2 - the file is gdrootg2.crt GoDaddy Secure Server Certificate (Intermediate Certificate) - G2 - the file is gdig2.crt 2. Install the certificates: Right mouse click -> Install Certificate, and follow the steps through the subsequent wizard. 3.
4. Click the OK button to close the dialog. 5. Re-start the computer. Installation Wizard Starting the PlanetPress Connect installer The PlanetPress Connect installer may be supplied as an ISO image or on a DVD.
l l l PlanetPress Connect Designer: The Designer module (see "The Designer" on page 302). It may be used as a standalone with no other installed modules, but it will not have certain capabilities such as automation and commingling. PlanetPress Connect Server: The Server back-end giving capabilities such as automation, commingling, picking. It saves all entities generated from the Automation module into a database for future use.
l Source repository location: Displays the path where the installation files are located. This can be a local drive, installation media, or a network path. Selection Confirmation The next page confirms the installation selections made. Click Next to start the installation itself. End User License Agreement The next page displays the End User License Agreement, which needs to be read and accepted before clicking Next.
If the password is subsequently forgotten, then the MySQL product must be uninstalled and its database deleted from disk before attempting to reinstall. l l Confirm 'root' Password: Re-enter to confirm the password. Both passwords must match for installation to continue. TCP/IP Port Number: The port on which MySQL will expect, and respond to, requests. A check is run to confirm whether the specified TCP\IP Port Number is available on the local machine.
Configuring External Database Connection The Database Connection page appears if the supplied MySQL Product module was not selected for installation. This page is for setting up the connection to the existing External database. l l l l l l l Database Configuration: Select the database type to use for the PlanetPress Connect Engine. Currently only MySQL and Microsoft SQL Server are supported. Administrator Username: Enter the username for a user with administrative rights on the database.
l Run Server as: Defines the machine username and password that the PlanetPress Connect Server module's service uses. Note The "Server Security Settings" on page 90 dialog can only ever be executed from the user specified here. l l l Username: The account that the service uses to login. If the machine is on a domain, use the format domain\username. This account must be an existing Windows profile with local administrator rights. Password: The password associated with the selected user.
Click “Yes” to install or open the Product Update Manager where the frequency with which the updates can be checked and a proxy server (if required) can be specified. Note: if the Product Update Manager was already installed by another Objectif Lune application, it will be updated to the latest version and will retain the settings previously specified. Select the desired options and then click OK to query the server and obtain a list of any updates that are available for your software.
The required properties file has the following attributes: l Comment Lines, starting with # (e.g. # The options to configure an external database) l Key = Value pairs (e.g. install.product.0 = Connect Designer) For supported keys, please refer to the next paragraph. Note install.properties file notation must follow commons configuration rules. Please refer to Properties files for more details. Required and optional properties Required properties depend on the specified product.
Verbose logging (optional) By default, the Silent Installer will log the same way as the GUI installer. That means logging of error and warnings, and certain information during database configuration. A more verbose logging can be switched on by using logging.verbose = true. Product selection (optional) By default, if nothing is entered for the products to be installed (install.product.
Database configuration Case 1: MySQL is among the selected Connect products to be installed (new MySQL installation) If MySQL is selected and there is no previous MySQL configuration on the machine, the following properties should be defined: database.password = (required and must meet the rules) database.port = (3306 is the default port value) database.
2a: Configuring an external MySQL database To configure an external MySQL database, the following properties should be defined: database.type = mysql (required) database.host = (default value is localhost, otherwise required) database.port = (default value is 3306, otherwise required) database.username = (default value is root, otherwise required) database.password = (required) database.
In Silent Installer mode, the installation process looks for the property product.repository in the install.properties file and then proceeds with the following steps: 1. If the property exists, and its value contains an existing file location with a repository, the installer will attempt to install from that repository. 2. If the property exists, and its value starts with http://, the installer will attempt to install from that location. It will fail if no repository can be found at this location. 3.
l ja-JP (Japanese, Japan) l zh-CN (Chinese, China) l zh-HK (Chinese, Hongkong) l zh-MO (Chinese, Macau) l zh-TW (Chinese, Taiwan) l it-IT (Italian, Italy) l pt-BR (Portuguese, Brazil) l es-419 (Spanish, Latin America) Locale selection by defining user.language and user.country If both user.language and user.country are defined in the install.properties file, the combination must match exactly one of the supported locales, otherwise the Installer will exit with an error. For example, user.
3. As last resort, the first Locale in the preinstall.ini is selected (usually that should be enUS). Getting the exit code of a silent installation If getting the exit code of a silent installation is desirable, use the following procedure. 1. Create a new local folder on the machine (or VM) on which Connect shall be installed and copy/extract the contents of the Connect ISO into this folder. 2. Open a command prompt with Administrator privileges and cd into this local folder. 3.
Sample batch file @echo off preinstall.exe if errorlevel 10 goto err_installer if errorlevel 2 goto err_unknown if errorlevel 1 goto err_preinstall echo Success goto:eof :err_installer echo "Installer error - see OL_Install_.log" goto:eof :err_unknown echo "Unknown preinstall error - see preinstall_err.log" goto:eof :err_preinstall echo "Preinstall error - see preinstall_err.
l Open the Start Menu l Click on All Programs, then Objectif Lune, then PlanetPress Connect l Open the PlanetPress Connect Designer [version] shortcut. l When the application opens, if it has never been activated or the activation has expired, the Software Activation dialog appears: l License Information subsection: l l l l l l l l l l Name: Displays the name of the application or module relevant to this activation.
Note The Software Activation dialog can also be reached through a shortcut located in All Programs, then Objectif Lune, then PlanetPress Connect and is named Software Activation. Since it does not load the software, it is faster to access for the initial activation.
Activating PlanetPress Connect To activate PlanetPress Connect, simply save the license file somewhere on your computer where you can easily find it, such as on your desktop. You can then load the license by doubleclicking on it, or through the start menu: l Open the Start Menu l Click on All Programs, then Objectif Lune, then PlanetPress Connect l Open the PlanetPress Connect Designer [version] shortcut.
l Environment Considerations l Installation Pre-Requisites l Antivirus Exclusions Downloading and Installing the Software In order to migrate to a new workstation, the software must already be installed on the new workstation. Follow the Installation and Activation Guide to download and install the newest version of PlanetPress Connect on the new workstation.
l l l l l l l l l l The Workflow configuration file itself is named ppwatch.cfg, and is backed up with the folders. However, it needs to be re-sent to the Service to be used. To do this, rename the file to .OL-Workflow, open the file with the Workflow tool, and send the configuration. Locate Custom Plugins (.dll) from the below folder on the old workstation and import them onto the new workstation C:\Program Files (x86)\Common Files\Objectif Lune\PlanetPress Workflow 8\Plugins To import the plugin
l l Click on Tools in the Workflow Configuration menu bar l Click on Access Manager l Grant necessary permissions to remote machines l Restart the Workflow Messenger service Reconfigure the Workflow Preferences as previously by clicking on the Workflow button on top left corner and clicking on Preferences: l l l l Reconfigure the Server Connection Settings under Behavior > OL Connect For PlanetPress Capture users, reconfigure the PlanetPress Capture options under Behavior > PlanetPress Capture
l l l l OL Connect Designer Templates, DataMapper or Package files, copied from the folder where they reside. All Postscript, TrueType, Open Type and other host based fonts used in templates must be reinstalled on the new workstation. Import all dynamic images and make sure their paths match those in the old server. Make sure the new workstation can also access network or remote images, JavaScript, CSS, JSON, and HTML resources referenced in the Connect templates.
PlanetPress Capture options under Behavior >PlanetPress Capture > Use ODBC Database l Start the Messenger 8 service on new server from the Workflow menu bar > Tools > Service Console > Messenger > right-click and select Start. OL Connect Send • Re-install OL Connect Send on the new Workstation.
l l C:\Program Files\Objectif Lune\OL Connect\weaverengine\weaverengine.ini Now start the OLConnect_Server service Configuring the Server Extensions In the case where the OLConnect MySQL is installed on the new Master Server, it is important to reconnect all Server Extension systems to the new Master Server.
To apply the license file received from the Activation Team: l Start the PReS Connect, PlanetPress Connect or PrintShopMail Connect Software Activation module: C:\Program Files\Objectif Lune\OL Connect\Connect Software Activation\ SoftwareActivation.exe l Click on Load License File to import the license.OLConnectLicense l Start the Software Activation module on the Extension servers, where applicable l Click on Load License File to import the above same license.
PlanetPress Workflow 8 can be installed in parallel on the same machine as an existing PlanetPress® Suite 7.x installation. Note however: l l l l l If both versions need to be hosted on the same machine, PlanetPress Workflow 8.8 must always be installed after the legacy PlanetPress® Suite 7.x installation. When uninstalling PlanetPress Workflow 8.8, you may be prompted to repair your legacy PlanetPress® Suite 7.x installation. If PlanetPress Workflow 8.
This migration benefits existing users in many ways and has limited impact on their current processes and how they use PlanetPress Suite version 7 and 6. This document provides information on the migration process and the requirements and considerations for existing PlanetPress Suite users to upgrade to the latest generation of our products. Note PlanetPress Connect Print-Only is available for existing users of PlanetPress version 7 or 6 with a valid OL Care agreement.
IMPORTANT: PlanetPress Connect does not contain the PlanetPress Design 7. GOOD NEWS: PlanetPress Connect does not need any printer licenses to print from PlanetPress Connect or PlanetPress Suite. It can also print PrintShop Mail 7 and PReS Classic documents if these programs are licensed. You can keep everything you have The first thing to know is that you can keep your current PlanetPress Suite Workflow 7 configuration and your PlanetPress Suite Design documents.
l You want to use a more powerful computer with more RAM and more cores to run the Server to achieve maximum performance.
Upgrade to the full multi-channel version and expand onto the Web If you choose to take the optional “multi-channel” upgrade, you can start right away to reuse the content of your existing documents and map it onto responsive documents that can be sent by email in full HTML glory and/or make them available as native HTML web pages using the latest CSS/JavaScript features. IMPORTANT: If you owned them, you must also upgrade your Imaging modules to use the new PReS version.
l Access manager configuration l Custom plug-ins l PlanetPress Fax settings l PlanetPress Image settings l PlanetPress Search profiles l Printer activation codes l PlanetPress Capture database l PlanetPress Capture pen licenses l Custom scripts l Content of your virtual drive l PlanetPress Messenger configuration 4. If you installed PlanetPress Workflow 8.
6.
7. Then select the product from which you wish to upgrade: 8.
9.
10. After that you will need to get the activation file for your product. To obtain your activation, download the PlanetPress Connect installer from the Web Activation Manager, follow the instructions for the installation using the serial number provided to you. You can activate your license through the Web Activation Manager. 11.
How to perform a Workflow migration What do you need to consider when upgrading from PlanetPress Suite 7 to PlanetPress Connect Workflow 8.8 on a new computer? Installing and Activating Workflow 8.8 on a new computer Points to consider: l l l l Before installing, be sure to read the Installation and Activation Guide. There you will find detailed Connect Workflow installation steps as well as system requirements, notes on license activation and much more.
then activate all of your printers on the new computer. l l Login to our Web Activation Manager (www.objectiflune.com/activations) using your customer number and password to get your Printer Activation Codes. If you do not have access to the computer in which PlanetPress Suite was previously installed, print a Status Page for each printer from your Connect Workflow 8 Configuration. Do this via the Tools > Printer Utilities menu option.
2. Copy all the PlanetPress Suite 7 Documents and Compiled forms (*.ptk and *.ptz) from the Documents folder on the PlanetPress Suite computer and paste them into the equivalent folder on the Connect Workflow Computer. The PlanetPress Suite 7 folder would be "C:\ProgramData\Objectif Lune\PlanetPress Suite 7\PlanetPress Watch\Documents". The PlanetPress Connect Workflow 8 folder will be "C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PlanetPress Watch\Documents" 3.
Alternatively, you can download custom plug-ins from this link onto the new computer. Once you've copied your PlanetPress Suite Workflow configurations to Connect Workflow, you can confirm their availability through the Plug-in Bar Uncategorized category. There you will find all the Custom plug-ins that have been installed. Missing plug-ins will be represented in Workflow steps through the use of a "?" icon. Such as in the following image, which shows that the "TelescopingSortPlugin" is not installed.
l l l If you are using images from a virtual drive, copy the entire contents of "C:\ProgramData\Objectif Lune\PlanetPress Suite 7\PSRIP" and paste them onto the new computer here: "C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PSRIP". Make sure to set the user who will run the PlanetPress Services. This is done by going into Tools/Configure services. The user will need to have local administration rights in order to be able to run the services. For more information, see Users and Configurations.
Note It is recommended that you first update your PlanetPress Suite to version 7.6 before cross-grading to PlanetPress Connect. Using PlanetPress Connect Workflow 8.8 on the same computer as PlanetPress Suite 7.6 Steps to migrate: 1. Update existing installation to PlanetPress Suite version 7.6 if not already done. 2. Install PlanetPress Connect Workflow 8.8 on the same computer. 3. Do the following for both PlanetPress Suite version 7.6 and PlanetPress Connect Workflow 8. 1. Open Workflow Service Console.
Note Prior to PlanetPress Suite 7.6, all Capture patterns, documents and several other details were contained within the one single database. As of PlanetPress Suite 7.6 a separate database has been used for the patterns alone (PPCaptureDefault.mdb). 5. Copy the contents of this folder: "C:\ProgramData\Objectif Lune\PlanetPress Suite 7\PlanetPress Watch\DocumentManager" to this folder: "C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PlanetPress Watch\DocumentManager". 6.
Once the Capture database has been transferred to the new computer, any update made to the old computer will be lost unless the steps to migrate are reproduce again. Once a Pen has been docked and the data transfer done, its memory is wiped, thus rending the parallel mode very hard to produce. It is not impossible, but describing how it can be done this is beyond the scope of this migration article. Steps to migrate: 1. Update existing installation to PlanetPress Suite version 7.6 if not already done. 2.
2. Select Messenger in the tree list, right click and select Stop from the context menu. Note These steps must be done for both PlanetPress Suite Workflow 7 and PlanetPress Connect Workflow 8. 5. Copy the file PPCaptureDefault.mdb from this folder on the PlanetPress Suite 7.6 computer: "C:\ProgramData\Objectif Lune\PlanetPress Suite 7\PlanetPress Watch\capture" to this folder on the new PlanetPress Connect Workflow 8.8 computer: "C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PlanetPress Watch\capt
> Service Console). 2. Select Messenger in the tree list, right click and select Start from the context menu options. 9. Contact your local Objectif Lune activation team and transfer any Pen(s) licenses across. Known Issues This page lists important information that applies to PlanetPress Connect 1.8. Issues with Microsoft Edge browser The Microsoft Edge browser fails to display web pages when the Workflow's CORS option (in the HTTP Server Input 2 section) is set to "*".
In the meantime we offer the following workaround for anyone who needs to change the language: 1. Go to the .ini files for the Designer and Server Config: l l C:\Program Files\Objectif Lune\OL Connect\Connect Designer\Designer.ini C:\Program Files\Objectif Lune\OL Connect\Connect Server Configuration\ServerConfig.ini 2. Change the language parameter to the required one under Duser.language=en | es | de | fr | it | ja | ko | pt | tw | zh Only one of the above language tags should be selected.
Available Printer Models Note that only the single Printer Model (Generic PDF) will appear on the Advanced page of the Print Wizard by default. To add additional printer models click on the settings entry box. button next to the Model selection Note that the descriptions of some of the printers were updated in version 1.2 meaning that if you had version 1.n installed, you may find that the same printer style appears twice in the list, but with slightly different descriptions.
services and they may find local files with non-UNC paths which can lead to the false impression that the resources are correct. Using Capture After Installing Workflow 8 If PlanetPress Connect Workflow 8 is installed alongside PlanetPress Suite Workflow 7, Capture can no longer be used within Workflow 7. The plugins are now registered uniquely to Workflow 8 and the Messenger for Workflow 7 is taken offline. It is only possible to use Capture from PlanetPress Connect Workflow 8 thereafter.
l If the server is offline and you are not using Proof Print l On some occasions before the Print Wizard opens REST Calls for Remote Services The Server will now accept REST calls for all remote services and will make commands wait indefinitely until the required engines become available. The Server will log when it is waiting for an engine and when it becomes available. Note that there is no way to cancel any commands other than stopping the Server.
Server Configuration Settings This chapter describes configuring the PlanetPress Connect Server. The Connect Sever settings are maintained by the "Connect Server Configuration" utility tool which is installed alongside PlanetPress Connect. "Connect Server Configuration" can be launched from the Start Menu, as seen in the following screen-shot: The "Connect Server Configuration" dialog is separated into individual pages, where each page controls certain aspects of the software.
Scheduling Preferences The scheduling preferences are a way to control precisely how the PlanetPress Connect services work in the background.
10,000 and a job of 2,000 records is already running, then this existing job will now be considered a Medium job. Likewise, if the minimum records for a Large job is decreased from 10,000 to 5,000 and a job of 7,000 records is already running, then this existing job will now be considered a Large job. Additional Scheduling Preferences: Scheduling Preferences can be applied to the two distinct Engines used in the Connect production process.
limited. Additionally, you may launch up to 256 engines for Print Content generation, but Email and Web may only use the number of engines permitted by your license. Note Changes made to the following settings will be applied on the run (when the Apply button is pressed), and do not require the OLConnect_Server service to be restarted. l l l l l l l Use one internal engine: Check to limit to a single instance of the server.
l l l l Small job speed unit reservations: Enter a number of engines reserved for small print jobs. Medium job speed unit reservations: Enter a number of engines reserved for medium print jobs. Large job speed unit reservations: Enter a number of engines reserved for large print jobs. l Email engine reservations: Enter a number of engines reserved for Email jobs. l HTML engine reservations: Enter a number of engines reserved for Web jobs.
allows. With no Performance Pack, PlanetPress Connect's Weaver engine can generate output at 500 ppm (pages per minute). Additional Performance Packs increase this base speed per engine. Changes made to the following settings will be applied on the run (when the Apply button is pressed), and do not require the OLConnect_Server service to be restarted. l l l l l l l l Use one internal engine: Check to limit to a single instance of the server.
l l Large job speed unit reservations: Enter a number of speed units reserved for large print jobs. Maximum speed units: l l l Small job limit: Enter the maximum number of speed units that can run small print jobs. Medium job limit: Enter the maximum number of speed units that can run medium print jobs. Large job limit: Enter the maximum number of speed units that can run large print jobs.
l l Confirm password: Re-enter the password for the server security. Default session length (min): Enter a session time (in minutes) that the authentication stays valid for the requested process. This can reduce the number of requests to the server since an authentication request is not necessary during the session. Uninstalling This topic provides some important information about uninstalling (removing) PlanetPress Connect1.8.
3. Any Connect Workflow using PlanetPress Connect plugins which connect to this server. Uninstallation Wizard The uninstallation is done by running the PlanetPress Connect Setup Wizard in uninstall mode. The Wizard consists of the following pages: 1. PlanetPress Connect Setup: An information page, listing what will be uninstalled, and also warning about impacts upon running Applications and Services. 2. Data Management: A page that provides options for backing up or deleting Connect data.
General information Connect consists of visible and invisible parts. The invisible parts process the Connect job to provide the actual output. They are introduced to you in the topic: "Connect: a peek under the hood" below. For a list of all file types used in Connect, see: "Connect File Types" on page 98. You can find additional information that complements the user manuals, such as error codes and frequently asked questions about PlanetPress Connect, in the Knowledge base.
The Workflow server The Workflow server (also referred to as the 'Watch service') executes processes independently, after a Workflow configuration has been uploaded and the services have been started. The Workflow server can run only one configuration at a time. There are a number of services related to Workflow. The Messenger service, for example, receives the files sent to Workflow from the Designer and the Workflow configuration tool.
The Workflow Service Console lets you start and stop the different services, except the Connect server, and see their log files (see Workflow Service Console). Note that Workflow isn't strictly limited to Connect functionality. It was originally developed as part of the PlanetPress Suite. Many of the plugins in the Workflow configuration tool are older than Connect; they were left in for compatibility reasons, even though they aren't all useful or usable within Connect.
The Connect Server Configuration tool lets you change the settings for the Connect server, the engines and the service that cleans up the database and the file store. These settings can also be made in the preferences of the Designer. The Connect database The Connect database is the database back-end used by Connect itself when processing jobs. It can be either the MySQL instance provided by the Connect installer, or a pre-existing (external) instance (see "Database Considerations" on page 17).
The engines Merge engine/s. A merge engine merges data with a template using the scripts in the template, in order to create (Print,Email or Web) content items. The number of merge engines is configurable. By default, only one merge engine is used, but this number can be increased depending on the capacity of the machine that runs the solution (see "Performance Considerations" on page 25). Weaver engines. The Weaver engines create Print output from Print content items.
appropriate engine and returns the results to the caller. The results are the id's of the items (records, content items, job etc.) that are stored in the Connect database (see below). All Connect tasks except the Create Web Content task integrate the results in the Metadata in Workflow. The figure below shows the communication between Connect tasks and the Connect server in a Print process.
l l l l l l l l .OL-datamapper: A Data Mapping Configuration file, which can include sample data (excluding database source files such as mySQL, oracle, etc). .OL-datamodel: A data model file which can be imported or exported into either a data mapping configuration or a template. Contains a list of fields and their data type (date, currency, string, etc). .OL-jobpreset: A job preset file, used when generating a job (ready for output) from Designer or through automation (Create Job task).
The DataMapper Module The DataMapper is the tool to create a data mapping configuration. A data mapping configuration file contains the information necessary for data mapping: the settings to read the source file (Delimiter and Boundary settings), the data mapping workflow with its extraction instructions ('Steps'), the Data Model and any imported data samples.
2. Configure settings for the data source. The data source can be a file (CSV, PDF, TXT, XML) or a particular database. Configure how the data source is read by the DataMapper and create a record structure. See "Data source settings" on page 115. 3. Build the data mapping workflow. A data mapping workflow always starts with the Preprocessor step and ends with the Postprocessor step. You can add as many steps as you like and edit the Data Model of the extracted data as required.
template and any print presets have to be sent to Workflow; see "Sending files to Workflow" on page 309. Note AFP input requires the CDP library. The library licence allows PlanetPress Connect to run up to 4 instances of that library on a given machine at a given time. Creating a new data mapping configuration A new data mapping configuration can be made with or without a wizard. When you open a data file with a DataMapper wizard, the wizard automatically detects a number of settings.
you may have to enter a password). 4. Click Finish. l From the File menu 1. Click the File menu and select New. 2. Click the Data mapping Configuration drop-down and select Files and then the file type (Comma Separated Values or Excel (CSV/XLSX/XLS), MS-Access, PDF/VT, Text or XML). 3. Click Next. 4. Click the Browse button and open the file you want to work with. 5. Click Finish. Note l l Excel files saved in "Strict Open XML" format are not supported yet.
l From the Welcome screen 1. Open the PlanetPress ConnectWelcome page by clicking the or select the Help menu and then Welcome. icon at the top right 2. Click Create a New Configuration. 3. From the Using a wizard pane, select the appropriate file type. l From the File menu 1. In the menu, click File > New. 2. Click the Data mapping Wizards drop-down and select the appropriate file type. The steps to take with the wizard depend on the file type.
2. Click Create a New Configuration. 3. From the Using a wizard pane, select Generate counters. l From the File menu 1. In the menu, click File > New. 2. Click the Data mapping Wizards drop-down and select Generate counters. You can set the following parameters: l l l l l l l Starting Value: The starting number for the counter. Defaults to 1. Increment Value: The value by which to increment the counter for each record.
Saving a data mapping configuration A Data Mapping Configuration file has the extension .OL-datamapper. The file contains the settings, the extraction workflow ('Steps'), the Data Model and the imported Data Samples (excluding database source files such as mySQL, oracle, etc). To save a data mapping configuration: l l In the Menus, click on File > Save, or click on Save As to save a copy of a data mapping configuration under a different name. In the Toolbars, click the Save button.
4. Click the Browse button and open the file you want to work with. 5. Click Next. l From the File menu 1. In the menu, click File > New. 2. Click the Data mapping Wizards drop-down and select From CSV/XLSX/XLS File. 3. Click Next. 4. Click the Browse button and open the file you want to work with. 5. Click Next. After selecting the file, take a look at the preview to ensure that the file is the right one and the encoding correctly reads the data. Click Next.
First row contains field names: Uses the first line of the CSV as headers, which automatically names all extracted fields. Verify that the data are read properly. l Finally click Finish. All data fields are automatically extracted in one extraction step. Using the wizard for databases The DataMapper wizard for database files helps you create a data mapping configuration for a database file. The wizard extracts the data in one extraction step. The wizard cannot create detail tables.
Wizard settings for a database file After opening a database file with a wizard there are a number of settings to make, depending on the database type (see below). On the last page of the dialog, click Finish to close the dialog and open the actual data mapping configuration. MySQL, SQL Server or Oracle l Server: Enter the server address for the database. l Port: Enter the port to communicate with the server. The default port is 3306.
l This ODBC source is MSSQL: Check this option if the ODBC source is MSSQL (SQL Server). The options below appear under MSSQL-ODBC advanced configuration: l l Windows authentication: Select to use the Windows user name and password that are used by the Connect Service. SQL Server authentication: Select to use the User name and Password set below to connect to the SQL Server: l User name: Enter the SQL Server user name. l Password: Enter the password for the above user name.
Using the wizard for PDF/VT and AFP files The pages in PDF/VT and AFP files can be grouped on several levels. Additional information can be attached to each level in the structure. The structure and additional information are stored in the file's metadata. The DataMapper wizard for PDF files lets you select a level to trigger the start of a new record and it also enables you to extract the additional information from the metadata. You can extract data from the content afterwards.
After selecting the file, select the following options in the Metadata page: l l Metadata record levels: Use the drop-down to select what level in the metadata defines a record. Field List: This list displays all fields on the chosen level and higher levels in the PDF/VT metadata. The right column shows the field name. The left column displays the level on which it is located. Check any field to add it to the extraction. Click Finish to close the dialog and open the actual Data Mapping configuration.
3. Click Next. 4. Click the Browse button and open the XML file you want to work with. Click Next. After selecting the file, you have to set the split level and trigger type: l l XML Elements: This is a list of node elements that have children nodes. Select the level in the data that will define the source record.
after the Data Mapping workflow has completed ("Postprocessor step" on page 150). When you create a new data mapping configuration, these steps are added automatically, but they don't actually do anything until you configure these steps. In between the Preprocessor and Postprocessor step, the workflow can contain as many steps as needed to extract the required data. Adding steps Extracting data is the main way to build a data mapping workflow; see "Extracting data" on page 118.
Deleting steps To delete a step, right-click on it in the Steps pane and select Delete Step. Testing the extraction workflow The extraction workflow is always performed on the current record in the data source. When an error is encountered, the extraction workflow stops, and the field on which the error occurred and all subsequent fields will be greyed out. Click the Messages tab (next to the Step properties pane) to see any error messages.
naturally by pages, so the input data settings for PDF files are interpretation settings for text in the file. For an overview of all options, see: "Input Data" on page 203. For a CSV File In a CSV file, data is read line by line, where each line can contain multiple fields, separated by a delimiter. Even though CSV stands for comma-separated values, fields may be separated using any character, including commas, tabs, semicolons, and pipes.
For an XML file XML is a special file format because these file types can have a theoretically unlimited number of structure types. The input data has two simple options that basically determine at which node level a new record is created. You can either select an element type, to create a new delimiter every time that element is encountered, or choose to use the root node. If there is only one toplevel element, there will only be one record before the Boundaries are set.
Data format settings By default the data type of extracted data is a String, but each field in the Data Model can be set to contain another data type (see "Data types" on page 168). When that data type is Date, Number or Currency, the DataMapper will expect the data in the data source to be formatted in a certain way, depending on the settings.
Before you start Data source settings Data source settings must be made beforehand, not only to make sure that the data is properly read but also to have it organized in a record structure that meets the purpose of the data mapping configuration (see "Data source settings" on page 115). It is important to set the boundaries before starting to extract data, especially transactional data (see "Extracting transactional data" on page 124).
l Alternatively, drag & drop the selected fields into the Data Model pane. Tip In a PDF or Text file, use the Drag icon Data Model. to drag selected data into the With this method, a new Extract step will only be added to the extraction workflow when no Extract step already present on the Steps pane. Otherwise the field/s will be added to the selected Extract step or to the one that was last added. Dragging data into an existing field in the Data Model will replace the data.
l l l The field name is the same. (See: "Renaming and ordering fields" on page 158.) The Extract steps are mutually exclusive. This is the case when they are located in different branches of a Condition step or Multiple Conditions step. The option Append values to current record is checked in the Step properties pane under Extraction Definition.
l Change the names of fields that are included in the extraction. l Change the order in which fields are extracted. l Set the data type, data format and default value of each field. l Modify the extracted data through a script. l Delete a field. All this can be done via the Step properties pane (see "Settings for location-based fields in a Text file" on page 221), because the fields in the Data Model are seen as properties of an Extract step. See also: "Fields" on page 155.
Right-clicking on a data selection displays a contextual menu with the actions that can be done with that selection or the steps that can be added to them. That menu also displays the keyboard shortcuts. Text or PDF file To select data in a Text or PDF file, click on a starting point, keep the mouse button down, drag to the end of the data that needs to be selected and release the mouse button. The data selection can contain multiple lines.
button pressed down while clicking on nodes to select or deselect them, or keep the Shift button pressed down to select consecutive nodes. You can select multiple fields even if those fields are in different nodes. Note The Goto step isn't used in XML extraction workflows The DataMapper moves through the file using Xpath, a path-like syntax to identify and navigate nodes in an XML document. Extracting transactional data Promotional data are data about customers, such as addresses, names and phone numbers.
Detail tables are created when an Extract step is added within a Repeat step. The Repeat step goes through a number of lines or nodes. An Extract step within that loop extracts data from each line or node. It depends on the type of source data how this loop is constructed exactly. For more information about detail tables, multiple detail tables and nested detail tables, see "Example " on page 196. From a CSV file or a Database The transactional data (also called line items) appear in multiple rows.
1. Select a field in the column that contains the first line item information. 2. Right-click this data selection and select Add Repeat. This adds a Repeat step with a GoTo step inside it. The GoTo step moves the cursor down to the next line, until there are no more lines (see "Goto step" on page 144). 3. (Optional.) Add an empty detail table via the Data Model pane: right-click the Data Model and select Add a table. Give the detail table a name. 4. Select the Repeat step on the Steps pane. 5.
Page 127
From an XML file The transactional data appears in repeated elements. 1. Right-click one of the repeating elements and select Add Repeat. This adds a Repeat step to the data mapping configuration.
elements is extracted. You can see this on the Step properties pane, as long as the Repeat step is selected on the Steps pane. In the Collection field, you will find the corresponding node path. Tip It is possible to edit the Xpath in the Collection field, to include or exclude elements from the loop. One example of this is given in a How-to: Using Xpath in a Repeat step. The example in the How-to uses the starts-with() function. For an overview of XPath functions, see Mozilla: XPath Functions.
The new Extract step will be located in the Repeat step. From a Text or a PDF file In a PDF or Text file, transactional data appears on multiple lines and can be spread over multiple pages. 1. Add a Goto step if necessary. Make sure that the cursor is located where the extraction loop must start. By default the cursor is located at the top of the page, but previous steps may have moved it. Note that an Extract step does not move the cursor. 1. Select something in the first line item. 2.
2. Add a Repeat step where the loop must stop. 1. In the line under the last line item, look for a text that can be used as a condition to stop the loop, for example "Subtotals", Total" or "Amount". 2. Select that text, right-click on it and select Add Repeat. The Repeat step loops over all lines until the selected text is found. 3. Include/exclude lines. Lines between the start and end of the loop that don't contain a line item must be excluded form the extraction.
Selecting data - especially something as small as a dot - can be difficult in a PDF file. To make sure that a Condition step checks for certain data: Type the value in the right operand (in the Step properties pane).Move or resize the selection rectangle in the data.Click the Use selection button in the left operand (in the Step properties pane).When the Condition evaluates to true, the value is found in the selected region.
4. (Optional.) Add an empty detail table to the Data Model: right-click the Data Model and select Add a table. Give the detail table a name. 5. Extract the data (see "Adding an extraction" on page 119). When you drag & drop data on the name of a detail table in the Data Model pane, the data are added to that detail table.
Note In a PDF or Text file, pieces of data often have a variable size: a product description, for example, may be short and fit on one line, or be long and cover two lines. To learn how to handle this, see "Extracting data of variable length" on the next page. 6. Extract the sum or totals. If the record contains sums or totals at the end of the line items list, the end of the Repeat step is a good place to add an Extract step for these data.
Tip This how-to describes in detail how to extract an item description that appears in a variable number of lines: How to extract multiline items. Extracting data of variable length In PDF and Text files, transactional data isn't structured uniformly, as in a CSV, database or XML file. Data can be located anywhere on a page. Therefore, data are extracted from a certain region on the page.
Text file: setting the height to 0 If the variable part in a TXT file is at the end of the record (for example, the body of an email) the height of the region to extract can be set to 0. This instructs the DataMapper to extract all lines starting from a given position in a record until the end of the record, and store them in a single field. This also works with the data.extract() method in a script; see "Examples" on page 271.
Tip Create and edit the Extract step in the 'true' branch, then right-click the step on the Steps pane, select Copy Step, and paste the step in the 'false' branch. Now you only have to adjust the region from which this Extract step extracts data. To learn how to configure a Condition step or a Case in a Multiple Conditions step, see "Configuring a Condition step" on page 147.
Using a script A script could also provide a solution when data needs to be extracted from a variable region. This requires using a Javascript-based field.
1. Add a field to an Extract step, preferably by extracting data from one of the possible regions; see "Extracting data" on page 118. To add a field without extracting data, see "JavaScript-based field" on page 156. 2. On the Step properties pane, under Field Definition, select the field and change its Mode to Javascript. If the field was created with its Mode set to Location, you will see that the script already contains one line of code to extract data from the original location. 3. Expand the script.
Steps In the DataMapper, steps are part of an extraction workflow (see "Data mapping workflow" on page 113). They contain a specific instruction for the DataMapper, for example to extract data, create a loop, or apply a condition. Some types of steps contain other steps. Steps are executed sequentially, from top to bottom in an extraction workflow.
added to create reports. A tag could be added to process certain records differently. A preprocessor could remove certain records altogether. One example of how a preprocessor could be used is given in a How-to: Using Preprocessors in DataMapper. Properties To add a property: 1. Select the Preprocessor step on the Steps pane. 2. On the Step properties pane, under Properties, click the Add button . See "Properties" on page 217 for an explanation of the settings for properties.
Configuring the Preprocessor step For an explanation of the settings for preprocessors, see: "Preprocessor step properties" on page 216. Extract step The Extract step is essential in each and every data mapping configuration. It extracts data from the data source, based on their location (a row and column in CSV or tabular data, an XPath in XML, or a region of the page in PDF and Text) or on a JavaScript. The data is placed in the record set that is the result of the extraction workflow.
Adding an Extract step To add an Extract step, first select the step on the Steps pane after which to insert the Extract step. Then: l l In the Data Viewer, select some data, right-click that data and choose Add Extraction, or drag & drop the data in the Data Model. For more detailed information and instructions, see: "Extracting data" on page 118. Alternatively, right-click the Steps pane and select Add a Step > Add Extraction. Make the required settings on the Step properties pane.
XML files. When you select a node in an XML file and add a Repeat step on it, the Repeat step will automatically loop over all nodes of the same type on the same level in the XML file. Adding a Repeat step To add a Repeat step: 1. On the Steps pane, select the step after which to insert the Condition step. 2. Make sure that the cursor is located where the extraction loop must start.
Note The Goto step isn't used in XML extraction workflows The DataMapper moves through the file using Xpath, a path-like syntax to identify and navigate nodes in an XML document. Adding a Goto step To add a Goto step: l l On the Steps pane, select the step after which to insert the Goto step. In the Data Viewer, select some data, right-click that data and choose Add Goto, to add a Goto step that moves the cursor to that data. Alternatively, right-click the Steps pane and select Add a Step > Add Goto.
Adding a Condition step To add a Condition step: l On the Steps pane, select the step after which to insert the Condition step; then, in the Data Viewer, select some data, right-click that data and choose Add Conditional. In the Step properties pane, you will see that the newly added Condition step checks if the selected position (the left operand) contains the selected value (the right operand). Both operands and the operator can be adjusted.
operand (in the Step properties pane).Move or resize the selection rectangle in the data.Click the Use selection button in the left operand (in the Step properties pane).When the Condition evaluates to true, the value is found in the selected region. l Alternatively, right-click the Steps pane and select Add a Step > Add Conditional. Enter the settings for the condition on the Step properties pane.
Renaming a rule To rename a rule, double-click its name in the Rule Tree and type a new name. Multiple Conditions step The Multiple Conditions step is useful to avoid the use of nested Condition steps: Condition steps inside other Condition steps. In a Multiple Conditions step, conditions or rather Cases are positioned side by side. Each Case condition can lead to an extraction. Cases are executed from left to right.
Adding a Multiple Conditions step To add a Multiple Conditions step, right-click the Steps pane and select Add a Step > Add Multiple Conditions. To add a case, click the Add case button to the right of the Condition field in the Step properties pane. Configuring a Multiple Conditions step For information about how to configure the Multiple Conditions step, see "Left operand, Right operand" on page 241. The settings for a Case are the same as for a Condition step; see "Condition step properties" on page 238.
l l l Execute JavaScript code. Set the value for a record property. Record properties are defined in the Preprocessor step; see "Preprocessor step" on page 140. Stop the processing of the current record. Normally an extraction workflow is automatically executed on all records in the source data. By stopping the processing of the current record, you can filter records or skip records partially. The Action step can run multiple specific actions one after the other in order.
Configuring the Postprocessor step For an explanation of the settings for postprocessors, see "JavaScript " on page 249. The Data Model The Data Model is the structure of records into which extracted data are stored. It contains the names and types of the fields in a record and in its detail tables. A detail table is a field that contains a record set instead of a single value.
pane, filled with data from the current record. The Data Model is not related to the type of data source: whether it is XML, CSV, PDF, Text or a database does not matter. The Data Model is a new structure, designed to contain only the required data. About records A record is a block of information that may be merged with a template to generate a single document (invoice, email, web page...) for a single recipient. It is part of the record set that is generated by a data mapping configuration.
Importing/exporting a Data Model To use a Data Model in another data mapping configuration, or to use it in a Designer template without a data mapping configuration, you have to export that Data Model and import it into a data mapping configuration or template. Importing and exporting Data Models is done from within the Data model Pane, using the topright icons and . For information about the structure of the exported Data Model file, see "Data Model file structure" on page 177.
Using the Data Model The Data Model is what enables you to create personalized templates in the Designer module. You can drag & drop fields from the Data Model into the template that you are creating (see "Variable Data" on page 604). For this, you have to have a template and a data mapping configuration open at the same time, or import a Data Model (see "Importing/exporting a Data Model" on the previous page).
1. Use an Execute Data Mapping task or Retrieve Items task to create a record set. On the General tab select Outputs records in Metadata. 2. Add a value to a field in the Metadata using the Metadata Fields Management task. Data added to the _vger_fld_ExtraData field on the Document level will appear in the record's ExtraData field, once the records are updated from the Metadata (in the next step). Other fields have the same prefix: _vger_fld_. 3. Update the record/s from the Metadata.
Adding fields Location-based field Generally location-based fields are added to a Data Model by extracting data; see "Extracting data" on page 118. Location-based fields in detail tables are created by extracting transactional data; see "Extracting transactional data" on page 124. Alternatively, you can add fields and detail tables directly in the Data Model pane. Right-click anywhere on the Data Model and a contextual menu will appear. Which menu items are available depends on where you've clicked.
2. On the Step properties pane, under Field Definition, click the Add JavaScript Field button next to the Field List. 3. On the Step properties pane, under Field Definition, enter the script in the Expression field. By changing a field's mode Alternatively you can change a location-based into a JavaScript-based field. 1. Select the field in the Data Model. 2. On the Step properties pane, under Field Definition, change its Mode to JavaScript. 3. Enter the script in the Expression field.
Adding fields dynamically Outside of the DataMapper the Data Model cannot be changed. It isn't possible to add fields to it when using the data mapping configuration in Workflow. It is however possible to add data to existing fields via Workflow; see "About adding fields and data via Workflow" on page 154. Editing fields The list of fields that are included in the extraction, the order in which fields are extracted and the data format of each field, are all part of the Extract step's properties.
Setting the data type Fields store extracted data as a String by default. The data type of a field can be changed via the properties of the Extract step that the field belongs to. 1. Select the Extract step that contains the field. You can do this by clicking on the field in the Data Model, or on the step in the Steps pane that contains the field. 2. On the Step properties pane, under Field Definition, set the Type to the desired data type. See "Data types" on page 168 for a list of available types.
Post function On the Step properties pane, under Field Definition, you can enter a script in the Post function field to be run after the extraction. (Click the Use JavaScript Editor button to open the Script Editor dialog if you need more space.) A Post function script operates directly on the extracted data. Its results replace the extracted data. For example, the Post function script replace("-", ""); replaces the first dash character that occurs inside the extracted string.
2. In the Step properties pane, under Field Definition, click the Remove Extract Field button next to the Field List drop-down. Detail tables A detail table is a field in the Data Model that contains a record set instead of a single value. Detail tables contain transactional data. They are created when an Extract step is added within a Repeat step; see "Extracting transactional data" on page 124. In the most basic of transactional communications, a single detail table is sufficient.
Creating multiple detail tables Multiple detail tables are useful when more than one type of transactional data is present in the source data, for example purchases (items with a set price, quantity, item number) and services (with a price, frequency, contract end date, etc). To create more than one detail table, simply extract transactional data in different Repeat steps (see "Extracting transactional data" on page 124).
Page 163
Nested detail tables Nested detail tables are used to extract transactional data that are relative to other data. They are created just like multiple detail tables, with two differences: l l For the tables to be actually nested, the Repeat step and its Extract step that extract the nested transactional data must be located within the Repeat step that extracts data to a detail table. In their name, the dot notation (record.services) must contain one extra level (record.services.charges).
a number of "details" such as movie rentals or long distance calls.
The services can be extracted to a detail table called record.services. The "charges" and "details" can be extracted to two nested detail tables.
The nested tables can be called record.services.charges and record.services.details.
Now one "charges" table and one "details" table are created for each row in the "services" table. Data types By default the data type of extracted data is a String, but each field in the Data Model can be set to contain another data type. To do this: 1. In the Data Model, select a field. 2. On the Step properties pane, under Field Definition choose a data type from the Type drop-down. Changing the type does not only set the data type inside the record.
l "HTMLString" on page 175 l "Integer" on page 175 l "Float" on page 174 l "Currency" on the facing page l "Date" on page 171 l "Object" on page 176 Note The Object data type is only available in the DataMapper module. It can be used for properties in the Preprocessor step, but not for fields in the Data Model. Boolean Booleans are a simple true/false data type often used in conditions and comparisons.
Boolean expressions Boolean values can also be set using an expression of which the result is true or false. This is done using operators and comparisons. Example: record.fields["isCanadian"] = (extract("Country") == "CA"); For more information on JavaScript comparison and logical operators, please see w3schools.com or developer.mozilla.org. Currency The Currency data type is a signed, numeric, fixed-point 64-bit number with 4 decimals. Values range from -922 337 203 685 477.5808 to 922 337 203 685 477.
Building Currency values Currency values can be the result of direct attribution or mathematical operations just like Integer values (see "Integer" on page 175). Date Dates are values that represent a specific point in time, precise up to the second. They can also be referred to as datetime values. While dates are displayed using the system's regional settings, in reality they are stored unformatted.
For the letters and patterns that you can use in a date format, see "Defining a date/time format" below. Data format settings tell the DataMapper how certain types of data are formatted in the data source. They don't determine how these data are formatted in the Data Model or in a template. In the Data Model, data are converted to the native data type.
Note The markers that can be used when extracting dates are different from those that are used to display dates in a template (see the Designer's "Date and time patterns" on page 918). Examples of masks Value in raw data Mask to use June 25, 2013 MM dd, YYYY 06/25/13 mm/dd/yy 2013.06.25 yyyy.mm.dd 2013-06-25 07:31 PM yyyy-mm-dd hh:nn ap 2013-06-25 19:31:14.1206 yyyy-mm-dd hh:nn:ss.ms Tuesday, June 25, 2013 @ 7h31PM DD, MM dd, yyyy @ hh\hnnap Entering a date using JavaScript In several pl
Example The following script creates a date that is the current date + 30 days: function addDays(date, days) { var result = new Date(date); result.setDate(result.getDate() + days); return result; } addDays(new Date(), 30); Float Floats are signed, numeric, floating-point numbers whose value has 15-16 significant digits. Floats are routinely used for calculations. Note that Float values can only have up to 3 decimals.
HTMLString HTMLStrings contain textual data that includes HTML markup. They are essentially the same as String values except in cases where the HTML markup can be interpreted. Example: Assume that a field has the value He said WOW!. If the data type is String and the value is placed in a template, it will display exactly as "He said WOW!" (without the quotes). If the data type is HTMLString, it will display as "He said WOW!" (again, without the quotes).
l Mathematical operations: Assign the result of any mathematical operation. For example: 22+51, 3*6, 10/5 or sourceRecord.property.SubTotal. For more information on mathematics in JavaScript , see w3Schools - Mathematical Operators. For more advanced mathematical functions, see w3schools - Math Object. Note When adding numbers that are not integers, for instance 4.5 + 1.2 , a round towards zero rounding is applied after the operation was made. In the previous example, the result, 5.7, is rounded to 5.
l Extraction: l In the Data Model, select a field. On the Step properties pane, under Field Definition set the Type to String. The field value will be extracted and treated as a string. l l JavaScript Expression: Set the desired value to any string between quotes. Example: record.fields["countryOfOrigin"] = "Canada"; Building String values String values can be made up of more than just a series of characters between quotes.
xsi:schemaLocation="http://www.objectiflune.com/connectschemas/Data ModelConfig http://www.objectiflune.com/connectschemas/DataModelConfig/1_0_0_ 3.xsd" xmlns:xsi="http://www.w3.
Example: transactional details, in a simple invoice format PAGE 180Example: nested tables (one table into another) PAGE 181Keyboard shortcuts This topic gives an overview of keyboard shortcuts that can be used in the DataMapper. Keyboard shortcuts available in the Designer for menu items, script editors and the data model pane can also be used in the DataMapper; see "Keyboard shortcuts" on page 738. Although some of the keyboard shortcuts are the same, this isn't a complete list of Windows keyboard shortcuts. Please refer to Windows documentation for a complete list of Windows keyboard shortcuts.
Key combination Function displays the corresponding menu.) The menu can then be browsed using the Enter key, arrow up and arrow down buttons.
Key combination Function Ctrl + Shift + S Save all Ctrl + Shift + W or Ctrl + Shift + F4 Close all Ctrl + F5 Revert Ctrl + F7 Next view Ctrl + Shift + F7 Previous view Ctrl + F8 Next perspective Ctrl + Shift + F8 Previous perspective Ctrl + F10 Save as Ctrl + F12 Send to Workflow / Package files F4 Ignore step F6 Add an Extract step F7 Add a Goto step F8 Add a Condition step F9 Add a Repeat step Page 183
Key combination Function F10 Add an Extract field F11 Add an Action step F12 Add a Multiple Conditions step Alt + F12 Add a Case step (under a Multiple Conditions step) Home Go to the first step in the workflow End Go to the last step in the workflow Alt + V Validate records Shift + F10 or Ctrl + Shift + F10 Open context menu Viewer pane The following key combinations activate a function in the Viewer.
Key combination Function Ctrl + Shift + F6 Previous editor (when there is more than one file open in the Workspace) Data Model pane Key combination Function PageUp Go to previous record PageDown Go to next record Alt + CR Property page Alt + PageDown Scroll down to the last field Alt + PageUp Scroll up to the first field Steps tab Key combination Function Ctrl + - Zoom out Ctrl + + Zoom in Edit Script and Expression windows The following key combinations have a special function in the
Key combination Function Ctrl + A Select all Ctrl + D Duplicate line Ctrl + I Indent (Tab) Ctrl + J Line break Ctrl + L Go to line; a prompt opens to enter a line number. Ctrl + Shift + D Delete line Shift + Tab Shift selected lines left Tab Shift selected lines right Ctrl + / Comment out / uncomment a line in code Ctrl + Shift + / Comment out / uncomment a code block Menus The following menu items are shown in the DataMapper Module's menu: File Menu l l l New...
l l l l l l l Close: Close the currently open data mapping configuration or Template. If the file needs to be saved, the appropriate Save dialog will open. Close All: Close any open data mapping configuration or Template. If any of the files need to be saved, the Save Resources dialog opens. Save: Saves the current data mapping configuration or Template to its current location on disk. If the file is a data mapping configuration and has never been saved, the Save As dialog appears instead. Save As...
l l Paste Step: Takes the step or steps in the clipboard and places them in the Steps after the currently selected step. Delete Step: Deletes the currently selected step. If the step is a Repeat or Condition, all steps under it are also deleted. l Cut: Click to remove the currently selected step, or steps, and place them in the clipboard. l Copy: Click to place a copy of the currently selected step, or steps, in the clipboard.
data selection is on a lower line, the loop will be for each line until the text in the data selection is found at the specified position on the line (e.g. until "TOTAL" is found). l l l Add Extract Field: Adds the data selection to the selected Extract step, if an extract step is currently selected. If multiple lines, nodes or fields are selected, multiple extract fields are added simultaneously. Add Multiple Conditions: Adds a condition that splits into multiple case conditions.
l About PlanetPress Connect Designer: Displays the software's About dialog. l Welcome Screen: Click to re-open the Welcome Screen. Panes The DataMapper screen contains the following panes. l "Settings pane" on page 203. The Settings pane contains settings for the data source. l "Steps pane" on page 213. The entire extraction workflow is visible in the Steps pane. l "The Data Viewer" on page 200. The Data Viewer shows one record in the data source. l "Step properties pane" on page 215.
this, open the contextual menu within the pane itself by right-clicking on something in the Data Model pane. Depending on where you've clicked, it can contain the following options: l l l l l Add a field: Click to add a new field at the current level (record or detail table). Enter the field name in the dialog and click OK to add it. Add a table: Click to add a new detail table at the current level (record or existing detail table). Enter the table name in the dialog and click OK to add it.
l l l l l l l The column on the left displays the name of the field. The column on the right displays the current value of the extracted field based on the record shown in the Data Viewer, if an Extract step has an extraction for this field (see "Extracting data" on page 118). The icon to the left of the name indicates the data Type of the field (see "Data types" on page 168). A field name with an asterisk to the right indicates that this field is part of an imported Data Model file.
l l Next Record: Go to the next record in the data sample. This button is disabled if the last record is shown. Last Record: Go to the last record in the data sample. This button is disabled if the last record is already shown. If a record limit is set in the Settings pane ("Settings pane" on page 203) the last record will be within that limit. Detail tables A detail table is a field in the Data Model that contains a record set instead of a single value. Detail tables contain transactional data.
(with a price, frequency, contract end date, etc). To create more than one detail table, simply extract transactional data in different Repeat steps (see "Extracting transactional data" on page 124). The best way to do this is to add an empty detail table (right-click the Data Model, select Add a table and give the detail table a name) and drop the data on the name of that detail table.
Page 195
Nested detail tables Nested detail tables are used to extract transactional data that are relative to other data. They are created just like multiple detail tables, with two differences: l l For the tables to be actually nested, the Repeat step and its Extract step that extract the nested transactional data must be located within the Repeat step that extracts data to a detail table. In their name, the dot notation (record.services) must contain one extra level (record.services.charges).
a number of "details" such as movie rentals or long distance calls.
The services can be extracted to a detail table called record.services. The "charges" and "details" can be extracted to two nested detail tables.
The nested tables can be called record.services.charges and record.services.details.
Now one "charges" table and one "details" table are created for each row in the "services" table. The Data Viewer The Data Viewer is located in the middle on the upper half of the DataMapper screen. It displays the data source that is currently loaded in the DataMapper, specifically one record in that data. Where one record ends and the next starts, is set in the Data Source settings (see "Record boundaries" on page 117).
l l l l Hide/Show line numbers the left of the Data Viewer. (Text file only): Click to show or hide the line numbers on Hide/Show datamap : Click to show or hide the icons to the left of the Data Viewer which displays how the steps affect the line. Hide/Show extracted data : Click to show or hide the extraction selections indicating that data is extracted. This simplifies making data selections in the same areas and is useful to display the original data.
Messages pane The Messages pane is shared between the DataMapper and Designer modules and displays any warnings and errors from the data mapping configuration or template. At the top of the Message pane are control buttons: l Export Log: Click to open a Save As dialog where the log file (.log) can be saved on disk. l Clear Log Viewer: Click to remove all entries in the log viewer. l Filters: Displays the Log filter (see "Log filter" below).
Settings pane Settings for the data source and a list of Data Samples and JavaScript files used in the current data mapping configuration, can be found on the Settings tab at the left. The available options depend on the type of data sample that is loaded. The Input Data settings (especially Delimiters) and Boundaries are essential to obtain the data and eventually, the output that you need. For more explanation, see "Data source settings" on page 115.
l Ignore unparseable lines: Ignores any line that does not correspond to the settings above. PDF file Input Data settings PDF Files have a natural, static delimiter in the form of pages, so the options here are interpretation settings for text in the PDF file. The Input Data settings for PDF files determine how words, lines and paragraphs are detected in the PDF when creating data selections. Each value represents a fraction of the average font size of text in a data selection, meaning "0.
l l l l l Connection String: Displays the connection string used to access the Data Source. Table: Displays the tables and stored procedures available in the database. The selected table is the one the data is extracted from. Clicking on any of the tables shows the first line of the data in that table. Encoding: Defines what encoding is used to read the Data Source ( US-ASCII, ISO8859-1, UTF-8, UTF-16, UTF-16BE or UTF-16LE ).
l On lines: Triggers a new page in the Data Sample after a number of lines. l l l Cut on number of lines: Triggers a new page after the given number of lines. With this number set to 1, and the Boundaries set to On delimiter, it is possible to create a record for each and every line in the file. Cut on FF: Triggers a new page after a Form Feed character. On text: Triggers a new page in the Data Sample when a specific string is found in a certain location.
instance of that node. For example, if a client node contains multiple invoice nodes, the information for the client node can be duplicated for each invoice. The DataMapper only extracts elements for which at least one value or attribute value is defined in the file. Boundaries Boundaries are the division between records: they define where one record ends and the next record begins; for an explanation see "Record boundaries" on page 117.
l On field value: Sets a boundary on a specific field value. l l l Field name: Displays the fields in the top line. The value of the selected field is compared with the Expression below to create a new boundary. Expression: Enter the value or Regular Expression to compare the field value to. Use Regular Expression: Treats the Expression as a regular expression instead of static text. For more information on using Regular Expressions (regex), see the Regular-Expressions.info Tutorial.
boundary can be effectively defined. For example, if a string is always found on the first and on the last page of a document, you could specify a number of occurrences of 2. This way, there is no need to inspect other items for whether it is on the first page or the last page. Having found the string two times is enough to set the boundary. l Pages before/after: Defines the boundary a certain number of pages before or after the current page.
l l l l l l l Top/Bottom: Defines the start and end row of the data selection to compare with the text value. Entire width: Ignores the column values and compares using the whole line. Entire height: Ignores the row values and compares using the whole column. Entire page: Compares the text value on the whole page. Only available with contains, not contains, is empty and is not empty operators.
l l Record limit: Defines how many records are displayed in the Data Viewer. This does not affect output production; when generating output, this option is ignored. To disable the limit, use the value 0 (zero). Trigger: Defines the type of rule that controls when a boundary is set, creating a new record. l On Element: Defines a new record on each new instance of the XML element selected in the Input Data settings.
l l l l Delete Replace source. : Remove the current Data Sample from the data mapping configuration. : Open a Data Sample and replace it with the contents of a different data Reload : Reload the currently selected Data Sample and any changes that have been made to it. Set as Active : Activates the selected Data Sample. The active data sample is shown in the Data Viewer after it has gone through the Preprocessor step as well as the Input Data and Boundary settings.
l l Date Language : Set the date language for a date value (ex: If English is selected, the term May will be identified as the month of May). Treat empty as 0 : A numerical empty value is treated as a 0 value. Note Default data formats tell the DataMapper how certain types of data are formatted in the data source. They don't determine how these data are formatted in the Data Model or in a template. In the Data Model, data are converted to the native data type.
Moving a step To rearrange steps, simply drag & drop them somewhere else on the dotted line in the Steps pane. Alternatively you can right-click on a step and select Cut Step or use the Cut button in the Toolbar. If the step is Repeat or Condition, all steps under it will also be placed in the clipboard. To place the step at its destination, right-click the step in the position before the desired location and click Paste Step, or use the Paste button in the toolbar.
l l l l Add Case Step: Adds a Case condition under the selected Multiple Conditions step. Ignore Step: Click to set the step to be ignored (aka disabled). Disabled steps are grayed and do not run, neither in the DataMapper nor when the data mapping configuration is executed in Workflow. However, they can still be modified normally. Delete Step: To remove a step, right-click on it and select Delete step from the contextual menu or use the Delete button in the Toolbar.
Preprocessor step properties The Preprocessor step does not run for every record in the source data. It runs once, at the beginning of the extraction workflow, before anything else; see "Preprocessor step" on page 140. The properties described below become visible in the Step properties pane when the Preprocessor step is selected in the Steps pane. Description This subsection is collapsed by default in the interface, to give more screen space to other important parts. Name: The name of the step.
Configuration, use the automation.jobInfos.JobInfoX (where X is the job info number, from 0 to 9). l l l OriginalFilename: This property contains the original file name that was captured by the PlanetPress Workflow process and is equivalent to the %o variable in the process. To access these property inside of any JavaScript code within the Data Mapping Configuration, use automation.properties.OriginalFilename.
l l l Automation variable: These properties initialize variables coming from the PlanetPress Workflow automation tool. The name of the property needs to be the same as the variable name in Workflow, and they can be either a Local variable or a Global variable. For either one, only the actual name is to be used, so for % {MyLocalVar} use only MyLocalVar , and for %{global.MyGlobalVar} use MyGlobalVar. If a global and a local variable have the same name ( %{myvar} and %{global.
Extract step properties The Extract step takes information from the data source and places it in the record set that is the result of the extraction workflow. For more information see "Extract step" on page 142 and "Extracting data" on page 118. Description This subsection is collapsed by default in the interface, to give more screen space to other important parts. Name: The name of the step. This name will be displayed on top of the step's icon in the Steps pane.
l Mode: Determines the origin of the data. Fields always belong to an Extract step, but they don't necessarily contain extracted data. See "Fields" on page 155 for more information. l l Location: The contents of the data selection determine the value of the extracted field.
l Type: The data type of the selected data; see "Data types" on page 168. Make sure that the data format that the DataMapper expects matches the actual format of the data in the data source; see "Data Format" on page 223. Settings for location-based fields in a Text file l Left: Defines the start of the data selection to extract. l Right: Defines the end of the data selection to extract. l Top offset: The vertical offset from the current pointer location in the Data Viewer).
l Left: Defines the start of the data selection to extract. l Right: Defines the end of the data selection to extract. l l l Top offset: The vertical offset from the current pointer location in the Data Sample (Viewer). Height: The height of the selection box. Use selection: Click to use the value (Left, Right, Top offset and Height) of the current data selection for the extraction. Note If the selection contains multiple lines, the lines are by default joined and extracted into one field.
l Use selection: Click to use the value of the current data selection for the extraction. Note If the selection contains multiple lines, only the first line is selected. l Post Function: Enter a JavaScript expression to be run after the extraction. For example replace("-","") would replace a single dash character inside the extracted string. l l Use JavaScript Editor: Click to display the Script Editor dialog. Trim: Select to trim empty characters at the beginning or the end of the field.
Note Data format settings tell the DataMapper how certain types of data are formatted in the data source. They don't determine how these data are formatted in the Data Model or in a template. In the Data Model, data are converted to the native data type. Dates, for example, are converted to a DateTime object in the Data Model, and will always be shown as "year-month-day" plus the time stamp, for example: 2012-04-11 12.00 AM.
l Name: The name of the field. Click the field name and enter a new name to rename the field. Note If you intend to use the field names as metadata in a PlanetPress Workflow process, do not add spaces to field names, as they are not permitted in metadata field names. l Value: Displays the value of the extract field in the current Record. l Remove button : Click to remove the currently selected field. l Move Up button : Click to move the selected field up one position.
l Name: A name by which to refer to the action. This name has no impact on functionality. l Type: l l l Set property: Sets the value of a record property which was created in the Preprocessor step (see "Preprocessor step" on page 140). Run JavaScript : Runs a JavaScript expression, giving much more flexibility over the extraction process. Stop Processing Record: When this option is selected, the extraction workflow stops processing the current record and moves on to the next one.
Note If the selection contains multiple lines, only the first line is selected. l l Trim: Select to trim empty characters at the beginning or the end of the field JavaScript : The result of the JavaScript Expression written below the drop-down will be the value of the extracted field. If the expression contains multiple lines, the last value attribution (variable = "value";) will be the value. See "DataMapper Scripts API" on page 252. l l l l Expression: The JavaScript expression to run.
l l Date Language : Set the date language for a date value (ex: If English is selected, the term May will be identified as the month of May). Treat empty as 0 : A numerical empty value is treated as a 0 value. CSV and Database Files l Property: Displays a list of record properties set in the Preprocessor step (see "Preprocessor step" on page 140). l Type: Displays the type of the property. Read only field. l Based on: Determines the origin of the data.
l l Use selected text: Inserts the text in the current data selection in the JavaScript Expression. If multiple lines or elements are selected, only the first one is used. Use selection: Click to use the value of the current data selection for the extraction. Note If the selection contains multiple lines, only the first line is selected. l Data Format: Data format settings tell the DataMapper how certain types of data are formatted in the data source.
l XPath: The path to the XML field that is extracted. l Use selection: Click to use the value of the current data selection for the extraction. Note If the selection contains multiple lines, only the first line is selected. l l Trim: Select to trim empty characters at the beginning or the end of the field JavaScript : The result of the JavaScript Expression written below the drop-down will be the value of the extracted field.
l Data Format: Data format settings tell the DataMapper how certain types of data are formatted in the data source. Make sure that this format matches the actual format of the data in the data source. l Negative Sign Before : A negative sign will be displayed before any negative value. l Decimal Separator : Set the decimal separator for a numerical value. l Thousand Separator : Set the thousand separator for a numerical value. l Currency Sign : Set the currency sign for a currency value.
The properties described below become visible in the Step properties pane when the Repeat step is selected in the Steps pane. Description This subsection is collapsed by default in the interface, to give more screen space to other important parts. Name: The name of the step. This name will be displayed on top of the step's icon in the Steps pane. Comments: The text entered here will be displayed in the tooltip that appears when hovering over the step in the Steps pane.
Rule Tree The Rule tree subsection displays the full combination rules (defined below under Condition) as a tree, which gives an overview of how the conditions work together as well as the result for each of these conditions for the current record or iteration. Condition First, the Condition List displays the conditions in list form, instead of the tree form above. Three buttons are available next to the list: l Add condition: Click to create a new condition in the list.
extraction. l l Value: A specified static text value. l l l l l l l l Field: The Extracted Record field to use in the comparison. Expression: The JavaScript line that is evaluated. Note that the last value attribution to a variable is the one used as a result of the expression. Use JavaScript Editor: Click to display the Edit Script dialog. Use selected text: Inserts the text in the current data selection in the JavaScript Expression.
l l l l is less than: The first specified value is smaller, numerically, than the second value for the condition to be True. is greater than: The first specified value is larger, numerically, than the second value for the condition to be True. is empty: The first specified value is empty. With this operator, there is no second value. Invert condition: Inverts the result of the condition. For instance, is empty becomes is not empty.
l l l l l Data Property: The value of a data-level property set in the Preprocessor step. Record Property: One of the local variables that you can create and that are reset for each document as opposed to data variables that are global because they are initialized only once at the beginning of each job. Automation Property: The current value of a Document-level property set in the Preprocessor step.
XML Files l Based On: l Position: The data in the specified position for the comparison. l l l l l l l l l l Value: The text value to use in the comparison. Use selected text: Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used. Field: The Extracted Record field to use in the comparison. JavaScript : The result of a JavaScript Expression.
l Operators: l l l l l l is equal to: The two specified value are identical for the condition to be True. contains: The first specified value contains the second one for the condition to be True. is less than: The first specified value is smaller, numerically, than the second value for the condition to be True. is greater than: The first specified value is larger, numerically, than the second value for the condition to be True. is empty: The first specified value is empty.
l l To rename a rule, double click on its name from the Rule tree subsection. To change the way rules are combined, right-click "AND". Select OR or XOR instead. XOR means one or the other, but not both. Condition First, the Condition List displays the conditions in list form, instead of the tree form above. Three buttons are available next to the list: l l Add condition: Click to add a new rule. This will always branch the current condition as an "AND" operator.
l Value: A specified static text value. l l l l l l l l Expression: The JavaScript line that is evaluated. Note that the last value attribution to a variable is the one used as a result of the expression. Use JavaScript Editor: Click to display the Edit Script dialog (see "Using scripts in the DataMapper" on page 255). Use selected text: Inserts the text in the current data selection in the JavaScript Expression. If multiple lines or elements are selected, only the first one is used.
l is greater than: The first specified value is larger, numerically, than the second value for the condition to be True. is empty: The first specified value is empty. With this operator, there is no second value. Invert condition: Inverts the result of the condition. For instance, is empty becomes is not empty. l Multiple Conditions step properties The Multiple Conditons step contains a number of Case conditions (one to start with) and a Default, to be executed when none of the other cases apply.
l l l l l Trim: Select to trim empty characters at the beginning or the end of the field. Value: A specified static text value. Use selected text: Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used. Field: The Extracted Record field to use in the comparison. JavaScript : The result of a JavaScript Expression. l l l Value: The text value to use in the comparison.
l Extractor Property: The value of an internal extractor variable: l l Counter: The value of the current counter iteration in a Repeat step. Vertical Position: The current vertical position on the page, either in Measure (PDF) or Line (Text and CSV). Condition The Condition drop-down displays the cases in list form. Three buttons are available next to the list: l l l Add case: Click to add a new case to the step. It will be placed next to any existing cases.
The properties of the Goto step described in this topic become visible in the Step properties pane when you select the Goto step on the Steps pane. Description This subsection is collapsed by default in the interface, to give more screen space to other important parts. Name: The name of the step. This name will be displayed on top of the step's icon in the Steps pane. Comments: The text entered here will be displayed in the tooltip that appears when hovering over the step in the Steps pane.
options appear below to specify in which area of each line the Gotostep checks in: l Left: The starting column, inclusively. l Right: The end column, inclusively. l l Use selection: Click while a selection is made in the Data Viewer to automatically set the left and right values to the left and right edges of the selection. Next occurrence of: Jumps to the next occurrence of specific text or a text pattern, either anywhere on the line or in specific columns.
l Page: Jumps between pages or to a specific page. l l l From: Defines where the jump begins: l Current Position: The Gotobegins at the current cursor position. l Top of record: The Gotobegins at line 1 of the source record. Move by: Enter the number pages to jump. Next line with content: Jumps to the next line that has contents, either anywhere on the line or in specific columns.
l Use regular expression: Check so that the Expression box is treated as a regular expression instead of static text. For more information on using Regular Expressions (regex), see the Regular-Expressions.info Tutorial. CSV File l From (CSV files): Defines where the jump begins: l Current Position: The Goto begins at the current cursor position. l l Move by: Enter the number of lines or pages to jump. Top of record: The Gotobegins at line 1 of the source record.
The properties described below become visible in the Step properties pane when the Postprocessor step is selected in the Steps pane. Description This subsection is collapsed by default in the interface, to give more screen space to other important parts. Name: The name of the step. This name will be displayed on top of the step's icon in the Steps pane. Comments: The text entered here will be displayed in the tooltip that appears when hovering over the step in the Steps pane.
Postprocessor definition JavaScript l l l Expression: The JavaScript expression that will run on the Data Sample. See "DataMapper Scripts API" on page 252. Use JavaScript Editor: Click to display the Script Editor dialog. Use selected text: Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used. Toolbar In the DataMapper module, the following buttons are available in the top toolbar.
l l l l l l l l l l l l Add Condition Step : Adds a condition based on the current data selection. The "True" branch gets run when the text is found on the page. Other conditions are available in the step properties once it has been added. Add Repeat Step : Adds a loop that is based on the current data selection, and depending on the type of data. XML data will loop on the currently selected node, CSV loops for all rows in the record.
Welcome Screen The Welcome Screen appears when first starting up PlanetPress Connect. It offers some useful shortcuts to resources and to recent documents and data mapping configurations. If you are new to PlanetPress Connect and you don't know where to start, see "Welcome to PlanetPress Connect 1.8" on page 14. The Welcome Screen can be brought back in two ways: l The Welcome Screen button in the "Toolbars" on page 771. l From the Menus in Help, Welcome Screen.
l l Recent Templates: Lists recently used templates. Click any template to open it in the Designer module. Other Resources: l Documentation: Opens this documentation. l Courses (OL Learn): Opens the Objectif Lune e-Learning Center. l User Forums: Opens the Questions & Answer forums. DataMapper Scripts API This page describes the different features available in scripts created inside DataMapper. See "Using scripts in the DataMapper" on page 255.
Name Description Available in scripts of type "logger" on page 283 An object that allows to log error, warning or informational messages. Boundaries, all steps except Goto "record" on page 283 The current record in the main data set. Extract, Condition, Repeat and Multiple Conditions steps "region" on page 284 An object that defines a subsection of the input data. Boundaries "sourceRecord" on page 286 An object containing properties specific to the current source record being processed.
Name Description copyFile() Copies a file to the target file path, replacing it if it already exists. "createHTTPRequest()" on page 294 Creates a new HTTP Request Object. createTmpFile() Creates a file with a unique name in the temporary work folder and returns a file object. deleteFile() Deletes a file. execute() Calls an external program and waits for it to end. newByteArray() Returns a new byte array. newCharArray() Returns a character array. newDoubleArray() Returns a double array.
Using scripts in the DataMapper In the DataMapper every part of the extraction process can be customized using scripts. A script can be used to set boundaries for a data source (see "Setting boundaries using JavaScript" on page 257). The script determines where a new record starts. Scripts can also be used in different steps in the extraction workflow.
subsequently available. Keyboard shortcuts for the script editor are listed in the following topic: "Keyboard shortcuts" on page 738. Syntax rules In the DataMapper, all scripts must be written in JavaScript, following JavaScript syntax rules. For example, each statement should end with ; and the keywords that can be used, such as var to declare a variable, are JavaScript keywords. There are countless tutorials available on the Internet to familiarize yourself with the JavaScript syntax.
If this is saved as myFunction.js and imported, then the following would work anywhere in the configuration: var result = myAddFunction(25, 12); // returns 37! Setting boundaries using JavaScript As soon as you select the On Script option as the trigger for establishing record boundaries (see "Record boundaries" on page 117), you are instructing the DataMapper to read the source file sequentially and to trigger an event each and every time it hits a delimiter.
l Examine the data found in between delimiters for specific conditions. l Examine specific regions of that data, or the available data as a whole. l Compare the contents of one region with another. l Etc. To access this data in the script, use the get() function of the boundaries object. This function expects different parameters depending on the type of source file; see "Example" on page 266.
Note The first line is just the header with the names of the CSV columns. The data is already sorted per year, per artist, and per album. Your goal is to examine two values in each CSV record and to act when either changes. The DataMapper GUI allows you to specify a On Change trigger, but you can only specify a single field. So for instance, if you were to set the record boundary when the "Released" field changes, you'd get the first four lines together inside a single record.
simply the column name. The region is passed as a parameter to the get() method, which reads its contents and converts it into an array of strings (because any region, even a CSV field, may contain several lines). l l l To "remember" the values that were processed the last time the event was triggered, we use variables that remain available in between events. Note that these variables are specific to the Boundary context and not available in any other scripting context in the DataMapper.
The purpose of the script, again, is to set the record boundary when EITHER the year OR the artist changes. The script would look like this: /* Read the values of both columns we want to check */ var zeBand = boundaries.get(region.createRegion(1,1,30,1)); var zeYear = boundaries.get(region.createRegion(61,1,65,1)); /* Check that at least one of our variables holding previous values have been initialized already, before attempting to compare the values */ if (boundaries.
pages do not have a grid concept of lines and columns, the above parameters would instead be specified in millimeters relative to the upper left corner of each page. So for instance, to create a region for the Year, the code might look like this: region.createRegion(190,20,210,25) which would create a region located near the upper right corner of the page.
Property Description properties Returns a ScriptableAutomation object containing additional information (file name, process name and task ID) from PlanetPress Workflow. variables Returns a ScriptableAutomation object containing the list of local and global variables defined by the user in PlanetPress Workflow. Note that there is no way to distinguish local variables from global ones (local variables take precedence over global variables).
automation.properties.OriginalFilename; To access Workflow variables (declared in the Preprocessor properties): automation.variables.Same_as_workflow; boundaries Returns a boundaries object encapsulating properties and methods allowing to define the boundaries of each document in the job. This object is available when triggering document boundaries On script. Properties The following table lists the properties of the boundaries object.
Method Description Script type getVariable () Retrieves a value of a variable stored in the boundaries object. Boundaries set() Sets a new record boundary. (See: "Record boundaries" on page 117.) Boundaries setVariable () Sets a boundaries variable to the specified value, automatically creating the variable if it doesn't exist yet. Boundaries find() Method of the boundaries object that finds a string in a region of the data source file.
get() The get() method reads the contents of a region object and converts it into an array of strings (because any region may contain several lines). How the region is defined, depends on the type of source data; see "region" on page 284 and "Example" on page 285. get(in_Region) in_Region A region object. What type of object this is depends on the type of source data, however in any case the region object can be created with a call to region.createRegion(); see "Example" on page 285.
set(delimiters) delimiters Sets a new record boundary. The delimiters parameter is an offset from the current delimiter, expressed in an integer that represents a number of delimiters. If this parameter is not specified, then a value of 0 is assumed. A value of 0 indicates the record boundary occurs on the current delimiter. A negative value of -n indicates that the record boundary occurred -n delimiters before the current delimiter.
set the Boundary accordingly */ if((boundaries.currentDelim % 2) !=0 ) { /* Total is on odd page, let's set the document Boundary on delimiter further, thereby skipping the next blank page */ boundaries.set(1); } else { /* Total is on an even page, set the document Boundary to t current delimiter */ boundaries.set(); } } } setVariable() This method sets a variable in the boundaries to the specified value, automatically creating the variable if it doesn't exist yet.
data Returns a data object encapsulating properties and methods pertaining to the original data stream. Properties The following table lists the properties of the data object. Property Description Return type filename The path of the input file. Returns the fully qualified file name of the temporary work file being processed. properties Contains properties declared in the preprocessor step (see Preprocessor Step Properties for details).
Method Description Script type File type and Postprocessor steps "Examples" on page 279 Finds the first occurrence of a string starting from the current position. Boundaries "Examples" on page 282 Finds the first match for a regular expression pattern starting from the current position.
Number that represents the total height of the region, measured in lines. Setting the regionHeight to 0 instructs the DataMapper to extract all lines starting from the given position until the end of the record. Specifying an extraction height that is longer than the number of remaining lines results in a "step out of bound" error message. separator String inserted between all lines returned from the region. If you don't want anything to be inserted between the lines, specify an empty string ("").
Example 2: The script command data.extract(1,22,9,6,"
"); means that the left position of the extracted information is located at 1, the right position at 22, the offset position is 9 (since the first line number is 10) and the regionHeight is 6 (6 lines are selected). Finally, the "
" string is used for concatenation.
extract(xPath) Extracts the text value of the specified node in an XML file. xPath String that can be relative to the current location or absolute from the start of the record. Example The script command data.extract('./CUSTOMER/FirstName'); means that the extraction is made on the FirstName node under Customer.
extract(columnName, rowOffset) Extracts the text value from the specified column and row. columnName String that represents the column name. rowOffset Number that represents the row index (zero-based), relative to the current position. To extract the current row, specify 0 as the rowOffset. Use moveTo() to move the pointer in the source data file (see "Example" on page 290). Example The script command data.extract('ID',0); means that the extraction is made on the ID column in the first row.
extract(left, right, verticalOffset, lineHeight, separator) Extracts the text value from a rectangular region in a PDF file. All coordinates are expressed in millimeters. left Double that represents the distance from the left edge of the page to the left edge of the rectangular region. right Double that represents the distance from the left edge of the page to the right edge of the rectangular region. verticalOffset Double that represents the distance from the current vertical position.
lineHeight Double that represents the total height of the region. separator String inserted between all lines returned from the region. If you don't want anything to be inserted between the lines, specify an empty string (""). Tip "
" is a very handy string to use as a separator. When the extracted data is inserted in a Designer template, it will be interpreted as a line break, because
is a line break in HTML and Designer templates are actually HTML files. Example The script command data.
extractMeta() Method that extracts the value of a metadata field on a certain level in a PDF/VT. This method always return a String. extractMeta(levelName String, propertyName String) levelName String, specifying the PDF/VT's level. Case-sensitive. propertyName String, specifying the metadata field. fieldExists() Method of the data object that returns true if a certain metadata field, column or node exists. (See "data" on page 269.
fieldExists(levelName, propertyName) This method returns true if the given metadata field exists at the given level in a PDF file. levelName String that specifies the metadata field. propertyName String that specifies the level. fieldExists(fieldName) This method returns true if the specified column exists in the current record in a CSV file. fieldName String that represents a field name (column) in a CSV file.
Partial matches are not allowed. The entire string must be found between the two constraint parameters. The data.find() function only works on the current page. If the record contains several pages, you must create a loop that will perform a jump from one page to another to do a find() on each page. Note Calling this method does not move the current position to the location where the string was found.
Left=26,76, Top=149.77, Right=40,700001, Bottom=154.840302 These values represent the size of the rectangle that encloses the string in full, in millimeters relative to the upper left corner of the current page. findRegExp() Finds the first occurrence of a string that matches the given regular expression pattern, starting from the current position.
matching can be enabled by specifying the UNICODE_CASE flag (u) in conjunction with this flag. s: Enables dotall mode. In dotall mode, the expression . matches any character, including a line terminator. By default this expression does not match line terminators. L: Enables literal parsing of the pattern. When this flag is specified, then the input string that specifies the pattern is treated as a sequence of literal characters.
Examples data.findRegExp(/\d{3}-[A-Z]{3}/,"gi",50,100); or data.findRegExp("\\d{3}-[A-Z]{3}","gi",50,100);}} Both expressions would match the following strings: 001-ABC, 678-xYz. Note how in the second version, where the regular expression is specified as a string, some characters have to be escaped with an additional backslash, which is standard in JavaScript. db Object that allows to connect to a database. Methods The following table describes the methods of the db object.
user String that represents the user name for authentication. password String that represents the password for authentication. logger Global object that allows logging messages such as error, warning or informational messages. Methods The following table describes the methods of the logger object.
Example See this How-to for an example of how the current record index, and/or the total number of records in the record set, can be displayed in a document: How to get the record index and count. region The region object defines a sub-section of the input data. Its properties vary according to the type of data. This object is available when triggering document boundaries On script; see "Setting boundaries using JavaScript" on page 257. Methods The following table describes the methods of the region object.
Method Description Return Type () physical coordinates of the region object. coordinates. createRegion() This method sets the physical coordinates of the region object. The region is available when setting document boundaries using a script (see "region" on the previous page). PDF and Text: createRegion(x1, y1, x2, y2) Creates a region from the data, using the specified left (x1), top (y1), right (x2) and bottom (y2) parameters, expressed in characters for a text file or in millimeters for a PDF file.
} } (The match() function expects a regular expression; see w3schools.) CSV or database: createRegion(columnName) Creates a region from the data in a CSV file, using the specified columnName parameter. columnName String containing the name of the column where the region is to be created. Example This script checks the first value in a certain column. If it is not the same value as in the previous record(s), a document boundary is set. if(!(boundaries.Eof || boundaries.Bof)){ var recordValue = boundaries.
Example The property, used by the object Source Record, must first be declared in a Preprocessor step: 1. Enter the property Name. 2. Select Each record from the Scope drop-down list. 3. Select a Type for the Property. steps Returns a steps object encapsulating properties and methods pertaining to the current DataMapper process. This object is available in an Extract, Condition, Repeat or Multiple Conditions step script.
Methods and properties The following table lists the methods and properties of the steps object. These are available in Extract, Condition, Repeat, and Action steps, depending on the file type. Method Description File type currentPosition Returns the current position of the pointer in the data. Depending on the type of data being processed, the return value may be a string (e.g. XPath value in XML), an integer (e.g. line numbers in text ot tabular data), or a measure in millimeters(e.g. PDF data).
Method Description File type inside the current record. PDF Example if(steps.currentPage > curPage) { steps.moveTo(0, steps.currentPosition+14); /* Moves the current position to 14 lines below the current position of the pointer in the data */ curPage++; } else if(curLine.startsWith("LOAD FACTOR")) { /* Extracts data to the curLine variable until the string "LOAD FACTOR" is encountered */ break; } else { lineArray.
With the scope set to 0 or steps.MOVELINES, verticalPosition represents the index of the line to move to from the top of the record. With the scope set to 1 or steps.MOVEDELIMITERS, verticalPosition represents the index of the delimiter (as defined in the Input Data settings) to move to from the top of the record. With the scope set to 2, verticalPosition is not used. The position is moved to the next line after the current position that contains any text.
With the scope set to 1 or steps.MOVEPAGES, verticalOffsetrepresents the index of the target page, relative to the top of the record. moveTo(xPath) Moves the current position in a XML file to the first instance of the given node, relative to the top of the record. xPath String that defines a node in the XML file. Tip The XML elements drop-down (on the Settings pane, under Input Data) lists xPaths defining nodes in the current XML file.
l l l 0 or steps.MOVELINES: the current position is set to the next line. 1 or steps.MOVEDELIMITERS: the current position is set to the next delimiter (as defined in the Input Data settings). 2 (next line with content): the current position is set to the next line that contains any text. Example The following line of code moves the current position to the next line that contains any text. steps.moveToNext(2); XML scope Number that may be set to: l l 0 or steps.
copyFile(source, target) source String that specifies the source file path and name. target String that specifies the target file path and name. Example This script copies the file test.txt from c:\Content into the c:\out folder. copyFile("c:\Content\test.txt","c:\out\") createTmpFile() Function that creates a file with a unique name in the temporary work folder and returns a file object. This file stores data temporarily in memory or in a buffer.
writer.newLine(); } } finally{ // Close the writer of the temporary file writer.close(); } } finally{ // Close the reader reader.close(); } deleteFile(data.filename); tmpFile.move(data.filename); createHTTPRequest() Function that creates a new ScriptableHTTPRequest object, in order to issue REST/AJAX calls to external servers.
Supported properties l response l status l statusText l timeout (ms). Default: 1 minute. Supported methods create() l l open(String method, String url, String user, String password) open(String verb, String url, String userName, String password, String[] headers, String[] headervalues, String requestBody) l send() l send(String requestBody) Creates a new instance of ScriptableHTTPRequest. Opens a HTTP request. Note If you don't use a user name and password, pass empty strings: request.
getResponseBody() Returns the full response body of the last HTTP request. setRequestBody(String requestBody) Sets the HTTP request body (for POST and PUT). getPassword() Gets the password for HTPP basic authentication setPassword(String password) Sets the password for HTPP basic authentication getTimeout() Gets the time to wait for the server's response setTimeout(int timeout) Sets the time (in ms.) to wait for the server's response.
Examples 1. Deleting a file in a local folder: deleteFile("c:\Content\test.txt"); 2. Deleting the sample data file used in the DataMapper: deleteFile(data.filename); execute() Function that calls an external program and waits for it to end. execute(command) Calls an external program and waits for it to end. command String that specifies the path and file name of the program to execute. newByteArray() Function that returns a new byte array.
newDoubleArray() Function that returns a new double array. newDoubleArray(size) Returns a new Double array of the specified number of elements. size Integer that represents the number of elements in the new array. newFloatArray() Function that returns a new float array. newFloatArray(size) Returns a new Float array of the specified number of elements. size Integer that represents the number of elements in the new array. newIntArray() Function that returns a new array of Integers.
Integer that represents the number of elements in the new array. newStringArray() Function that returns a new string array. newStringArray(size) Returns a new String array of the specified number of elements. size Integer that represents the number of elements in the new array. openBinaryReader() Function that opens a file as a binary file for reading purposes. The function returns a BinaryReader object. openBinaryReader(filename) filename String that represents the name of the file to open.
openTextReader(filename,encoding) filename String that represents the name of the file to open. encoding String that specifies the encoding of the file to read (UTF-8, ISO-8859-1, etc.). Example In the following example, the openTextReader() function is used to open the actual data sample file in the Data Mapper for reading. var var var var fileIn = openTextReader(data.filename); tmp = createTmpFile(); fileOut = openTextWriter(tmp.getPath()); line; while((line = fileIn.readLine())!=null){ fileOut.
append Boolean parameter that specifies whether the file pointer should initially be positioned at the end of the existing file (append mode) or at the beginning of the file (overwrite mode). Example In the following example, the openTextWriter function is used to open the newly created temporary file for writing: var var var var fileIn = openTextReader(data.filename); tmp = createTmpFile(); fileOut = openTextWriter(tmp.getPath()); line; while ((line = fileIn.readLine())!=null){ fileOut.write(line.
The Designer The Designer is a WYSIWYG (what you see is what you get) editor that lets you create templates for various output channels: Print, Email and Web. A template may contain designs for multiple output channels: a letter intended for print and an e-mail variant of the same message, for example. Content, like the body of the message or letter, can be shared across these contexts. Templates are personalized using scripts and variable data extracted via the DataMapper.
1. Create a template Create a template, using one of the Template Wizards. See "Creating a template" on the facing page. 2. Fill the template Add text, images and other elements to the template and style them. See "Content elements" on page 465 and "Styling and formatting" on page 551. 3. Personalize the content Personalize the content using variable data. See "Personalizing Content" on page 592. 4.
"Content elements" on page 465. Elements make up the biggest part of the content of each design. "Snippets" on page 548. Snippets help share content between contexts, or insert content conditionally. "Styling and formatting" on page 551. Make your Designer templates look pretty and give them the same look and feel with style sheets. "Personalizing Content" on page 592. Personalize your customer communications using variable data. "Writing your own scripts" on page 624.
l "Creating a Web template with a Wizard" on page 382 Tip The quickest way to create a Print template based on a PDF file is to right-click the PDF file in the Windows Explorer and select Enhance with Connect. After creating a template you can add the other contexts (see "Contexts" on page 320), as well as extra sections (see "Sections" on page 321), to the template. It is, however, not possible to use a Template Wizard when adding a context or section to an existing template.
dialog. When the package contains print presets, you will be asked if you want to import them into the proper repositories. Saving a template A Designer template file has the extension .OL-template. It is a zip file that includes up to 3 contexts, all the related resources and scripts, and (optionally) a link to a Data Mapping Configuration. To save a template for the first time, select File > Save as. After that you can save the template by selecting File > Save or pressing Ctrl+S.
To change which data mapping configuration is linked to the template, open both the template and the data mapping configuration that should be linked to it; then save the template. Auto Save After a template has been saved for the first time, Connect Designer can auto save the template with a regular interval. To configure Auto Save: 1. Select the menu option Window > Preferences > Save. 2. Under Auto save, check the option Enable to activate the Auto Save function. 3.
Sharing a template To share a template, you can send the template file itself, or save the template to a package file, optionally together with a Data Mapping Configuration, a Job Creation Preset and an Output Creation Preset. (See "Job Creation Presets" on page 840 and "Output Creation Settings" on page 850 for more details.) To create a package file, select File > Send to Workflow and choose File in the Destination box. For the other options, see "Sending files to Workflow" on the next page.
The following zip file contains both the template and data mapping configuration that are used to generate the standard template report: http://help.objectiflune.com/en/archive/reporttemplate.zip. Generating output from the Designer Output can be generated directly from the Designer; see "Generating Print output" on page 956, "Generating Email output" on page 973 and "Generating Web output" on page 981. To test a template first, select Context > Preflight.
5. Use the drop-down to select an Output Creation Preset. Click Browse to select a preset that is not in the default location for presets. An Output Creation Preset file has the extension .OL-outputpreset. 6. Finally, choose the Destination: use the drop-down to select where to send the files. The option Workflow machines lists all the PlanetPress Workflow installations detected on the network. Select File to save the files as a package that can be loaded within the Workflow tool.
1. l l In the Welcome screen that appears after startup, choose Browse Template Wizards. Scroll down until you see the Foundation Web Page Starter Template Wizards. Alternatively, on the File menu, click New, expand the Template folder, and then expand the Foundation Web Page Starter folder. 2. Select a template.
l Primary: links on the page. l Secondary: secondary links on the page. l Text: text on the page contained in paragraphs (
). l Headings: all headings (
through ) including the heading section's subhead. 4. Click Finish to create the template. The Wizard creates: l l l l A Web context with one web page template (also called a section) in it.
Use the Styles pane next to the Attributes pane to see which styles are applied to the currently selected element. Tip Click the Edges button on the toolbar to make borders of elements visible on the Design tab. The borders will not be visible on the Preview tab. Web Template Wizards Foundation All Web Template Wizards in Connect Designer make use of the Zurb Foundation front-end framework. A front-end framework is a collection of HTML, CSS, and JavaScript files to build upon.
Blank web page The Blank Web Page template is a very simple Foundation template that contains a top bar menu and some basic contents to get you started. Capture OnTheGo template wizards With the Designer you can create Capture OnTheGo (COTG) templates. COTG templates are used to generate forms for the Capture OnTheGo mobile application. For more information about this application, see the website: Capture OnTheGo.
user-friendly as possible. See "Designing a COTG Template" on page 413. Creating a COTG template using a Wizard To create a COTG template with a Template Wizard: 1. l l In the Welcome screen that appears after startup and when you click the Home icon at the top right, choose Browse Template Wizards. Scroll down until you see the Capture OnTheGo Starter Template Wizards. Alternatively, on the File menu, click New, expand the Template folder, and then expand the Capture OnTheGo Starter folder. 2.
3. Click Next and make adjustments to the initial settings. l l l l Create Off-Canvas navigation menu: an Off-Canvas menu is a Foundation component that lets you navigate between level 4 headings (
) in the form. Check this option to add the menu automatically. Submit URL: enter the URL where the form data should be sent. The URL should be a server-side script that can accept COTG Form data. The Title and the Logo that you choose will be displayed at the top of the Form.
http://127.0.0.1:8080/action (8080 is Workflow's default port number; 'action' should be replaced by the HTTP action of that particular HTTP Server Input task). The method of a Capture OnTheGo form should be POST to ensure that it doesn't hit a data limit when submitting the form. The GET method adds the data to the URL, and the length of a URL is limited to 2048 characters. Especially forms containing one or more Camera inputs may produce a voluminous data stream that doesn't fit in the URL.
Tip Click the Edges button on the toolbar to make borders of elements visible on the Design tab. The borders will not be visible on the Preview tab. Resources This page clarifies the difference between Internal, External and Web resources that may be used in a template, and explains how to refer to them in HTML and in scripts. Internal resources Internal resources are files that are added to and saved with the template.
Note When referring to images or fonts from a CSS file, you need to remember that the current path is css/, meaning you can't just call images/image.jpg. Use a relative path, for example: #header { background-image: url('../images/image.jpg'); } External resources External resources are not stored in the template, but on the local hard drive or on a network drive. They are accessed using a path. The path must have forward slashes, for example PAGE 320
l l "Static Resources", as set in the preferences, are accessed using the resource path, by default something like http://servername:8080/_iRes/images/image.jpg. (For guidance on setting the preferences, search for 'HTTP Server Input 2' in the PlanetPress Workflow help files on: OL Help). Resources can also be served by processes: http://servername:8080/my_ process?filename=image.jpg (assuming "my_process" is the action in the HTTP Server Input).
If present in the same template, a Print context and a Web context can be attached to an Email context. Outputting other combinations of contexts, and selecting sections based on a value in the data, can be done via a Control Script; see "Control Scripts" on page 645. Adding a context To add a context, right-click the Contexts folder on the Resources pane and click New print context, New email context or New web context. Only one context of each type can be present in a template.
Tip If an Email context is going to be part of the template, it is recommended to start with an Email Template Wizard; see "Creating an Email template with a Wizard" on page 364. After creating a template, contexts can be added to it, but that can not be done with a wizard. Editing a section To open a section, expand the Contexts folder on the Resources pane, expand the respective context (Print, Email or Web) and double-click a section to open it.
Warning No backup files are maintained in the template. The only way to recover a deleted section, is to click Undo on the Edit menu, until the deleted section is restored. After closing and reopening the template it is no longer possible to restore the deleted context this way. Renaming a section To rename a section: l On the Resources pane, expand the Contexts folder, expand the folder of the respective context, right-click the name of the section, and then click Rename.
1. Click and hold the mouse button on the style sheet on the Resources pane. 2. Move the mouse cursor within the Resources pane to the section to which the style sheet should be applied. 3. Release the mouse button. Using the Includes dialog 1. On the Resources pane, right-click the section, then click Includes. 2. From the File types dropdown, select Stylesheets. 3. Choose which CSS files should be applied to this section. The available files are listed at the left.
Outputting sections Which sections are added to the output, depends on the type of context they are in. When generating output from the Print context, each of the Print sections is added to the output document, one after the other in sequence, for each record. The sections are added to the output in the order in which they appear on the Resources pane. See "Generating Print output" on page 956. In email and web output, only one section can be executed at a time.
When a Print template is created or when a Print context is added to an existing template the Print context folder is created along with other folders and files that are specific to a Print context (see "Creating a Print template with a Wizard" on the next page, "Adding a context" on page 321 and "Print context" on page 332). Only one Print section is created at the start, but you can add as many Print sections as you need; see "Print sections" on page 335.
media, in the form of a PDF file, to the Media folder. Media can be applied to pages in a Print section, to make them appear as a background to those pages. This ensures that elements added to the Print context will correspond to their correct location on the preprinted media. When both Media and a Master Page are used on a certain page, they will both be displayed on the Preview tab of the workspace, the Master Page being 'in front' of the Media and the Print section on top.
l l Select the PDF-based Print wizard. Or expand the Basic Print templates folder, select Postcard or Formal Letter and click Next. See "Print Template Wizards" below for information about the various types of Template wizards. 2. Make adjustments to the initial settings (the options for each type of template are listed below). Click Next to go to the next settings page if there is one. 3. Click Finish to create the template.
l l l l Two Master Pages that each contain a background image. The first Master Page is applied to the front of every page in the Print section. The second Master Page is applied to the back of every page in the Print section. See "Master Pages" on page 350. Scripts and selectors for variable data. The Scripts pane shows, for example, a script called "first_name".
l l Click the Browse button to select a signature image. This image will appear above the sender's name and title. Select Virtual Stationery: a PDF file with the letterhead stationery. Also see Media. When you click Finish, the Wizard creates: l l l l A Print context with one section in it; see "Print context" on page 332 and "Print sections" on page 335. One empty Master Page.
PDF-based Print template Tip The quickest way to create a Print template based on a PDF file is to right-click the PDF file in the Windows Explorer and select Enhance with Connect. The PDF-based Print template wizard creates a document from an existing PDF file: a brochure, voucher, letter, etc. The PDF is used as the background image of the Print section (see "Using a PDF file as background image" on page 339).
Print context The Print context is the folder in the Designer that can contain one or more Print templates. Print templates, also called Print sections, are part of the Print context. They are meant to be printed to a printer or printer stream, or to a PDF file (see "Generating Print output" on page 956). The Print context can also be added to Email output as a PDF attachment; see "Generating Email output" on page 973.
l One Master Page is added to the template, as can be seen on the Resources pane, in the Master Page folder. In Print sections, there are often elements that need to be repeated across pages, like headers, footers and logos. In addition, some elements should appear on each first page, or only on pages in between the first and the last page, or only on the last page. Examples are a different header on the first page, and a tear-off slip that should show up on the last page.
It is also possible to exclude sections from the output, or to include a section only on a certain condition that depends on a value in the data. This can be done using a Control Script; see "Control Scripts" on page 645. Printing on both sides To print a Print section on both sides of the paper, that Print section needs to have the Duplex printing option to be enabled; see "Enabling double-sided printing (Duplex, Mixplex)" on page 342.
1. Create a Job Creation Preset that overrides the settings of one or more sections: select File > Presets and see "Job Creation Presets" on page 840 for more details. 2. Select that Job Creation Preset in the Print wizard; see "Generating Print output" on page 956. Setting the bleed The bleed is the printable space around a page. It can be used on some printers to ensure that no unprinted edges occur in the final trimmed document. The bleed is one of the settings for a section.
This is what Master Pages are used for. Master Pages can only be used in the Print context. See "Master Pages" on page 350 for an explanation of how to fill them and how to apply them to different pages. Using stationery (Media) When the output of a Print context is meant to be printed on paper that already has graphical and text elements on it (called stationery, or preprinted sheets), you can add a copy of this media, in the form of a PDF file, to the Media folder.
to be printed out on paper. When a Print template is created (see "Creating a Print template with a Wizard" on page 327 and "Print context" on page 332), only one Print section is added to it, but you can add as many print sections as you need. To add a section to a context: l On the Resources pane, expand the Contexts folder, right-click the Print context , and then click New section.
Warning No backup files are maintained in the template. The only way to recover a deleted section, is to click Undo on the Edit menu, until the deleted section is restored. After closing and reopening the template it is no longer possible to restore the deleted context this way. Arranging Print sections When generating output from the Print context, each of the Print sections is added to the output document, one after the other in sequence, for each record.
1. On the Resources pane, right-click the section, then click Includes. 2. From the File types dropdown, select Stylesheets. 3. Choose which CSS files should be applied to this section. The available files are listed at the left. Use the arrow buttons to move the files that should be included to the list at the right. 4. You can also change the order in which the CSS files are read: click one of the included CSS files and use the Up and Down buttons.
file that was used as input file, or another type of input file, converted to a PDF file. With this option you don't need to make any other settings; click OK to close the dialog. 3. For a PDF resource, you have to specify where it is located. Clicking the Select Image button opens the Select Image dialog (see "Select Image dialog" on page 725). Click Resources, Disk or Url, depending on where the image is located.
5. Optionally, if the PDF has more than one page, you can set the range of pages that should be used. Note The number of pages in the Print section is automatically adjusted to the number of pages in the PDF file that are being used as the section's background image. 6. Finally, click OK. Note To set the background of a section in script, you need a Control Script; see "Control Scripts" on page 645 and "Control Script API" on page 930.
1. Create a Job Creation Preset that overrides the settings of one or more sections: select File > Presets and see "Job Creation Presets" on page 840 for more details. 2. Select that Job Creation Preset in the Print wizard; see "Generating Print output" on page 956. Enabling double-sided printing (Duplex, Mixplex) To print a Print section on both sides of the paper, that Print section needs to have the Duplex printing option to be enabled. This is an option in the Sheet Configuration dialog.
Pages Unlike emails and web pages, Print sections can contain multiple pages. Pages are naturally limited by their size and margins. If the content of a section doesn't fit on one page, the overflow goes to the next page. This happens automatically, based on the section's page size and margins; see "Page settings: size, margins and bleed" on the facing page.
When it comes to positioning elements on a page, Guides can be useful, as well as Tables. See "How to position elements" on page 567. Page settings: size, margins and bleed On paper, whether it is real or virtual, content is naturally limited by the page size and margins. These, as well as the bleed, are set per Print section, as follows: l On the Resources pane, right-click a section in the Print context and click Properties.
1. Import the promotional image or snippet; see "Images" on page 537 and "Snippets" on page 548. 2. Insert the promotional image or snippet in the content. Note l l Only a top-level element (for example, a paragraph that is not inside a table or div) can function as a whitespace element. Do not place the promotional image or snippet inside an absolute positioned box. Whitespacing only works for elements that are part of the text flow, not for absolute-positioned boxes. 3.
l l l l Content page number: The current page number in the document, counting only pages with contents that are supplied by the Print section. A page that has a Master Page (as set in the Sheet Configuration dialog, see "Applying a Master Page to a page in a Print section" on page 352) but no contents, is not included in the Content page count. Content page count: This is the total number of pages in the current document that have contents, supplied by the Print section.
1. On the Resources pane, right-click a section in the Print context and click Numbering. 2. Uncheck Restart Numbering if you want the page numbers to get consecutive page numbers, instead of restarting the page numbering with this section. Note Even if a section is disabled, so it doesn't produce any output, this setting is still taken into account for the other sections. This means that if Restart Numbering is checked on a disabled section, the page numbering will be restarted on the next section.
In the entire Print context To prevent widows and orphans in the entire Print context: 1. On the menu, select Edit > Stylesheets. 2. Select the Print context. 3. Click New (or, when there are already CSS rules for paragraphs, click the selector p and click Edit). 4. Click Format. 5. After Widows and Orphans, type the minimum number of lines that should be kept together. Alternatively, manually set the set the widows and orphans properties in a style sheet: 1.
requires setting the Connect-specific data-breakable attribute on all of its rows. You can either open the Source tab, or write a script to replace each
with
. Note that the effect will only be visible in Preview mode. To set the number of widows and orphans for a table: 1. Open the Formatting dialog. To do this, you can: l l Select the table using the breadcrumbs or the Outline pane (next to the Resources pane) and then select Format > Table in the menu.Note You cannot use these properties on an empty
or on absolute-positioned elements. Preventing a page break To prevent a page break inside a certain element, set the page-break-inside property of that element to avoid: l Select the element (see "Selecting an element" on page 469). l On the Format menu, select the respective element to open the Formatting dialog. l In the Breaks group, set the inside property to avoid, to prevent a page break inside the element.
"Adding a Master Page" below. Initially, the original Master Page will be applied to all pages, but different Master Pages can be applied to different pages; see "Applying a Master Page to a page in a Print section" on the facing page. Examples There are a few How-tos that demonstrate the use of Master Pages: l Showing a Terms and Conditions on the back of the first page only. l A tear-off section on the first page of an invoice. l Tips and tricks for Media and Master Pages.
Keep in mind that a Master Page always remains a single page. Its content cannot overflow to a next page. Content that doesn't fit, will not be displayed. Note Editing the Master Page is optional. One Master Page must always exist in a Print template, but if you don't need it, you can leave it empty. Adding a header and footer Headers and footers are not designed as part of the contents of a Print section, but as part of a Master Page, which is then applied to a page in a print section.
set a different Master Page and Media (see "Media" below). It can even have two master pages, if printing is done on both sides (called duplex printing). To apply Master Pages to specific page positions in a Print section: 1. On the Resources pane, expand the Print context; right-click the Print section, and click Sheet configuration. 2. Optionally, check Duplex to enable content to be printed on the back of each sheet. Your printer must support duplex for this option to work.
Media can be applied to pages in a Print section, to make them appear as a background to those pages. This ensures that elements added to the Print context will correspond to their correct location on the preprinted media. For further explanation about how to apply Media to different pages, see "Applying Media to a page in a Print section" on page 357. Media will not be printed, unless you want them to; see below.
type of image file) for both the front and the back of the Media, and you can determine how the virtual stationery should be positioned on the page. This is done as follows: 1. On the Resources pane, expand the Contexts folder, expand the Media folder, rightclick the Media and click Properties. 2. Now you can change the name and page size of the Media. Note that it isn't possible to change the page size once the Media is applied to a section. Media can only be applied to sections that have the same size. 3.
8. For each of the PDF files, select a position: l Fit to page stretches the PDF to fit the page size. l Centered centers the PDF on the page, vertically and horizontally. l Absolute places the PDF at a specific location on the page. Use the Top field to specify the distance between the top side of the page and the top side of the PDF, and the Left field to specify the distance between the left side of the page and the left side of the PDF. 9. Finally, click OK.
l l On the Resources pane, expand the Contexts folder, expand the Media folder, rightclick the Media and click Rename. Type the new name and click OK. Alternatively, on the Resources pane, expand the Contexts folder, expand the Media folder, right-click the Media and click Properties. Type the new name in the Name field and click OK.
Dynamically switching the Media In addition to applying Media to sheets via the settings, it is possible to change Media dynamically, based on a value in a data field, in a script. The script has already been made; you only have to change the name of the Media and the section in the script, and write the condition on which the Media has to be replaced. 1. On the Resources pane, expand the Contexts folder, expand the Print context, rightclick the print section and click Sheet configuration. 2.
l l On the Resources pane, expand the Print context; right-click the Print section, and click Sheet configuration. Click one of the options next to Media rotation. The Media (to be more accurate: the Virtual Stationery images specified for this Media) as well as the section's background image will be rotated accordingly in the entire section. Note that any Virtual Stationery settings made for the Media also influence how the Media is displayed in each section (see "Setting Media properties" on page 354).
Email template It is strongly recommended to start creating an Email template with a Wizard; see "Creating an Email template with a Wizard" on page 364. Designing HTML email that displays properly on a variety of devices and screen sizes is challenging. Building an email is not like building for the web. While web browsers comply with standards (to a significant extent), email clients do not. Different email clients interpret the same HTML and CSS styles in totally different ways.
Designing an Email template With the Designer you can design Email templates. It is strongly recommended to start creating an Email template with an Email Template Wizard, because it is challenging to design HTML email that looks good on all email clients, devices and screen sizes that customers use when they are reading their email.
Email templates: Slate and others The most obvious solution offered in the Designer is to use one of the templates provided with the Designer; see "Creating an Email template with a Wizard" on page 364. The layout of these templates has been tested and proven to look good in any email client, on any device and screen size. The Tables in these templates are nested (put inside another table) and they have no visible borders, so readers won't notice them.
To learn more about Emmet, please see their website: Emmet.io and the Emmet.io documentation: http://docs.emmet.io/. Preferences To change the way Emmet works in the Designer, select Window > Preferences, and in the Preferences dialog, select Emmet; see "Emmet Preferences" on page 706. Using CSS files with HTML email Email clients do not read CSS files and some even remove a