resizing in the Print contexts. l Enable for Web Context: Check to enable
resizing in the Web contexts.
l l l Bleed box: This color delineates the printable area on a page; see "Page settings: size, margins and bleed" on page 409. Master pages: These edges are only visible on Master pages; see "Master Pages" on page 416. l l l Margins: This color delineates the content area on a page; see "Pages" on page 408. Header and Footer Margin: This color highlights the header and footer margin set for the Master page; see "Adding a header and footer" on page 417.
l l Email Address: Enter the email that is set by default in the "From Email" field in the Send Email and Send Test Email dialogs ("Send (Test) Email" on page 815). Litmus account Group: l Email Test address: If you have a Litmus account, enter the test address to use when sending a test email (see "Send (Test) Email" on page 815). For more information on Litmus, please see http://litmus.com/.
l Apply: This option Applies the settings made within the current Preferences page, but does not close the Preferences dialog. -----------------------------------------------------------------------------------------Emmet Preferences Emmet is a framework that enables the lightning-fast creation of HTML code though the use of a simple and effective shortcut language resembling CSS Selectors (see "Emmet" on page 428).
l Extensions Path: Choose a folder where to put json and js files to extend Emmet. This includes custom snippets, preferences and syntax profiles. For more information see Customization. Emmet Abbreviation Preferences This Preferences tab lets you add and manage custom abbreviations. All standard abbreviations can be found in Emmet's documentation: Abbreviations. If there is no need to transform the text while expanding it, create an Emmet snippet instead (see below). l New: Add a new abbreviation.
while they all have identical options, they control different output types: CSS, HAML, HTML, XML, XSL and the "Default" one controlling the rest of the types. These options are equivalent to Emmet's syntaxProfiles.json feature. Emmet Snippets Preferences Emmet Snippet are similar to abbreviations in that they are expanded when the Tab key is pressed, but they are just blocks of plain text. Anything in a snippet will be outputted “as is”, without any transformation. l New: Click to create a new snippet.
In the example above, ${lang} is used to refer lang variable defined in variables below. If your primary language is, for example, Russian, you can simply override lang variable with ru value and keep the original snippets. Also, you can override variable values with inline abbreviation attributes: html:5[lang=ru]. l Name: The name of the variable. This should be a single alphanumeric string with no spaces or special characters. For example, the myVar name is referred to as ${myVar}.
l Apply: This option Applies the settings made within the current Preferences page, but does not close the Preferences dialog. -----------------------------------------------------------------------------------------Logging Setting Preferences PReS Connect logs the activities it undertaking consistently as it runs. These log files are essential when diagnosing issues with OL Support. New Connect logs but are created daily, so they need to be deleted periodically.
l l Number of files to keep:This sets the maximum number of log files kept in the log folder. The default value is set to 50 for a new Connect installation and 99, 999 for an existing installation (to preserve backward compatibility). Logging pattern edit box: This edit box allows customization of the logging. This controls the formatting of individual log entries, as well as determining what actually gets logged. Warning We heavily recommend leaving the Logging patterns to the default value.
Definition Files. l Printer checkbox: This checkbox selects/deselects all printers in the list. Click to check all, click again to uncheck all. General Print Preferences The General Print Preferences are used to set communication settings with the PReS Connect Server module that does the actual generation of print output. The Server module can be located on the same computer (hostname: localhost) or on a different machine.
l Flip insert guide axis: Check this option to flip the axis on which guides are inserted. Normally, dragging a guide from a horizontal ruler inserts a horizontal guide (see "Guides" on page 643). With this option checked, dragging a guide from a horizontal ruler inserts a vertical guide. The Print Preferences also provides you with buttons to : l l l Test Print Server URL. This button is only available for the General Print Preferences.
l l l Enable: activate the Auto Backup function. Revisions to keep: Enter the maximum number of backup files. When the maximum is reached, Auto Backup will overwrite the oldest file. Destination: Select the directory in which the backups should be stored. l Original: the directory in which the original file is stored. l Other directory: use the Browse button to select another directory.
Scheduling - Merge engine This preferences page defines how different instances and speed units are attributed to different jobs when creating output documents. For a detailed description of all options, see "Merge engine scheduling" on page 123. Scheduling - Weaver engine This preference page determines the number of engines launched, as well as their speed, when generating Print Output of any type. For a detailed description of all options, see "Weaver engine scheduling" on page 127.
l l Restore Defaults. This option restores the preferences to Defaults. This applies to the current Preferences page only, but not other Preferences. Apply: This option Applies the settings made within the current Preferences page, but does not close the Preferences dialog. -----------------------------------------------------------------------------------------Web Preferences Web Form Preferences These preferences define the default behavior of some form elements.
l l After element: The element is inserted after the current element where the cursor is located. For example if the cursor is within a paragraph, insertion occurs after the
tag. Get Job Data File: Defines the Workflow URL to be used when the Get Job Data File on submit toolbar button is active. This simplifies the process of creating and testing COTG Forms (see "Capture OnTheGo" on page 474). l Workflow URL: The default URL is: http://127.0.0.
The Connect Server Configuration dialog is separated into individual pages, where each page controls certain aspects of the software. The following pages are available: l "Clean-up Service preferences" on page 782 preferences l "Database Connection preferences" on page 787 preferences l "Language Setting Preferences" on page 797 preferences l Scheduling - These entries differ between the Server Extension (Slave) and main Server module (Master or Standalone) installations.
create Email and Web output, or to create an intermediary file for Printed output. The intermediary file is in turn used by a Weaver engine to prepare the Print output. (For more information see: "Connect: a peek under the hood" on page 154). Settings for these engines are made in the Connect Server Configuration tool (see "Server Configuration Settings" on page 109). These 'Scheduling Preferences' allow you to control precisely how the PReS Connect Connect Server handles jobs.
l l The processing power of your machine(s). How many cores it has determines how many engines can be launched (see "Launching multiple engines" on the next page). The size and number of jobs of one kind that need to be handled, sequentially or simultaneously. In other words, your use case. By allocating processing power to jobs of different sizes you can make the setup match your usage situation (see "Allocating processing power to jobs" on page 115).
In situations where Print and Email and/or Web output are created at the same time, only the Merge engines that create Email/Web output count towards the maximum number of speed units for that type of output. Spare speed units are distributed proportionally Since the number of engines is configurable, and jobs may run concurrently, the number of engines in use may not match the exact number of available speed units.
3. Set Local engines launched to a number appropriate for your system. See "Deciding how many engines of each type to launch " below. 4. Click OK or Apply. It is advised that you do not configure more engines than can be backed by actual processing power. This adds overhead while not adding processing power. Deciding how many engines of each type to launch When jobs run in parallel, different types of engines may run at the same time.
Weaver engine Adding an extra Weaver engine might be useful when large Print jobs have to run simultaneously with smaller Print jobs. Memory per engine By default, each engine is set to use 640MB of RAM. To make optimum use of the machine's capabilities it might be useful to increase the amount of memory that an engine can use. l l l A DataMapper engine may run better with more memory when large jobs bring a lot of data mapping.
Job size Connect lets you define job sizes by setting the maximum number of records in a small job, and the minimum number of records in a large job. Jobs that are neither small nor large are medium sized. (Note that the term 'records' refers to top-level records only. Detail records are not considered.) Determining the size of small, medium and large jobs is important because you can assign more resources to medium and large jobs via the settings for Merge and Weaver engines.
3. Set the Parallel engines per job for medium and large Print jobs; small jobs always get one engine. You cannot assign more engines than the total number of engines launched. 4. Do the same for the Weaver engine. 5. Click OK or Apply.
4. Click OK or Apply. Number of speed units for Email and Web Although assigning parallel speed units to Email and HTML jobs is possible (on the Merge Engine settings page), it is advised to use only one speed unit per job, firstly because these jobs are usually small. Secondly, HTML jobs need to be handled as soon as possible, particularly if a request was made over the internet; you don't want those jobs to be kept waiting until the required number of speed units becomes available.
1. Select Window > Preferences... from the menu. 2. Under Scheduling, select Merge Engine, or Weaver Engine. How the Server decides if a job can be handled In summary, this is how jobs are handled when they can run in parallel. l l l l Whenever a job comes in, the number of engines to use is determined. (For Print jobs, this is based on whether the operation is small, medium or large; see "Job size" on page 116.
Mixed jobs that are processed in parallel. In a situation where small, medium and large jobs can come in at any time and should be handled in parallel, the challenge is to find a balance between how much power can be allocated to jobs (to minimize the time they cost) and how long they can wait. No single job should require all of the processing power, unless it is acceptable for it to have to wait until the maximum number of engines finally comes available and then all other jobs will have to wait.
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. Scheduling properties - Slave These are the options that you will be presented with if the PReS Connect Connect Server Extension was installed.
Note There is no requirement for the Master and Extension servers to belong to the same IP subnet. IP subnetting is beyond the scope of this documentation, but more information can be found here: https://en.wikipedia.org/wiki/Subnetwork l Username for the master server entry: 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.
l The Maximum records in a small job and Minimum records in a large job entries are available in this screen, but they are not actually used in Server Extensions, even though they are present in the dialog. All server scheduling is actually handled by the Master Server. Scheduling preferences per engine Scheduling preferences can be applied to the distinct engines used in the Connect production process. A DataMapper engine extracts data from a data file.
The Merge engine is responsible for the plugins Create Print Content, Create Email Content and Create Web Content. License restrictions only apply to the Merge engine when creating Email or Web content. They do not apply for Create Print Content. This means you are allowed to start an infinite amount of Merge engines on any given Connect Sever to run print jobs, but you will be restricted to a set number of Merge engines for your Email and HTML jobs.
l Memory per engine (mb): Specify the maximum amount of random access memory (RAM) in megabytes that will be used per engine in order to make optimal use of the machine's memory. Note This setting only controls the maximum size of the Java heap memory that an engine can use; the total amount of memory that will used by an engine is actually a bit higher. Also keep in mind that the Connect Server and the operating system itself will need memory to keep running.
l Parallel engines per job group: This area determines how many Merge engines are used for each print job of a particular size. Small print jobs always get just one engine. l l l Parallel engines per medium print job: Enter the number of engines that will cooperate on a medium print job. Parallel engines per large print job: Enter the number of engines that will cooperate on a large print job.
then 2 will be Floating. l l l l Small print job speed unit reservations: Enter the number of engines to be reserved for Small print jobs. Medium print job speed unit reservations: Enter the number of engines to be reserved for Medium print jobs. Large print job speed unit reservations: Enter the number of engines to be reserved for Large print jobs. l Email engine reservations: Enter a number of engines reserved for Email jobs.
The Weaver Engine is used to convert one specific job into the Print output of your choice. You can only ever use a single Weaver engine to convert one specific job to whatever output you want. The Weaver Engine pool is also used by the Datamapper when importing PCL/PS/PDF and AFP data. When you want to create output for multiple jobs in parallel, you will need to increase the number of weaver engines.
l l l l l Expected remote engines: Only available on the main Server when Clustering is active. Enter the total number of engines available in the other machines of the cluster (the total number of engines in all of the Server Extensions connected to this server). Speed units launched: Read-only box indicating the number of speed units launched. Limit in license: Read-only box indicating the maximum number of speed units useable for producing output.
Tip If this setting must be used due to memory problems it is recommended to set it to at least 1.5GB or 225% of the Memory per engine (mb) setting (whichever is higher). The maximum for this setting is 1,024,000MB, which roughly equates to 1TB. Note that the actual memory usage is reported in the "Working Set" column in Windows' Process Explorer.
l l l l Small job speed unit reservations: Enter a number of speed units reserved for small print jobs. Medium job speed unit reservations: Enter a number of speed units reserved for medium print jobs. 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.
l Memory per engine (mb): Specify the maximum amount of random access memory (RAM) in megabytes that will be used per engine in order to make optimal use of the machine's memory. Note This setting only controls the maximum size of the Java heap memory that an engine can use; the total amount of memory that will used by an engine is actually a bit higher. Also keep in mind that the Connect Server and the operating system itself will need memory to keep running.
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 Local engines launched: Enter the total number of Merge Engines desired on this server. When changing the number of engines, it is necessary to save this dialog (Apply) to actually apply the changes.
intermediary file is in turn used by a Weaver engine to prepare the Print output. For an explanation of the various engines, the terminology and their settings, see "Engine configuration" on page 110. For some performance tips, see "Performance considerations" on page 29. This preference page determines the number of Weaver engines launched on this Slave machine, along with their memory allocation and restart values.
time. The default is generally considered sufficient for all our clients. Only change on the advice of a technical support agent. l Memory limit (mb): An engine restart will be performed when the total amount of memory used by the engine process exceeds the defined maximum. The default value is 0 megabytes, which means there is no limit.
What if MySQL is not on the Master server? It is possible to setup clustering with a MySQL instance that is on a Slave server instead of on the master. In this case, the Slave server must be installed with the Server Extension and MySQL modules, the MySQL instance configured (steps 2-4 above) then the master and other slaves can be installed. The remainder of the instructions remain the same.
Technical IP Subnets understanding is beyond the scope of this documentation. If you want to learn more, please see the Subnetwork article on Wikipedia. Clustering Preferences and Setup When Server extensions are installed and connected to a Master, the following options and settings change in availability or behaviour: l l In the Slave "Scheduling properties - Slave" on page 121, both the Small job and Large jobs settings are ignored. Scheduling is actually handled by the Master.
Server Security Settings This dialog controls the security settings for external applications connecting to the PReS Connect Server, such as PReS Workflow or scripts communicating through the REST API. Warning It is highly recommended to keep security enabled and change the password on any server that accessible from the web.
The invisible parts process the Connect job to provide the actual output. This topic introduces you to those parts. Here's a simplified, graphical representation of the architecture of PReS Connect. The components described below are all located in the 'Server' part. 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.
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 limited to Connect functionality. It was originally developed as part of the PlanetPress Suite.
The Connect server is one of the components that has to be installed with Connect (see "Installation Wizard" on page 38). In the Workflow Configuration Tool preferences you have to set the OL Connect server settings to enable Workflow to communicate with the server (see Workflow Preferences). 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.
The File Store Connect has its own File Store which it uses for transient files. The Clean-up service takes care of removing obsolete files when those files are not marked as permanent (see "Clean-up Service preferences" on page 782). Tip The File Store is accessible for customer implementations. The Workflow configuration tool implements three tasks that allow you to Upload, Download and Delete files in the Connect File Store.
number of output items (web pages, emails, or printed pages) per minute. How many speed units you have and what the maximum total output speed will be is determined by your licence and any additional Performance Packs you might have. There is one important twist: when generating Print output, the limit imposed by the number of speed units, only applies to the Weaver engines; when creating Email or Web output, the limit applies to the Merge engines only (the Weaver engine is not involved).
Printing and emailing from the Designer To print or send email from within the Designer, the Connect service has to be running. The service is started automatically when the Designer starts, but it may not be running if the Connect Server and the Designer are installed on different computers. The Connect service can be found on the Services tab in the Task Manager. For a proof print the Connect server is not used. Proof printing is always done locally, by the Designer.
l l Rows are series/Columns are series: Only one type of data structure for detail tables is supported in the new version: the one that corresponds to the former Columns are series setting (with which charts display one series per record, one bar/point per data field). After conversion to 2018.1, charts that used the Rows are series setting will be displayed as if the Columns are series setting were used. Pie charts will thus only show data from the first record in the detail table.
Windows Server 2016 issue As of PReS Connect 2018.1 Connect is officially supported under Windows Server 2016. Please note, however, that the Objectif Lune Inc. Update Client application might be blocked by the enhanced security settings in Windows Server 2016. To fix this, add http://updates.ca.objectiflune.com to the list of trusted web sites on that machine, or lower the internet access rules.
The result is that now every document in the job becomes a booklet without any empty pages between the first page and the last page. With some exceptions. Booklet Impositioning that require a multiple of 4 pages (Saddle binding and Perfect binding) will still get empty pages added, when needed. Memory Usage in Clustered Environments In high speed clustered environments, PReS Connect will fill the database faster than the Clean-up service can clear it (the ratio is approximately 3:1).
user specifies an alternative installation path containing multi-byte/wide-char characters it can break some of the links to the Connect-related shortcuts in the Start Menu and cause an error to appear at the end of the installer. The workaround for the moment is to use the default installation path. The problem will be addressed in a later release.
remove the Connect MySQL Database folder from "%ProgramData%\Connect\MySQL\data" before installing the older version. The minimum supported MySQL version is 5.1.31. PostScript Print Presets The print presets for PostScript were changed from Version 1.1 onwards meaning that some presets created in Version 1.0 or 1.0.1 may no longer work. Any PostScript print preset from Version 1.0 that contains the following will not work in Version 2018.1: *.all[0].
Warning Important Note: The Designer itself and Proof Print do not use processes that run as 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 PReS 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.
proceed as normal. This message can also occur in the following circumstances: 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.
Uninstalling This topic provides some important information about uninstalling (removing) PReS Connect2018.1. To uninstall PReS Connect select the application from within the Add/Remove programs option under the Control Panel. This will start the PReS Connect Setup Wizard in uninstall mode. Note The PReS Connect Setup Wizard might take some seconds to appear. Important Note: Stop any active Anti-Virus software before uninstalling Connect.
Uninstallation Wizard The uninstallation is done by running the PReS Connect Setup Wizard in uninstall mode. The Wizard consists of the following pages: 1. PReS 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 160. You can find additional information that complements the user manuals, such as error codes and frequently asked questions about PReS 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 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 21).
The engines Datamapper engine/s. A Datamapper engine extracts data from a data file. The number of Datamapper engines is configurable (Datamaper Engine Scheduling). 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.
When there are more speed units than there are engines in use, the Connect server distributes the speed units and the maximum output speed to the engines proportionally. The REST API The Connect server receives REST commands (see The Connect REST API CookBook), normally either via the Workflow service or from the Designer. This design allows the Connect functionality to be used by other applications. The server forwards the commands to the appropriate engine and returns the results to the caller.
Connect File Types This article describes the different File Types that are related to PReS Connect and its different modules. These are files that are generally transferable between machines, can be sent via email or other means. l l l l l l l l l .OL-template: A Designer Template file, including up to 3 contexts. Is linked to a data mapping configuration by default, but not necessarily. .
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 177. 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 373. Note AFP input is dependent on a third party library (CDP), which only allows PReS Connect to run up to 4 AFP input processes 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.
l PDF, PS, PCL or AFP Note PCL and PostScript (PS) files are automatically converted to PDF format. Some advanced PCL to PDF options are available by calling LincPDF (PReS Connect's PCL to PDF converter) command line module. l Text l XML. 3. Click the Browse button and open the file you want to work with (for a database, you may have to enter a password). 4. Click Finish. l From the File menu 1. Click the File menu and select New. 2.
4. Click the Browse button and open the file you want to work with. 5. Click Finish. After opening the file, you have to make settings for the input data (see "Data source settings" on page 177). Then you can start building the data extraction workflow. Note l l l In a production environment (a Connect Workflow process) the automatic conversion of PCL or PostScript (PS) may influence the processing speed, depending on the available processing power.
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.
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. For example, an increment value of 3 and starting value of 1 would give the counter values of 1, 4, 7, 10, [...] Number of records: The total number of counter records to generate. This is not the end value but rather the total number of actual records to generate.
If the data mapping configuration has not been saved before, you have to browse to the location where the data mapping configuration should be saved and type a name, then click Save. Using the wizard for CSV and Excel files The DataMapper wizard for CSV and Excel files helps you create a data mapping configuration for such files. The wizard automatically detects delimiters and extracts all data in one extraction step. The wizard interprets each line in the file as a record.
Note Excel files saved in "Strict Open XML" format are not supported yet. 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. For an Excel file you can indicate whether or not the first row contains field names, and from which sheet the data should be extracted.
Opening a database file with a wizard There are two ways to open an XML file with a wizard: from the Welcome screen or from the File menu. l From the Welcome screen 1. Open the PReS ConnectWelcome page by clicking the select the Help menu and then Welcome. icon at the top right or 2. Click Create a New Configuration. 3. From the Using a wizard pane, select Database. 4. Use the drop-down to select the database type. 5. Click Next. l From the File menu 1. In the menu, click File > New. 2.
l l l Password: Enter the password that matches the user name above. Table name: The selected database is a set of related tables composed of rows and columns corresponding respectively to source records and fields. Select a table from which you want to extract data. Encoding: Choose the correct encoding to read the file. Microsoft Access l l l Password: Enter a password if one is required.
this driver's JAR file must be specified. l l l l l l l l JDBC Driver: Use the drop-down to select which JDBC Driver to use for the database connection. JAR file path: Enter a path to the JAR file that contains the appropriate driver for the database. Server: Enter the server address for the database server. Database name: Enter the exact name of the database from where the data should be extracted. User name: Enter a user name that has access to the server and specified database.
You can open a PDF/VT or AFP file with a wizard using the Welcome screen or the File menu. l From the Welcome screen 1. Open the PReS ConnectWelcome page by clicking the select the Help menu and then Welcome. icon at the top right or 2. Click Create a New Configuration. 3. From the Using a wizard pane, select PDF/VT or AFP. 4. Click the Browse button and open the PDF/VT or AFP file you want to work with. Click Next. l From the File menu 1. In the menu, click File > New. 2.
DataMapper won't either. Using the wizard for XML files The DataMapper wizard for XML files helps you create a data mapping configuration for an XML file. The wizard lets you select the type of node and the trigger that delimit the start of a new record. Next, the wizard extracts the data in one extraction step. The wizard cannot create detail tables.
record each time the element is different. (Check the option to include attributes in the list of content items that can trigger a boundary.) Note The DataMapper only extracts elements for which at least one value is defined in the file. Attribute values are not taken into account. Attribute values (prefixed with an @ sign in the Data Viewer) are not extracted automatically. Click Finish to close the dialog and open the data mapping configuration.
Viewer. All steps can be added via the Steps pane: 1. In the extraction workflow on the Steps pane, select the step after which to add the new step. 2. Right-click on the Steps pane and select Add a Step; then select one of the step types. Editing steps The properties of each step in the extraction workflow become visible in the Step properties pane when you select that step in the Steps pane. The name of each step is shown in the Steps pane. You can change it under Description in the Step properties pane.
and all subsequent fields will be greyed out. Click the Messages tab (next to the Step properties pane) to see any error messages. To test the extraction workflow on all records, you can: l Click the Validate All Records toolbar button. l Select Data > Validate Records in the menu. If any errors are encountered in one or more records, an error message will be displayed. Errors encountered while performing the extraction workflow on the current record will also be visible on the Messages tab.
using any character, including commas, tabs, semicolons, and pipes. The text delimiter is used to wrap around each field just in case the field values contain the field separator. This ensures that, for example, the field “Smith; John” is not interpreted as two fields, even if the field delimiter is the semicolon. For an explanation of all the options, see: "CSV file Input Data settings" on page 266. For an Excel File For an Excel file you have to specify which sheet to use.
of, or strange characters at the beginning of your file, for example; you can set a line width if you are still working with old line printer data; etc. It is important that pages are defined properly. This can be done either by using a set number of lines or using a text (for example, the character “P”), to detect on the page. Be aware that this is not a Boundary setting; it detects each new page, not each new record. For an explanation of all the options, see: "Text file Input Data settings" on page 268.
the boundary will be set on the nearest preceding natural delimiter. If for instance in a PDF file the text "Page 1 of" is used as the trigger, the new record starts at the page break before that text. For an explanation of all Boundaries options per file type, see "Boundaries" on page 270. 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 230).
Extracting data Data are extracted via Extraction steps into fields in the Data Model. This topic explains how to do that. Fields can also be filled with other data: the result of a JavaScript or the value of a property. To learn how to do that, see "Fields" on page 217.
Note For optimization purposes, it is better to add data to an existing Extract step than to have a succession of extraction steps. To do that, select that step on the Steps pane first; then right-click on the selected data and choose Add Extract Field. 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.
Note Fields cannot be used twice in one extraction workflow. Different Extract steps can only write extracted data to the same field in the Data Model, if: l l l The field name is the same. (See: "Renaming and ordering fields" on page 220.) 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.
When data are dropped on the Data Model, they are by default added to the last added Extract step. Editing fields After extracting some data, you may want to: 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.
Data selections are used to extract promotional data ("Extracting data" on page 181), transactional data ("Extracting transactional data" on the facing page) and to apply a condition to an extraction (Condition step). 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.
XML File XML data is displayed as a tree view inside the Data Viewer. To get a better overview you can also collapse any XML level. In this tree view you can select nodes just like files in the Windows Explorer: keep the Ctrl 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.
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 259. 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 206). 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 189
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 181). 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 336.
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 209.
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 181. To add a field without extracting data, see "JavaScript-based field" on page 218. 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 175). 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 281 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 280. 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 181. 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 305. The settings for a Case are the same as for a Condition step; see "Condition step properties" on page 302.
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 202. 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 313. 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 239.
that determines the order in which data are extracted, so the order of the fields has to be changed per Extract step. To learn how to edit fields and change their order, see "Fields" on the next page. 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 680).
filled via an extraction. It can be made visible using the Show ExtraData Field icon at the top of the Data Model. Workflow process Data can be added to the Data Model in a PReS Connect Workflow process as follows: 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.
Other fields may contain the result of a JavaScript (JavScript-based fields) or the value of a property (property-based fields). Adding fields Location-based field Generally location-based fields are added to a Data Model by extracting data; see "Extracting data" on page 181. Location-based fields in detail tables are created by extracting transactional data; see "Extracting transactional data" on page 186. Alternatively, you can add fields and detail tables directly in the Data Model pane.
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 "Adding fields and data via Workflow" on page 216. 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 230 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 186. 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 186).
Page 225
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 237 l "Integer" on page 237 l "Float" on page 236 l "Currency" on the facing page l "Date" on page 233 l "Object" on page 238 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.
Note The value must be all in lowercase: true, false. Any variation in case (True, TRUE) will not work. Boolean expressions Boolean values can 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.
Note While Currency values can be set to up to 4 significant digits, only 2 are displayed on screen. Building Currency values Currency values can be the result of direct attribution or mathematical operations just like Integer values (see "Integer" on page 237). 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.
l In the user preferences ("Datamapper preferences" on page 790). l In the data source settings ("Data source settings" on page 177). l In the field properties: on the Step properties pane, under Data Format, specify the Date/Time Format. 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.
l l ap: AM/PM string. In addition, any constant character can be included in the mask, usually to indicate date/time separators (i.e. / - :) . If one of those characters happens to be one of the reserved characters listed above, it must be escaped using the \ symbol. 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 1081).
l In a Preprocessor property. To do this, go to the Steps pane and select the Preprocessor step. Then, on the Step properties pane, under Properties add a property, specify its Type as Date and put the JavaScript in the Default Value field. The use of the JavaScript Date() object is necessary when creating dates through a JavaScript expression. For more information, see w3schools - JavaScript Dates and w3schools - Date Object.
Building Float values Float values can be the result of direct attribution or mathematical operations just like Integer values (see "Integer" below). 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!.
l l Direct attribution: Assign an integer value directly, such as 42, 99593463712 or data.extract("TotalOrdered");. 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.
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 242Example: nested tables (one table into another) PAGE 243Keyboard 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 830. 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 Alt Put the focus on the menu. (Alt + the underlined letter in a menu name displays the corresponding menu.) The menu can then be browsed using the Enter key, arrow up and arrow down buttons.
Key combination Function Z 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 Page 245
Key combination Function F9 Add a Repeat step 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 + F6 Next editor (when there is more than one file open in the Workspace) 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
Key combination Function Ctrl + space Content assist (auto-complete) 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.
l l l l l l l l Open Recent: List the most recently opened Templates and configurations. Clicking on a template will open it in the Designer module, clicking on a data mapping configuration will open it in the DataMapper module. 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.
l l l l Cut Step: Removes the currently selected step and places it in the clipboard. If the step is a Repeat or a Condition, all steps under it are also placed in the clipboard. If there is already a step in the clipboard, it will be overwritten. Copy Step: Places a copy of the currently selected step in the clipboard. The same details as the Cut step applies. Paste Step: Takes the step or steps in the clipboard and places them in the Steps after the currently selected step.
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.
Help Menu l l l Software Activation: Displays the Software Activation dialog. See Activating your license. Help Topics: Click to open this documentation. Contact Support: Click to open the Objectif Lune Contact Page in the default system Web browser. l About PReS 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 266.
optional sample data for each field. l l l l : Export Data Model: Click to browse to a location to save the Data Model File and save it. : Synchronize Data Model: Click to synchronize the data model with the one currently loaded in the open Data Mapping Configuration. Disabled if no configuration is currently open. : Show the ExtraData field. Note that this field is not meant to be filled via an extraction.
l Delete: Click to delete the selected table or field. l Set Type: Use the list to select the field type (see "Data types" on page 230). l l l Default Value: Click to set the default value for a field. This value is used if no extraction is present, or if an extraction attached to this field returns no value. Collapse Fields: Collapse the fields in the selected level. Expand Fields: Clicking the icon that represents collapsed fields (for example: enables this menu item.
Record navigation Records can be navigated via the Data Model pane. The default record level navigates between records both in the Data Model pane and the Data Viewer, while each detail table has a similar navigation that influences that table and each detail table under it. l l l l l l l l Expand/Contract: Click to hide or show any fields or tables under the current table level. Table Name: Displays the name of the table as well as the number of records at that level (in [brackets]).
Renaming a detail table Renaming detail tables is especially useful when there are more detail tables in one record, or when a detail table contains another detail table. For this detail table, ‘products’ would be a better name. 1. On the Data Model pane, click one of the fields in the detail table. 2. On the Step Properties pane, under Extraction Definition, in the Data Table field, you can find the name of the detail table: record.detail by default. Change the detail part in that name into something else.
To create more than one detail table, simply extract transactional data in different Repeat steps (see "Extracting transactional data" on page 186). 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 258
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 179).
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.
workflow. 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 177.
l Ignore unparseable lines: Ignores any line that does not correspond to the settings above. Excel file Input Data settings There are no settings for field separation in an Excel file, only settings with regards to the file as a whole. l l l Lines to skip: Defines a number of lines in the Excel file that will be skipped and not used as records. First row contains field names: Check this option to use the first line of the Excel file as headers. This option automatically names all extracted fields.
1.43 of this average width is considered one space. A space of 1.44 is considered to be 2 spaces. l PDF file color space: Determines if the PDF if displayed in Color or Monochrome in the Data Viewer. Monochrome display is faster in the Data Viewer. This has no influence on the actual data extraction or the data mapping performance. Database Input Data settings Databases all return the same type of information.
l l l l Add/Remove characters: Defines the number of characters to add to, or remove from, the head of the data stream. The spin buttons can also increment or decrement the value. Positive values add blank characters while negative values remove characters. Add/Remove lines: Defines the number of lines to add to, or remove from, the head of the data stream. The spin buttons can also increment or decrement the value. Positive values add blank lines while negative values remove lines.
unintended trailing record when the data mapping configuration is set up to cut on every line. XML File Input Data settings For an XML file you can either choose to use the root node, or select an element type, to create a new delimiter every time that element is encountered. l l Use root element: Locks the XML Elements option to the top-level element. No other boundaries can be set. If there is only one top-level element, there will only be one record.
This does not affect output production; when generating output, this option is ignored. To disable the limit, use the value 0 (zero). l Trigger: Defines the type of rule that controls when a boundary is set, creating a new record. l Record(s) per page: Defines a fixed number of lines in the file that go in each record. l l On change: Defines a new record when a specific field (Field name) has a new value. l l l Records: The number of records (lines, rows) to put in each record.
l On text: Defines a boundary on a specific text comparison. l l l Start coordinates (x,y): Defines the left and top coordinates of the data selection to compare with the text value. Stop coordinates (x,y): Defines the right and bottom coordinates. Use Selection: Select an area in the Data Viewer and click the Use selection button to set the start and stop coordinates to the current data selection. Note In a PDF file, all coordinates are in millimeters.
l l Selection/Text is based on bytes: Select this option for text records with fixed width fields whose length is based on the number of bytes and not the number of characters. Trigger: Defines the type of rule that controls when a boundary is set, creating a new record. l On delimiter: Defines a boundary on a static number of pages. l l Occurrences: The number of times that the delimiter is encountered before fixing the boundary.
l l Operator: Selects the type of comparison (for example, "contains"). l Word to find: Compares the text value with the value in the data source. l l l Delimiters before/after: Defines the boundary a certain number of data pages before or after the current data page. This is useful if the text triggering the boundary is not located on the first data page of the record. Use selected text button: copies the text in the current selection as the one to compare to it.
Data samples The Data Sample area displays a list of all the imported Data Samples that are available in the current data mapping configuration. As many Data Samples as necessary can be imported to properly test the configuration. Only one of the data samples - the active data sample - is shown in the Data Viewer. A number of buttons let you manage the Data Samples.
on page 180.) l l l Excel Default Format: Displays dates and times the way they would be displayed in Excel, using the specified locale. For date formats without a locale, the US English locale is used. (In the format selection dialog in Excel, these date formats are marked with an asterisk.) Values can show a date, or a time, or both. Connect always uses this setting when opening an Excel file.
("Datamapper preferences" on page 790). Specific settings for a field that contains extracted data are made via the properties of the Extract step that the field belongs to (see "Editing fields" on page 220). 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.
Steps pane The Steps tab displays the data mapping workflow: the process that prepares and extracts data. The process contains multiple distinct steps and is run for each of the records in the source data. For more information about the steps and how to use them, please refer to Steps and "Data mapping workflow" on page 175. Moving a step To rearrange steps, simply drag & drop them somewhere else on the dotted line in the Steps pane.
l Add Step in Repeat: Adds a step to a Repeat loop. l Add Step in True: Adds a step to the True branch of a condition step. l Add Step in False: Adds a step under the False branch of a condition step. l Add Multiple Conditions Step: Adds a Multiple Conditions step. 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).
l "Text file" on page 308 l "JavaScript " on page 313 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 202. The properties described below become visible in the Step properties pane when the Preprocessor step is selected in the Steps pane.
l l l l JobInfoX: These properties are the equivalent of the JobInfo values available in the PReS Workflow process. They can be set using the Set Job Info and Variables task. To access these properties inside of any JavaScript code within the Data Mapping Configuration, use the automation.jobInfos.JobInfoX (where X is the job info number, from 0 to 9).
l l l l Each Record: These properties are evaluated and set at the beginning of each Source Record. These properties can be modified once they have been set, but are always reset at the beginning of each Source Record. Automation variable: These properties initialize variables coming from the PReS 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.
of time when the data file is very large. You could use the exported file instead of the original file to avoid preprocessing while developing the workflow configuration. Preprocessor definition l Expression: Enter the JavaScript code to be performed on the data file. See "DataMapper Scripts API" on page 316. 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.
l l l Field List: The Field List displays each of the single fields that belong to the selected step in a drop-down. Fields can be re-ordered and re-named within the Order and rename fields dialog (see "Order and rename fields dialog" on page 288). Select one of the fields to make further settings for that field. Add Unique ID to extraction field: Check to add a unique numerical set of characters to the end of the extracted value. This ensures no two values are identical in this field in the record set.
"Preprocessor step" on page 202. For an explanation of the objects to which the properties belong, see "DataMapper Scripts API" on page 316. l l Choose a property button: Click this button to open a filter dialog that lets you find a property based on the first few letters that you type. Type: The data type of the selected data; see "Data types" on page 230. 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 288.
Settings for location-based fields in a PDF File These are the settings for location-based fields in a PDF file. 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.
Settings for location-based fields in CSV and Database files These are the settings for location-based fields in CSV and Database files. l l Column: Drop-down listing all fields in the Data Sample, of which the value will be used. Top offset: The vertical offset from the current pointer location in the Data Sample (Viewer). 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 Trim: Select to trim empty characters at the beginning or the end of the field. Data Format Format settings can be defined in three places: in the user preferences ("Datamapper preferences" on page 790), the current data mapping configuration ("Data format settings" on page 180) and per field via the Step properties. Any format settings specified per field are always used, regardless of the user preferences or data source settings.
drop-down. Field extractions are executed from top to bottom. In JavaScript-based fields, it is possible to refer to previously extracted fields if they are extracted higher in this list or in previous Extract steps in the extraction workflow. 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 PReS Workflow process, do not add spaces to field names, as they are not permitted in metadata field names.
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. Actions This subsection lists all actions executed by the step, and their types. l Name: A name by which to refer to the action. This name has no impact on functionality.
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 of the current data selection for the extraction. Note If the selection contains multiple lines, only the first line is selected.
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. l Date Format : Set the date format for a date value. 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).
last value attribution (variable = "value";) will be the value. See "DataMapper Scripts API" on page 316. l l l l Expression: The JavaScript expression to run. Use JavaScript Editor: Click to display the Edit Script dialog (see "Using scripts in the DataMapper" on page 319 and "DataMapper Scripts API" on page 316). 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.
XML File l Property: Displays a list of Source Record properties set in the Preprocessor step (see "Preprocessor step" on page 202). l Type: Displays the type of the Source Record property. Read only field. l Based on: Determines the origin of the data. l Location: The contents of the data selection set below will be the value of the extracted field. The data selection settings are different depending on the data sample type. l XPath: The path to the XML field that is extracted.
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. 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.
Note If the selection contains multiple lines, only the first line is selected. Repeat step properties The Repeat step adds a loop to the extraction workflow; see "Steps" on page 202 and "Extracting transactional data" on page 186. 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.
Note When using an XML For Each loop, it is not necessary to skip to the repeating node or to have a Gotostep to jump to each sibling, as this loop takes care of it automatically. l Maximum iterations on each line: Defines the maximum number of iterations occurring at the same position. This expression is evaluated once when entering the loop. The value returned by the expression must be an integer higher than 0. l Use JavaScript Editor: Click to display the Edit Script dialog.
Text and PDF 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 l Height: The height of the selection box. Use Selection: Click to use the value of the current data selection for the extraction. Trim: Select to trim empty characters at the beginning or the end of the field. Value: The text value to use in the comparison. Use selected text: Uses the text in the current data selection as the Value.
l l Automation Property: The current value of a Document-level property set in the Preprocessor step (see "Preprocessor step" on page 202). Extractor Property: The value of an internal extractor variable: l 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). Operators: l l l l l l is equal to: The two specified value are identical for the condition to be True.
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. 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 l 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. 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 Value: The text value to use in the comparison. Use selected text: Uses the text in the current data selection as the Value.
l Extractor Property: The value of an internal extractor variable: l 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). 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.
Rule tree The Rule tree subsection displays the full combination of 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. 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.
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 l Trim: Select to trim empty characters at the beginning or the end of the field. Field: The contents of a specific field in the Extracted Record.
l Operators: 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 Position: The data in the specified position for the comparison. l l Right (Txt and PDF only): The end position for the data selection. l Height (Txt and PDF only): The height of the selection box. l l l l Top offset: The vertical offset from the current pointer location in the Data Sample (Viewer). l Trim: Select to trim empty characters at the beginning or the end of the field. Value: A specified static text value. Value: The text value to use in the comparison.
l l l 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 (see "Steps" on page 202). Extractor Property: The value of an internal extractor variable: l l Counter: The value of the current counter iteration in a Repeat step.
Goto step properties The Goto step moves the pointer within the source data to a position that is relative to the top of the record or to the current position. See also: "Steps" on page 202. 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.
l Next line with content: Jumps to the next line that has contents, either anywhere on the line or in specific columns. l Inspect entire page width: When checked, the Next line with content and Next occurrence of options will look anywhere on the line. If unchecked, 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.
PDF File l Target Type: Defines the type of jump . l Physical distance: l l l l Current Position: The Goto begins at the current cursor position. l Top of record: The Gotobegins at line 1 of the source record. Move by: Enter distance to jump. Page: Jumps between pages or to a specific page. l l l From: Defines where the jump begins: From: Defines where the jump begins: l Current Position: The Gotobegins at the current cursor position.
l Left: The starting column, inclusively. l Right: The end column, inclusively. l l 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. Expression: Enter the text or Regex expression to look for on the page. Use selection: Click while a selection is made in the Data Viewer to copy the contents of the first line of the selection into the Expression box.
l Level Up/Down: Jumps up or down one node level (up to the parent, down to a child). The number of levels to change is defined in the Move byoption. Postprocessor step properties The Postprocessor step does not run for every Source Record in the Data Sample. It runs once, at the end of the Steps, after all records have been processed. For more information see "Postprocessor step" on page 212.
l Move Up: Click to move the Postprocessor up one position. l Move Down: Click to move the Postprocessor down one position. Postprocessor definition JavaScript l l l Expression: The JavaScript expression that will run on the Data Sample. See "DataMapper Scripts API" on page 316. 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.
l l l l l l l l l l l l Add Goto Step: Adds a Goto step that moves the selection pointer to the beginning of the data selection. For instance if an XML node is selected, the pointer moves to where that node is located. 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.
l Add Data Sample: Displays a dialog to open a new Data Source to add it as a Data Sample in the data mapping configuration. Data Samples are visible in the Settings pane ( "Settings pane" on page 266). Welcome Screen The Welcome Screen appears when first starting up PReS Connect. It offers some useful shortcuts to resources and to recent documents and data mapping configurations. If you are new to PReS Connect and you don't know where to start, see "Welcome to PReS Connect 2018.1" on page 18.
l l l Open an Existing Template: Click to open the standard Browse dialog to open an existing template. 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.
Name Description Available in scripts of type Goto "logger" on page 347 An object that allows to log error, warning or informational messages. Boundaries, all steps except Goto "record" on page 347 The current record in the main data set. Extract, Condition, Repeat and Multiple Conditions steps "region" on page 348 An object that defines a subsection of the input data. Boundaries "sourceRecord" on page 350 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. createGUID() Returns a unique 36-character string consisting of 32 alphanumeric, lower case characters and four hyphens (format: 84-4-4-12). Example: 123e4567-e89b-12d3-a456-426655440000. "createHTTPRequest ()" on page 358 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.
Name Description openTextReader() Opens a file as a text file for reading purposes. openTextWriter() Opens a file as a text file for writing purposes. 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 321). The script determines where a new record starts. Scripts can also be used in different steps in the extraction workflow.
Tip In the Edit script dialog, press Ctrl + Space to bring up the list of available JavaScript objects and functions (see Datamapper API). Use the arrow keys to select a function or object and press enter to insert it. Type a dot after the name of the function or object to see which features are subsequently available. Keyboard shortcuts for the script editor are listed in the following topic: "Keyboard shortcuts" on page 830.
}; 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 179), you are instructing the DataMapper to read the source file sequentially and to trigger an event each and every time it hits a delimiter.
access to the first page only, and for a CSV or for tabular data, that would be the first row or record. This means that you can: 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.
"Rolling Stones","Let it bleed",1969 "Led Zeppelin","Led Zeppelin 3",1970 "Led Zeppelin","Led Zeppelin 4",1971 "Rolling Stones","Sticky Fingers",1971 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.
boundaries.setVariable("lastBand",zeBand[0]); boundaries.setVariable("lastYear",zeYear[0]); l l l l The script first reads the two values from the input data, using the createRegion() method (see: "Example" on page 350). For a CSV/database data type, the parameter it expects is 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).
Led Zeppelin Led Zeppelin 3 1970 Led Zeppelin Led Zeppelin 4 1971 Rolling Stones Sticky Fingers 1971 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.
Note The PDF context also expects physical coordinates, just like the Text context does, but since PDF 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 PReS Workflow. properties Returns a ScriptableAutomation object containing additional information (file name, process name and task ID) from PReS Workflow. variables Returns a ScriptableAutomation object containing the list of local and global variables defined by the user in PReS Workflow. Note that there is no way to distinguish local variables from global ones (local variables take precedence over global variables).
To access ProcessName, OriginalFilename or TaskIndex from Workflow: 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 get() Retrieves an array of strings. Boundaries getVariable () Retrieves a value of a variable stored in the boundaries object. Boundaries set() Sets a new record boundary. (See: "Record boundaries" on page 179.) 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.
in_Region The in_Region region can be created prior to the call to find() with the region.createRegion() method. It depends on the type of data source how a region is defined; see "Example" on page 350. When used to search through a Text file, the find() method returns a different region object (see "region" on page 348) whose range property is adjusted to point to the exact physical location where the match was found. This will always be a subset of the in_Region.range property.
boundaries.get(region.createRegion("Email_Address")); getVariable() Method that retrieves the value currently stored in a variable. Note Boundary variables are carried over from one iteration of the Boundaries script to the next, while native JavaScript variables are not. getVariable(varName) varName String name of the variable from which the value is to be retrieved. If the variable does not exist, the value null is returned.
skip some pages/records when you know they do not need to be examined. Negative (or 0) values simply set the boundary without changing the current location. Example This script sets a boundary when the text TOTAL is found on the current page in a PDF file. The number of delimiters is set to 1, so the boundary is set on the next delimiter, which is the start of the next page. if (boundaries.find("TOTAL", region.createRegion (10,10,215,279)).found) { boundaries.
setVariable() This method sets a variable in the boundaries to the specified value, automatically creating the variable if it doesn't exist yet. Note Boundary variables are carried over from one iteration of the Boundaries script to the next, while native JavaScript variables are not. setVariable(varName, varValue) Sets variable varName to value varValue. varName String name of the variable of which the value is to be set. varValue Object; value to which the variable has to be set.
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). Returns an array of properties defined in the Preprocessor step with the data scope (i.e. statically set at the start of the job). Methods The following table lists the methods of the data object.
Method Description Script type File type on page 346 expression pattern starting from the current position. Multiple Conditions and Action steps PDF extract() Extracts the text value from selected data: a node path, column, or rectangular region, depending on the type of data source. This method always returns a String. extract(left, right, verticalOffset, regionHeight, separator) Extracts a value from a position in a text file.
Tip l l "
" is a very handy string to use as a separator. When the extracted data is inserted in a Designer template, "
" will be interpreted as a line break, because
is a line break in HTML and Designer templates are actually HTML files. Setting the regionHeight to 0 makes it possible to extract a variable number of lines at the end of a record. Examples Example 1: The script command data.
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.
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.
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.
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 333.
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.
Property Return Type index The one-based index of this record, or zero if no data is available. tables The details table that belong to this record. You can access a specific table using a numeric index or the table name. 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.
Property/method Description Return Type range Read-only object containing the physical coordinates of the region. Physical location of the region: x1 (left), y1 (top), x2 (right), y2 (bottom), expressed in characters for a text file or in millimeters for a PDF file. For a CSV file, it is the name of the column that defines the region. createRegion() Creates a region by setting the physical coordinates of the region object. A region that has the specified coordinates.
Example The following script attempts to match ((n,m)) or ((n)) against any of the strings in the specified region and if it does, a document boundary is set. var myRegion = region.createRegion(170,25,210,35); var regionStrings=boundaries.get(myRegion); if (regionStrings) { for (var i=0;i
Properties sourceRecord.properties.property; Property Return Type properties Returns an array of properties defined in the Preprocessor step with the Record Scope (i.e. dynamically reset with each new record). 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.
Method Description File type moveTo() Moves the pointer in the source data file to another position. All moveToNext() Moves the position of the pointer in the source data file to the next line, row or node. The behavior and arguments are different for each emulation type: text, PDF, tabular (CSV), or XML. All totalPages An integer value representing the total number of pages inside the current record. Text, PDF Example if(steps.currentPage > curPage) { steps.moveTo(0, steps.
Number that may be set to: l 0 or steps.MOVELINES l 1 or steps.MOVEDELIMITERS l 2: next line with content verticalPosition Number. What it represents depends on the value specified for scope. 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.
verticalOffset Double. What it represents depends on the value specified for scope. With the scope set to 0 or steps.MOVEMEASURE, verticalOffset represents the number of millimeters to move the current position, relative to the top of the record (NOT the top of the current page). With the scope set to 1 or steps.MOVEPAGES, verticalOffsetrepresents the index of the target page, relative to the top of the record.
moveToNext(scope) Moves the current position in a text file or XML file to the next instance of scope. What scope represents depends on the emulation type: text or XML. Text scope Number that may be set to: 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.
Double that represents the right edge (in millimeters) of the text to find. moveToNext() Moves the current position in a CSV file to the next row, relative to the current position. Functions copyFile() Function that copies a file to the target file path, replacing it if it already exists. 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
// Open a writer on the temporary file var writer = openTextWriter(tmpFile.getPath()); try{ var line = null; // Current line /* read line by line and readLine will return null at the e the file */ while( (line = reader.readLine()) != null ){ // Edit the line line = line.toUpperCase(); // Write the result in the temporary file writer.write(line); // add a new line writer.newLine(); } } finally{ // Close the writer of the temporary file writer.close(); } } finally{ // Close the reader reader.
Note It is not possible to use the async mode, which can be set via the open() function of the ScriptableHTTPRequest (see https://developer.mozilla.org/enUS/docs/Web/API/XMLHttpRequest/open) in a data mapping configuration. Async-related properties and methods of the ScriptableHTTPRequest object - for example .onreadystatechange, .readyState and .ontimeout - are not supported.
getResponseHeader(String header) Gets the ResponseHeader by name. getResponseHeaders() Returns the full response headers of the last HTTP request. getRequestBody() Gets the HTTP request body (for POST and PUT). setRequestHeader(String requestHeader, String value) Adds an additional HTTP request header. getResponseBody() Returns the full response body of the last HTTP request. setRequestBody(String requestBody) Sets the HTTP request body (for POST and PUT).
deleteFile() Function that is used to delete a file. deleteFile(filename) filename String that specifies the path and file name of the file to be deleted. 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.
newCharArray(size) Returns a new Char array of the specified number of elements. size Integer that represents the number of elements in the new 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.
newLongArray() Function that returns a new long array. newLongArray(size) Returns a new Long array of the specified number of elements. size 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.
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). openTextReader() Function that opens a file as a text file for reading purposes. The function returns a TextReader object. Please note that the temporary file must be closed at the end. openTextReader(filename,encoding) filename String that represents the name of the file to open.
OpenTextWriter(filename, encoding, append) filename String that represents the name of the file to open. encoding String specifying the encoding to use (UTF-8, ISO-8859-1, etc.).. 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).
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 533 and "Styling and formatting" on page 625. 3. Personalize the content Personalize the content using variable data. See "Personalizing Content" on page 667. 4.
"Content elements" on page 533. Elements make up the biggest part of the content of each design. "Snippets" on page 622. Snippets help share content between contexts, or insert content conditionally. "Styling and formatting" on page 625. Make your Designer templates look pretty and give them the same look and feel with style sheets. "Personalizing Content" on page 667. Personalize your customer communications using variable data. "Writing your own scripts" on page 700.
l "Creating a Web template with a Wizard" on page 449 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 384), as well as extra sections (see "Sections" on page 385), to the template. It is, however, not possible to use a Template Wizard when adding a context or section to an existing template.
Opening a package file Templates can also be stored in a package file (see "Sharing a template" on page 372). To open a package file, switch the file type to Package files (*.OL-package) in the Open File 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.
file. The next time you open the template you will be asked if you want to open the associated data mapping configuration as well. 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.
The file properties can also be used in scripts; see "template" on page 1110. If you are not familiar with writing scripts, refer to "Writing your own scripts" on page 700. 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 948 and "Output Creation Settings" on page 958 for more details.
DataMapper module, using the standard XML template report as data sample. l Data mapping configurations have the extension .OL-DATAMAPPER. 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.
configuration file in the Browse dialog, and each of them is sent to Workflow (or added to a package file). A Data Mapping Configuration file has the extension .OL-datamapper. 4. Use the drop-down to select a Job Creation Preset to send. Click Browse to select a preset that is not in the default location for presets. A Job Creation Preset file has the extension .OL-jobpreset. 5. Use the drop-down to select an Output Creation Preset.
To create a Web template with a Template Wizard: 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.
page 755), and pick a color for the following elements: 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 Attributes pane at the right to see the current element's ID, class and some other properties. 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.
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 481. 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 settings. The wizard remembers the settings that were last used for a COTG template. 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 action of a Capture OnTheGo form should specify the Workflow HTTP Server Input task that receives and handles the submitted data. The action will look like this: 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.
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. 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.
src="images/signatures/johnsmith.gif">. In scripts, you can refer to them in the same way, for example: results.loadhtml("snippets/en/navbar.html"); See also: "Loading a snippet via a script" on page 717 and "Writing your own scripts" on page 700. 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.
Authentication is possible only through URL Parameters (http://www.example.com/data.json?user=username&password=password) or through HTTP Basic Auth (http://username:password@www.example.com/data.json). Resources can also be called from a PReS Workflow instance: 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.
Outputting and combining contexts All three contexts can be present in any template and they can all be used to output documents; see "Generating Email output" on page 1139, "Generating Print output" on page 1120 and "Generating Web output" on page 1147. They can even be combined in output. If present in the same template, a Print context and a Web context can be attached to an Email context.
Adding a section To add a section to a context, right-click the context (Email, Print or Web) on the Resources pane, and then click New section. The new section has the same settings as the first section in the same context. However, custom style sheets and JavaScript files aren't automatically included in the new section. It is not possible to use a Template Wizard when adding a section to an existing template.
5. When copying a section to another template, add the related source files, such as images, to the other template as well. Deleting a section To delete 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 Delete. 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.
Applying a style sheet to a section In order for a style sheet to be applied to a specific section, it needs to be included in that section. There are two ways to do this. Drag & drop a style sheet 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.
l On the Resources pane, expand the Contexts folder, expand the folder of the respective context, and then drag and drop sections to change the order they are in. Alternatively, right-click a section and click Arrange. In the Arrange Sections dialog you can change the order of the sections in the same context by clicking the name of a section and moving it using the Up and Down buttons. Outputting sections Which sections are added to the output, depends on the type of context they are in.
l PDF l PostScript (including the PPML, VIPP and VPS variants) With the Designer you can create one or more Print templates and merge the template with a data set to generate personal letters, invoices, policies, or any other type of letter you can think of. The Print context is the folder in the Designer that can contain one or more Print sections. Print templates (also called Print sections), are part of the Print context.
Headers, footers, tear-offs and repeated elements (Master page) 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. This is what Master Pages are used for.
Creating a Print template with a Wizard A Print template may consist of various parts, such as a covering letter and a policy. Start with one of the Template Wizards for the first part; other parts can be added later. To create a Print template with a Template Wizard: 1. l In the Welcome screen that appears after startup: l l l Choose Browse Template Wizards and scroll down until you see the Print Template wizards and select the Postcard or Formal Letter wizard.
Print Template Wizards There are three Print Template wizards: one for a formal letter, one for a postcard and one for a Print template based on a PDF that you provide. Postcard The Postcard Wizard lets you choose a page size and two background images, one for the front and one for the back of the postcard. When you click Finish, the Wizard creates: l l l l l A Print context with one section in it, that has duplex printing (printing on both sides) enabled. See "Printing on both sides" on page 398.
l l l l l Duplex means double-sided printing. The margins define where your text flow will go. The actual printable space on a page depends on your printer. 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. Printers that can’t print a bleed, will misinterpret this setting. Set the bleed to zero to avoid this. The number of sections is the number of parts in the Print context.
The formal letter template already has an address on it. The address lines are paragraphs, located in one cell in a table with the ID address-block-table. As the table has no borders, it is initially invisible. The address lines will stick to the bottom of that cell, even when the address has fewer lines. See "Styling and formatting" on page 625 to learn how to style elements. Tip Click the Edges button on the toolbar to make borders of elements visible on the Design tab.
l l l A Print context with one section in it; see "Print context" below and "Print sections" on page 399. The selected PDF is used as the background of the Print section; see "Using a PDF file as background image" on page 404. For each page in the PDF one page is created in the Print section. One empty Master Page. Master Pages are used for headers, footers, images and other elements that have to appear on more than one page, and for special elements like tearoffs. See "Master Pages" on page 416.
background image" on page 404. When a Print template is created, the following happens: l l The Print context is created and one Print section is added to it. You can see this on the Resources pane: expand the Contexts folder, and then expand the Print folder. The Print context can contain multiple sections: a covering letter and a policy, for example, or one section that is meant to be attached to an email as a PDF file and another one that is going to be printed out on paper.
used for styles that are only applied to elements in the Print context. See also "Styling templates with CSS files" on page 627. Print settings in the Print context and sections The following settings in the Print context and Print sections have an impact on how the Print context is printed. Arranging and selecting sections The Print context can contain one or more Print sections.
1. On the Resources pane, expand the Contexts folder; then right-click the Print context and select Finishing. Alternatively, select Context > Finishing on the main menu. This option is only available when editing a Print section in the Workspace. 2. Choose a Binding style and, if applicable, the number of holes. For an explanation of all Binding and Hole making options, see "Finishing Options" on page 949.
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 page 409.
displayed on the Preview tab of the workspace, the Master Page being 'in front' of the Media and the Print section on top. To open the Preview tab, click it at the bottom of the Workspace or select View > Preview View on the menu. See "Media" on page 419 for a further explanation about how to add Media and how to apply them to different pages. Note: The Media will not be printed, unless this is specifically requested through the printer settings; see "Generating Print output" on page 1120.
Tip Editing PDF files in the Designer is not possible, but when they're used as a section's background, you can add text and other elements, such as a barcode, to them. 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. Alternatively, start creating a new Print template with a Wizard, using the PDF-based Print template (see "Creating a Print template with a Wizard" on page 392).
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. The sections are added to the output in the order in which they appear on the Resources pane, so changing the order of the sections in the Print context changes the order in which they are outputted to the final document.
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. Note that moving a style sheet up in the list gives it less weight. In case of conflicting rules, style sheets read later will override previous ones. Note Style sheets are applied in the order in which they are included in a section. The styles in each following style sheet add up to the styles found in previously read style sheets.
4. Click Resources, Disk or Url, depending on where the image is located. l l l Resources lists the images that are present in the Images folder on the Resources pane. Disk lists image files that reside in a folder on a hard drive that is accessible from your computer. Click the Browse button to select a folder (or an image in a folder). As an alternative it is possible to enter the path manually. You can give a local path (e.g. C:\Images\Test.jpg) or use the "file" protocol.
6. Select the PDF's 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.
1. On the Resources pane, expand the Contexts folder, expand the Print context and rightclick the Print section. 2. Click Finishing. 3. Choose a Binding style and, if applicable, the number of holes. To set the binding style of the Print context, see "Setting the binding style for the Print context" on page 398. Overriding binding styles in a job creation preset A Job Creation Preset can override the binding styles set for the Print sections and for the Print context as a whole.
printed pages. Empty means that there is no content and no master page on that side. To suppress the master page on emtpy back sides and single sheets, uncheck the option Same for all positions and check the option Omit Master Page Back in case of an empty back page. l l Check Tumble to duplex pages as in a calendar. Check Facing pages to have the side margins switched alternately, so that after printing and binding the pages, they look like in a magazine or book.
l l Conditional content and dynamic tables, when used in a Print section, may or may not leave an empty space at the bottom of the last page. To fill that space, if there is any, an image or advert can be used as a whitespace element; see "Whitespace elements: using optional space at the end of the last page" on the facing page. Detail tables can be used in all contexts, but transport lines are only useful in a Print context; see "Detail Table" on page 695.
example: 150mm). To change the default unit for measurement settings to centimeters or millimeters: on the menu, select Window > Preferences > Print > Measurements. Whitespace elements: using optional space at the end of the last page Print sections with conditional content and dynamic tables (see "Personalizing Content" on page 667) can have a variable amount of space at the bottom of the last page.
Page numbers Inserting page numbers Page numbers can be added to a Print section, but they are usually added to a Master Page, because headers and footers are designed on Master Pages; see also: "Master Pages" on page 416. To insert a page number, select Insert > Special character > Markers on the menu, and then click one of the options to decide with what kind of page number the marker will be replaced: l l l l l l Page number: The current page number in the document.
Tip Instead of page numbers, you might want to display the current record index and/or the total number of records in the record set, in the document. There is a How-to that explains how to do that: How to get the record index and count. Creating a table of contents A table of contents can only be created in a template script. The script should make use of the pageRef() function. For an example, see "Creating a table of contents" on page 1063.
to the total number of pages, too. 6. Close the dialog. Preventing widows and orphans Widows and orphans are lines at the beginning or at the end of a paragraph respectively, dangling at the bottom or at the top of a page, separated from the rest of the paragraph. By default, to prevent orphans and widows, lines are moved to the next page as soon as two lines get separated from the rest of the paragraph. The same applies to list items (in unordered, numbered and description lists).
Per paragraph To change the widow or orphan setting for one paragraph only: 1. Open the Formatting dialog. To do this, you can: l l Select the paragraph using the breadcrumbs or the Outline pane (next to the Resources pane) and then select Format > Paragraph in the menu. Right-click the paragraph and select Paragraph... from the contextual menu. 2. After Widows and Orphans, type the minimum number of lines that should be kept together.
Inserting a page break To insert a page break before or after a certain element, set the page-break-before property or the page-break-after property of that element (a paragraph for example; see also "Styling text and paragraphs" on page 636): 1. Select the element (see "Selecting an element" on page 537). 2. On the Format menu select the respective element to open the Formatting dialog. 3. In the Breaks group, set the before or after property.
Alternatively you could set this property on the Source tab in the HTML (for example:
), or add a rule to the style sheet; see "Styling your templates with CSS files" on page 630. Adding blank pages to a section How to add a blank page to a section is described in a how-to: Create blank page on field value. Master Pages In Print sections, there are often elements that need to be repeated across pages, like headers, footers and logos.
l On the Resources pane, right-click the Master pages folder and click New Master Page. l Type a name for the master page. l l Optionally, set the margin for the header and footer. See "Adding a header and footer" below. Click OK. Initially, the master page that has been created together with the Print context will be applied to all pages in the Print section.
1. First insert elements that form the header or footer, such as the company logo and address, on the Master Page; see "Editing a Master Page" on the previous page. 2. Next, define the margins for the header and footer. The margins for a header and footer are set in the Master Page properties. This does not change the content placement within the Master Page itself; in Master Pages, elements can go everywhere on the page.
4. Decide which Master Page should be linked to which sheet (position): click the downward pointing arrow after Master Page Front and select a Master Page. If Duplex is enabled, you can also select a Master Page for the back of the sheet and consequently, check Omit Master Page Back in case of an empty back page to omit the specified Master Page on the last backside of a section if that page is empty and to skip that page from the page count. 5. Optionally, decide which Media should be linked to each sheet.
The new Media is of course empty. You can specify two PDF files for the Media: one for the front, and, optionally, another for the back. Specifying and positioning Media Specifying a PDF for the front: the fast way To quickly select a PDF file for the front of a Media, drag the PDF file from the Windows Explorer to one of the Media. The Select Image dialog opens; select an image and check the option Save with template if you want to insert the image into the Images folder on the Resources pane.
(e.g. C:\Images\Test.jpg) or use the "file" protocol. The complete syntax of a fully qualified URL with the "file" protocol is: file:///. Note: if the host is "localhost", it can be omitted, resulting in file:///, for example: file:///c:/resources/images/image.jpg. l Url lists image files from a specific web address. Select the protocol (http or https), and then enter a web address (for example, http://www.mysite.com/images/image.jpg).
7. Click Finish. 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) will be rotated accordingly in the entire section. Note l l Any Virtual Stationery settings made for the Media also influence how the Media is displayed in each section (see "Setting Media properties" on page 420).
The Email context is the folder in the Designer that can contain one or more Email templates, also called Email sections. The HTML generated by this context is meant to be compatible with as many clients and as many devices as possible. 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 430. Also see "Designing an Email template" on the next page for guidelines on the design.
See "Email attachments" on page 445 and "Generating Email output" on page 1139. 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 430. 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 794. Using CSS files with HTML email Email clients do not read CSS files and some even remove a