Connect Designer. Emmet transforms abbreviations for HTML elements and CSS properties to the respective source code. This is, for example, the abbreviation for a
element with the class row: div.row On pressing the Tab key, this abbreviation is transformed to:
To learn more about Emmet itself, please see their website Emmet.io and the Emmet.io documentation. Emmet is a plugin. All options listed below are Emmet's default options. They are not specifically adjusted for Connect.
l l Pattern: This defines what an abbreviation expands to. Since Emmet is mostly used for writing HTML/XML tags, abbreviation definition uses XML format to describe elements; see Abbreviation types. Automatically insert: This standard option doesn't affect how Emmet works in Connect Designer. l Edit: Edit the currently selected abbreviation. l Remove: Remove the currently selected abbreviation. l l Import: Click to open a browse dialog to import an XML file containing exported abbreviations.
l Automatically insert: This option doesn't affect how Emmet works in Connect Designer. l Edit: Modify the currently selected snippet. l Remove: Remove the currently selected snippet from the list. l l l l Import: Click to open a browse dialog to import an XML file containing exported snippets. The imported snippets are added to the current list. Export: Click to open a Save as dialog to export all the snippets in an XML file that can be shared and re-imported.
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. ------------------------------------------------------------------------------------------ Engines preferences See Engines Preferences.
l l Edit: Edit that information relating to an existing hardware device. This launches the Edit PKCS#11 Module dialog. Delete: Remove an existing hardware device from the list. The Hardware for Digital Signing preferences also provides you with buttons to : l l Restore Defaults. This option restores the preferences to Defaults. This applies to the current Preferences page only, but not other Preferences.
Logging preferences PlanetPress Connect logs the activities it undertakes whilst running. New Connect logs are created daily and are held for a period before they are automatically deleted. The settings on this page determine the level of logging and how long the log files should be retained. These log files can be an essential resource when diagnosing issues with OL Support.
l l Size-based logs: Use this setting to restrict log file size, and to keep only a specified number of them. By combining the maximize individual log file size with the amount of log files to retain, this effectively allows a hard disk space usage limitation to be placed upon the logging process. l l l Number of days to retain logs: This value only impacts upon historic (closed) logs. Chose between 1 and 99,999 days.
Warning Higher logging settings will have an impact upon Connect production speeds, as well as leading to substantially larger log files. The Advanced Log Settings should only be set in conjunction with advice from OL support, to ensure that only the most relevant settings are set to the higher logging levels. This Preferences page allows you to add ( ) or remove ( ) individual Connect Packages, or change their logging settings ( ).
l l Selected Printers: Lists the available Printer Definition Files in the system. Note that these are not installed Windows printers or printer queues, but PlanetPress Connect Printer Definition Files. Printer checkbox: This checkbox selects/deselects all printers in the list. Click to check all, click again to uncheck all.
"Guides" on page 760). 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. It tests the Print Server URL settings made within that Preferences page. Restore Defaults. This option restores the preferences to Defaults. This applies to the current Preferences page only, but not other Preferences.
l l Enable: activate the Auto Save function. Interval (minutes): enter a number of minutes, e.g. 3 to auto-save the template or data mapping configuration every 3 minutes. Auto Backup Connect Designer can automatically create a backup file when you manually save a template or data mapping configuration. The Auto Save function does not cause backup files to be created. l l l Enable: activate the Auto Backup function. Revisions to keep: Enter the maximum number of backup files.
l General: l l Script timeout at design time (sec): In Preview mode or when running the Script Profiler (see the Profile Scripts dialog), a long running script is stopped after the amount of time set here. The default is 2 seconds, the minimum is 1 second. Expanded script quotes style: When the Expand button in a Script Wizard is clicked, the expanded script will use either double (") or single (') quotation marks.
l Insert Form Field Defaults: l Style: Defines how labels are added to input form elements: l l l l l Attach label to input: The label is placed before the input, and refers to it: Use label as placeholder: The label is removed and the text is put as a placeholder, such as: No label: The label value is ignored.
l Apply: This option applies the settings made within the current Preferences page, but does not close the Preferences dialog. ------------------------------------------------------------------------------------------ Server Configuration Settings This chapter describes configuring the PlanetPress Connect Server. The Connect Server settings are maintained by the Connect Server Configuration utility tool which is installed alongside PlanetPress Connect.
l Engines l Automatic Restart l "Hardware for Digital Signing preferences" on page 843 l "Language preferences" on page 844 l Logging Settings l "Parallel Processing preferences" on page 133 Connection preferences Background The Connection preferences are a way to control precisely how to connect to the PlanetPress Connect Connect Server. This preference page was added in Connect 2018.2 to simplify management of HTTP communication with Connect.
Note This does not limit the number of requests that can be received, just how many are processed in parallel. Additional requests are buffered and are processed as capabilities allow. The default setting is twice the number of processing cores available to the computer. This can be expanded, if the limitation is deemed a bottleneck. l Dedicated Internal Connection checkbox: Set the internal connection HTTP communication setting values. These settings are purely for Connect inter-engine communication.
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 161). Settings for these engines are made in the Connect Server Configuration tool (see "Server Configuration Settings" on page 121). Connect allows for the parallelization of jobs. This means you can allocate 1 or more engines to process jobs.
l l l Your licence, which imposes a speed quota (see "Speed quota: Pages Per Minute" below). The processing power of your machine. How many cores it has determines how many engines can be launched (see "Launching multiple engines" on the facing page). The size and number of jobs of one kind that need to be handled, sequentially or simultaneously. In other words, your use case.
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 Licensed tasks 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 Licensed tasks.
1. Open the Connect Server Configuration utility tool (see "Server Configuration Settings" on page 121). 2. Under Parallel Processing, go to the Content Creation tab and set the number of Merge engines for the various tasks. 3. Go to the Output Creation tab and set the Reserved Weaver (Output) engines. See "Deciding how many engines of each type to launch" below. 4. Click Apply or Apply and Close. It is advised that you do not configure more engines than can be backed by actual processing power.
When the database is installed on a system with a slow hard drive, adding a DataMapper engine may not increase the overall performance. Weaver engine Adding extra Weaver (Output) engine(s) might be useful when large Print jobs are to be run simultaneously with smaller Print jobs. Memory per engine By default, each engine is set to use up to a predetermined amount of RAM. To make optimum use of a machine's capabilities it might be useful to increase the amount of memory that the various engines can use.
The first step in this process is to define the size of small, medium and large jobs. Job size Connect lets you define job sizes by setting the maximum number of pages a job can have and still be considered a small job, and what the minimum number of pages a job can have in order to be considered large. Jobs that fall between the small and large jobs are medium jobs.
handled at the same time by that kind of engine, because there are only so many engines (and speed units) available. Note When each individual record in a job is composed of a very large number of pages, the Memory per engine setting and the machine's hard drive speed are probably more important than the number of Merge engines, since one record cannot be split over multiple cores (see "Memory per engine" on page 128).
may have to wait (or wait longer). However, if the server receives many web requests then having engines reserved for HTML output can help performance. l l By reserving a number of parallel engines for Print jobs of a certain size (see "Number of parallel engines per Print job" on page 129). More parallel engines will make them run faster, but they will have to wait (longer) if the required number of engines isn't available when they come in.
Batch processing. In a batch processing situation, jobs don't have to be handled simultaneously. All jobs - whether they are big and small - are processed one after another. Every job should be handled as quickly as possible. It is therefor recommended to assign the maximum number of engines and target speeds to all jobs. Do not reserve engines for certain jobs. Web requests. In online communication, response times are critical.
l l Daily restart period begin: Only available if Daily restart in period selected. Enter the daily start time for the time window in which automatic restarts will be scheduled to occur. Daily restart period end: Only available if Daily restart in period selected. The end of the daily time window in which the automatic restarts are scheduled to occur. Memory limit Enter the memory limit for individual Engines.
Content Creation Tab (Designer Preferences) A Tab with data that relates solely to Content Creation. The options are: l l Total Merge engines configured read only display: This is a read only entry that shows the total number of Merge engines available. To change this value, you must update the Merge Engines in the Engines preferences page. Multi tasking group: When starting a new Content Creation task, the task will immediately commence if there is a Merge engine available.
Note These entries aren't applied instantaneously. There is often a lag. That is why you can reserve a specific number of engines for new jobs, in the options below. Those reservations operate in real time. The default of 100 records was chosen purely because it is an easily multiplied number, not because it has been proven to have any significant value. It means that on an average system (i.e., less than 10 Merge engines) any decently sized task is allowed to use all Merge engines.
l l l Connect Send - Settings optimized for use with Connect Send. Connect Send needs a Merge engine available for on demand web pages, to be able to process on demand print jobs (especially content creation), and have a Weaver engine available for creating the production output. Capture on the Go - Settings optimized for use with Capture on the Go applications. Capture on the Go needs on demand content creation for web pages (the forms), emails (notifications), and PDFs (persistent version of forms).
come in. This option is better suited for batch processing. l Maximize simultaneous tasks: Merge engines will be reassigned from a running task to new tasks when they arrive. To accommodate as many tasks as possible, the server can dynamically reassign Merge engines to new tasks as they arrive. Thus a running Content Creation task need not block other tasks. If multiple Merge engines are processing a task, an engine can be taken from that task and reassigned to a new task.
Note Currently, it’s only the print and PDF content creation tasks that use multiple Merge engines. l Reserve engines for on demand tasks group checkbox: Reassigning engines is not instantaneous when a new task arrives. To avoid inefficiencies, Merge engines will first finish work on their current selection of records, before being reassigned. Reserving engines better ensures that on demand tasks get picked up right away, but it also means that less engines will be available for large tasks.
l l Licensed speed limit (pages per minute): This read only entry shows the current license speed limitations, in pages per minute. The speed limitations are determined by your Connect license. This information is to help you choose what settings would make sense when assigning the “Target speed” values later in the Tab. Licensed tasks limit: This read only entry shows the current license task (or job) limitations. Note The terms "job" and "task" can be used interchangeably.
not required for either though. l l l Small job (engines): Optionally enter the number of Weaver engines you wish to reserve for Small jobs. To make sure large batch jobs get sufficient speed during Output Creation, set a lower target speed for small jobs, this will automatically allow more for the large and medium jobs. Medium job (engines): Optionally enter the number of Weaver engines to reserve for Medium jobs.
The entire licensed speed limit will always be distributed among jobs when running jobs simultaneously. After assigning a target speed, any remaining licensed speed will be distributed throughout any simultaneous jobs by a ration of the target speed. Some general rules of thumb to apply when distributing target speed: n Do you need to change speeds? In many cases there will likely be no need to change the target speed.
Warning It is highly recommended to keep security enabled and change the password on any server that accessible from the web. If these precautions are not taken, data saved in the server may be accessible from the outside! l l l l l Enable server security: Enable to add authentication to the REST server. - When enabled, the same username and password (which cannot be blank) must be entered in any remote Connect Designer that links to this Server.
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.
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 24).
The engines DataMapper engine/s. A DataMapper engine extracts data from a data file. The number of DataMapper engines is configurable (Engines preferences). Merge engine/s. A merge engine merges data with a template using the scripts in the template, in order to create (Print,Email or Web) content items. The number of merge engines is configurable (see Engines preferences): it can be increased depending on the capacity of the machine that runs the solution (see "Performance considerations" on page 34).
Printing and emailing from the Designer To print or send email from within the Designer, the PlanetPress 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 PlanetPress 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.
To workaround this issue, we recommend downloading and manually installing the latest Visual C++ Redistributable from https://support.microsoft.com/en-ca/help/2977003/the-latestsupported-visual-c-downloads then re-running the Connect 2019.2 installation. Issues associating PDF files with Connect. Under certain circumstances, Connect Setups prior to 2019.2 would fail when attempting to add the "Enhance with Connect" association with PDF files. This would then cause the setup to appear to fail.
Page break changes in 2019.1 Improved page breaking in Connect 2019.1 might impact upon some existing templates. It is recommended that you check page breaking in existing jobs, where page breaks at a specific location are a known criteria.
Backend database might require periodic maintenance Databases maintain a variety of statistics in order to optimize performance. When high levels of inserts and/or deletions occur, the statistical data keeping can struggle to keep up. Over a period of prolonged and intensive processing this can result in a degradation in performance, with the whole database slowing down as it struggles to clean itself up.
C:\Users\\Connect folder. This issue will be fixed in a later release. Job Creation Presets: External Sorting change introduced in 2018.2 Versions prior to 2018.2 did not correctly save the line end characters for external sort configurations in Job Creation Presets, which meant the job could not be externally sorted. This issue has been fixed in version 2018.2. However, Job Creation Presets created with an earlier version may still have the wrong line end character for external sorting.
The currently known backward compatibility issues are listed here: All charts l l l Legend position: The position of the legend is not converted. It defaults to 'left' in a converted chart. 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.
Minor differences in PCL output introduced in 2018.1 The browser component (Mozilla Gecko) used in the WYSIWYG editor of the Designer was updated for Connect 2018.1. This allows use of new CSS properties, such as flexbox. However this update could lead to increased output file sizes for some PCL jobs. This is generally not a cause for concern, however there might be some associated increase in processing times, as well as some minor differences in the output.
Print Output: Booklet Impositioning changes introduced in 2018.1 When Booklet Impositioning is enabled, all pages within a document need to be changed to duplex prior to Impositioning . The method for duplexing jobs has been changed to now always combine existing pages into the front and backsides of sheets, rather than adding empty backsides to any simplex pages. 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.
l C:\Program Files\Objectif Lune\OL Connect\Connect Server Configuration\ServerConfig.ini 2. Change the language parameter to the required one under Duser.language=en | es | de | fr | it | ja | ko | pt | tw | zh Only one of the above language tags should be selected. Once saved, Connect will appear in the selected language at next start-up. GoDaddy certificates When installing Connect offline, dialogs allow installing the GoDaddy certificates. Most users should use the default settings and click Next.
To add additional printer models click on the settings entry box. button next to the Model selection Note that the descriptions of some of the printers were updated in version 1.2 meaning that if you had version 1.n installed, you may find that the same printer style appears twice in the list, but with slightly different descriptions.
Capture can no longer be used within Workflow 7. The plugins are now registered uniquely to Workflow 8 and the Messenger for Workflow 7 is taken offline. It is only possible to use Capture from PlanetPress Connect Workflow 8 thereafter. Capturing spool files after installing Workflow 8 If PlanetPress Connect Workflow 8 is installed alongside PlanetPress Suite Workflow 7, the PlanetPress Suite 7 option to capture spool files from printer queues will no longer function.
for an engine and when it becomes available. Note that there is no way to cancel any commands other than stopping the Server. Print Content and Email Content in PlanetPress Workflow In PlanetPress Workflow’s Print Content and Email Content tasks, the option to Update Records from Metadata will only work for fields whose data type is set to String in the data model. Fields of other types will not be updated in the database and no error will be raised. This will be fixed in a later release.
Uninstalling This topic provides some important information about uninstalling (removing) PlanetPress Connect2019.2. To uninstall PlanetPress Connect select the application from within the Add/Remove programs option under the Control Panel. This will start the PlanetPress Connect Setup Wizard in uninstall mode. Note The PlanetPress 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 PlanetPress Connect Setup Wizard in uninstall mode. The Wizard consists of the following pages: 1. PlanetPress Connect Setup: An information page, listing what will be uninstalled, and also warning about impacts upon running Applications and Services. 2. Data Management: A page that provides options for backing up or deleting Connect data.
General information Connect consists of visible and invisible parts. The invisible parts process the Connect job to provide the actual output. They are introduced to you in the topic: "Connect: a peek under the hood" below. For information about Connect logging, see "Log files" on page 166. For a list of all file types used in Connect, see: "Connect file types" on page 168.
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.
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 24).
The engines DataMapper engine/s. A DataMapper engine extracts data from a data file. The number of DataMapper engines is configurable (Engines preferences). Merge engine/s. A merge engine merges data with a template using the scripts in the template, in order to create (Print,Email or Web) content items. The number of merge engines is configurable (see Engines preferences): it can be increased depending on the capacity of the machine that runs the solution (see "Performance considerations" on page 34).
Printing and emailing from the Designer To print or send email from within the Designer, the PlanetPress 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 PlanetPress 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.
Every time output is generated, the Designer and/or Connect Server and any engines involved in the operation produce their own log files. Each component writes its log files to a dedicated subfolder of the Log folder. Merge engines write to the logs/Mergeengine folder, Weaver engines to the logs/Weaverengine folder, DataMapper engines to the logs/Datamapperengine folder, Server to the logs/Server folder, and so forth. Note that actions of the Cleanup service are only logged in the Server's log file.
l l The Designer's logging preferences are set via the Designer; see: "Logging preferences" on page 845. The Connect Server's settings are maintained by the Connect Server Configuration utility tool; see "Server Configuration Settings" on page 121. The logging level that is set applies to the Server as well as the engines. The Designer's log messages are also displayed in the Messages pane (see "Preflight Results and Messages" on page 1034).
l l l l .OL-package: A transfer file used to package one or many of the above files (the data model being part of both the template and the data mapping configuration). Created by using the File > Package dialog. (See "Package dialog" on page 960.) .OL-script: One or more Designer scripts. Scripts personalize the output of a template. They are either added via wizards (see "Personalizing content" on page 786) or selfwritten (see "Writing your own scripts" on page 853).
OL Connect projects An OL Connect project is an automated process, or combination of processes, in which the Connect Server and Database are used. (For an overview of the architecture of the OL Connect software, see "Connect: a peek under the hood" on page 161). Typically, an OL Connect project aims at automating (part of) a company's communication with its customers, suppliers, or other parties.
Wizards" on page 973 in the online help or the Project Wizards overview video on the OL Learn website. Typically, in an OL Connect project there is a number of Workflow processes that communicate with the Connect Server, Database and/or File Store through one or more of the specially developed OL Connect tasks. For help on building these Workflow processes see "Workflow processes in OL Connect projects" on page 213 and "OL Connect tasks" on page 215.
There is an introductory Project Wizards overview video on the OL Learn website. For generic information about Connect solutions and their components, see "OL Connect projects" on page 170. Note The projects require that the Connect Server and Connect Workflow be installed on the local machine. These are the projects that can be installed with a wizard. l l Print promotional jobs.
and PDF. In order to create the PDF, the data are merged with a Connect template. (See: "Project Wizard: COTG Timesheets" on page 180.) Project wizard: Basic Email The Basic Email project wizard creates an OL Connect project that sends emails with two attachments: a Return and Refund Policy (PDF) which is the same for all emails, and a delivery note (PDF) which is attached to the email dynamically. The email has a mailto link.
Testing and running the project Once the project wizard has finished the installation, the project is ready to be tested. 1. If the templates and data mapping configurations haven't been sent to Workflow yet, do that first (see "Sending files to Workflow" on page 457). This requires that the Workflow service is running (see Starting the Workflow service in Workflow's Online Help). 2. Locate the Workflow configuration in the project folder and open it in OL Connect Workflow. 3.
Project details The email template The email's design is in the EM_BASIC Email Message template. It contains one Email section (see "Email templates" on page 526). Styling is done via style sheets (see "Local formatting versus style sheets" on page 741). The style rules are in the context_htmlemails_styles.css file. Note how they use HTML tags, IDs and classes to select elements. (See also: "Selectors in Connect" on page 878.
"Variable Data" on page 801.) l l The To and Subject scripts apply to email fields. (Click Email Fields at the top of the email to expand all email fields.) For information about this kind of scripts, see: "Email header settings" on page 530. Finally, there are two custom scripts: l The Personalize Support link script adds the order number to the 'support team' link (which is a mailto link). The Year script puts the current year in the footer.
The data mapping configuration The Workflow process uses a data mapping configuration, made with "The DataMapper" on page 225: EM_BASIC Data. To open the data mapping configuration, open the Designer, select File > Open from the menu and browse to the Configurations\Resources folder. This data mapping configuration will of course only work with the appropriate data files. It was designed for XML files that are structured like this file: Sample Data.xml (in the Configurations\Resources\Data folder).
To see the script, click on the DeliveryNote field in the Data Model pane at the right; then take a look at the Step Properties pane (in the middle). To see where the property is defined, click the Preprocessor step on the Steps pane (at the left); then look at the Properties section on the Step Properties pane. Customizing the project A project is a great starting point for building an OL Connect solution. This part explains how to make changes to the project.
Note If the input data is JSON, you don't need a data mapping configuration: JSON data can be used in a template as is. See: "Adding JSON data from a JSON file" on page 798. However, if you want the data to be saved in the OL Connect database, put the XML/JSON Conversion plugin before the Send to Folder task to convert the JSON to XML, and create an XML data mapping configuration to extract the data.
Workflow configuration The current Workflow configuration is very simple. In reality, a process that generates email output will be part of a larger project, in which, for example, invoices are produced in a separate process, stored in a folder and attached to an email at a later time. For general information about processes in Workflow see About Processes and Subprocesses, in the Online Help of Workflow.
Finally, you need a valid COTG account, Repository ID and password. You could use dummy data to create the Project Wizard and finish the installation, but you won't be able to test the project. For more information about the options, see: "COTG Timesheets - Project Wizard" on page 975. Tip If you own PlanetPress Connect or PReS Connect, free COTG trial licenses may be available to you; see http://www.captureonthego.com/en/promotion/.
Note The process is pre-configured to use the sample data file, which comes with the project, when it runs in Debug mode. Alternatively you could copy the sample data file to the In folder. 5. Launch the COTG app and log in using the COTG account that you entered in the Project Wizard. 6. In the app, open the Repository and download one of the forms. 7. From the app's Library, open the form. 8. Enter data and draw a signature. 9. Submit the form.
Tip Hover over the name of a script in the Scripts pane to highlight parts of the template that are affected by the script. l l l The guid script adds data to the guid field. This is a hidden field. It is only visible in the Source view. The result of the form action script is added to the form's action attribute. To see how that is done, double-click the script; then click Options. The Year script puts the current year in the footer of the page. This is a custom script.
a field that contains the action of the Form. Note that the COTG account is the same in all of the records in the sample data. It is inserted into the sample data by the Project Wizard. COTG Timesheet Report The COTG Timesheet Form data mapping configuration is designed to extract the data that are submitted via the app. It first extracts the common fields, and then the information from the rows in the form, in a loop.
l Finally, the Output to Capture OnTheGo task sends information about the form to the COTG Server. Double-click the task to see how variables are used in its settings. The Delete task is an Output task that does nothing, actually; it doesn't even remove anything. However, this step is useful when running the project step by step in Debug mode. Tasks will only return their output to the process - where it can be viewed - as long as they are followed by another task.
preferences (see "Project Wizard deployment settings" on page 849) before installing the project. The form If you want to add inputs to the form and extract the submitted data, here's how to do that. 1. Open the Web section and add elements to the Web Form (see "Using COTG Elements" on page 593 and "Using Form elements" on page 558). You could also add text, images and other elements (see "Content elements" on page 628) and change the layout of the page (see "Styling and formatting" on page 741). 2.
Tip The saved file can be used to create a data mapping configuration. The report Using different data in the report requires changing the COTG Timesheet Report template (see "Personalizing content" on page 786). Tip The Designer can have one data mapping configuration and one template open at the same time. Use the tabs at the top of the workspace to switch between the two. Click the synchronize button on the Data Model pane to make sure that the Data Models are the same in both.
probably means saving the input as sample data first (see "Saving input as sample data" on page 186). l How the submitted data must be handled depends entirely on what they are used for. You may have to write them to a database and use them in an email, for example. The cotg_ts_generate_report process demonstrates only a few of the things that you can do with the submitted data.
Note In order to use the project, OL Connect Server and OL Connect Workflow must be installed on the local machine. The wizard lets you select the folder in which you want the solution to be installed. In the selected folder, the Project Wizard will create two subfolders: Configurations and Workspace. The project's resource files are saved to the Configurations folder. The Workspace folder is used for debugging or running the solution.
Running the project Having tested the project, you will be ready to send it to the Workflow service; see Saving and sending a Workflow Configuration in Workflow's Online Help. To test the project, which then runs on the server, copy the Sample Data.xml file from the Configurations\Data folder to the Workspace\In folder. The output should appear in the same folder as before. Project details The letter template The promotional letter is designed in the PR_PROM Letter template.
l The sender's address is adjusted depending on where the customer lives. The two different sender's addresses are saved in snippets. (See: "Loading a snippet via a script" on page 872.) Styling is done via CSS. The context_all_styles.css file contains style rules for certain HTML elements (level 1 and 2 headings) and for elements with a certain class or ID. The data mapping The data with which the template is merged come from an XML file: Sample Data.xml.
Configurations\Resources\Output presets folder to select the preset. Note that the Output Type, on the Print Options page in the Output Creation dialog, is set to Prompt for file name. This setting is overruled in the Workflow configuration (see below). Workflow configuration Whenever new input data appears in the Workspace\In folder, the letter template is automatically merged with it and then printed.
Do you intend to expand the project into a solution where Workflow runs on a different machine that also has a different regional setting? Then indicate the desired encoding in the Designer preferences (see "Project Wizard deployment settings" on page 849) before installing the project. Input data Here's how to adjust the project to input data that has a different structure or file type or comes from a different source. 1. Create a new data mapping configuration to match your input data.
l Change the "Master Pages" on page 505 l Add sections (see "Print context" on page 482) In order to further personalize the letter, you need to open your data mapping configuration. (See: "Personalizing content" on page 786.) Tip The Designer can have one data mapping configuration and one template open at the same time. Use the tabs at the top of the workspace to switch between the two. Click the synchronize button on the Data Model pane to make sure that the Data Models are the same in both.
Project Wizard: Print Transactional Jobs The Print Transactional Jobs Project Wizard creates an OL Connect project that produces transactional print output. It prints invoices to: o A single PDF for the entire job (in which the invoices are grouped per customer). o One PDF per customer. o One PDF per invoice. For an introduction to this Project Wizard, see Project Wizards overview video on the OL Learn website (start at 7:56) or on Youtube: Print Transactional Jobs.
1. Locate the Workflow configuration in the Configurations\Workflow folder and open it in OL Connect Workflow. 2. Select the pr_tran_generate_output process. 3. Open the Debug ribbon and click Run. The debugger always skips the first Input task. It needs a sample data file to work with. Normally you'd have to select a sample data file in Workflow. However, the project is preconfigured to use this file: Sample Data.xml (located in the project's Configurations\Data folder).
Scripts Scripts personalize content. Most of the scipts in the Information folder (on the Scripts pane) are made with the Text Script Wizard (see "Using the Text Script Wizard" on page 803). Tip Hover over the name of a script in the Scripts pane to highlight parts of the template that are affected by the script. Text that should be replaced by data is not only surrounded by @ (e.g. @date@) but also wrapped in a span (see "Span" on page 695).
The data mapping configuration The template is merged with data from an XML file: Sample Data.xml. They are extracted from the XML file with a data mapping configuration, made with the DataMapper (see "The DataMapper" on page 225). The data mapping configuration first extracts the common invoice fields, and then the transactional data, in a loop. For information about how to extract transactional data from an XML file, see: "From an XML file" on page 262.
The PR_TRAN PDF per Customer preset outputs one file per customer, separating the output by document set. The last output preset needs the invoices in the job to be grouped in document sets first (by customer number, in this case). That is what the Job Creation Preset does. This preset is used by the Create Job task in the Workflow configuration. Variable file names The Job Creation Preset does something else, too: it attaches extra information - meta data - to the documents and to the document sets.
Do you intend to expand the project into a solution where Workflow runs on a different machine that also has a different regional setting? Then indicate the desired encoding in the Designer preferences (see "Project Wizard deployment settings" on page 849) before installing the project. Input data Here's how to adjust the project to input data that has a different structure or file type or comes from a different source. 1. Create a new data mapping configuration to match your input data.
l Change the "Master Pages" on page 505 l Add sections (see "Print context" on page 482) In order to further personalize the invoice, you need to open your data mapping configuration. (See: "Personalizing content" on page 786.) Tip The Designer can have one data mapping configuration and one template open at the same time. Use the tabs at the top of the workspace to switch between the two. Click the synchronize button on the Data Model pane to make sure that the Data Models are the same in both.
2. Change the Grouping Options by selecting the relevant fields on the Job, Job Segment, and/or Document Set tab. 3. Adjust the Separation Options in the Output Creation Preset accordingly. Tip The Execute Data Mapping task, Create Job and Create Output task may be replaced with the All In One task, with its Output Creation set to None. Using the All In One instead of the separate tasks makes the process a little faster.
The selected folder's path is saved to a global variable in the Workflow configuration (see "The Workflow configuration" on page 205). Testing and running the project Once the Project Wizard has finished the installation, the project is ready to be tested. 1. If the templates and data mapping configurations haven't been sent to Workflow yet, do that first (see "Sending files to Workflow" on page 457).
Tip The saved file can be used to create a data mapping configuration. Project details The web templates Both web pages are designed in the WEB_FORM Web Page template. It contains a Web context with two Web pages: form and thank_you (see "Web pages" on page 547). Styling is done via style sheets (see "Local formatting versus style sheets" on page 741). The style rules are in the context_web_styles.css file. Note that they use the HTML tag (e.g. section), ID (#theID) and/or the class (.
The Workflow configuration The project's Workflow configuration contains just one process: an OL Connect Web process (see "Web processes with OL Connect tasks" on page 222). Its NodeJS Server Input task has two HTTP Action entries: form and thank_you. This means the process will be triggered when the server receives a request that ends with either /form or /thank_you. The request is saved to an XML file, which becomes the job file. The Text Condition task checks if the request's header is thank_you.
Customizing the project A project is a great starting point for building an OL Connect solution. This part explains how to make changes to the project. Do you intend to expand the project into a solution where Workflow runs on a different machine that also has a different regional setting? Then indicate the desired encoding in the Designer preferences (see "Project Wizard deployment settings" on page 849) before installing the project.
Web pages Apart from the form, there are lots of ways to modify the template. You could add text, images and other elements (see "Content elements" on page 628) and change the layout of the web pages (see "Styling and formatting" on page 741). Once the template is ready, send it to Workflow (see "Sending files to Workflow" on page 457). Finally, in Workflow, adjust the process: double-click the Create Web Content task to open it, and select the new template.
Project Wizard: Serving a Web Page The Serving a Web Page Project Wizard creates an OL Connect project that responds to a request by serving a web page. This project extracts data from a parameter in the given URL and shows the value on the web page. For an introduction to this Project Wizard, see Project Wizards overview video on the OL Learn website (start at 12:44) or on Youtube: Serving a Web Page.
To test the project: 1. Send the Workflow configuration to the OL Connect Workflow service; see Saving and sending a Workflow Configuration in Workflow's Online Help. 2. Access the web page by entering the following URL in a browser on the machine that runs Workflow: http://localhost:9090/hello. 3. Follow the instructions on the page to see how values in the URL change the text of the page. Saving input as sample data Testing a process in Debug mode is only possible with a sample data file.
Project details The web template The web page is designed in the WEB_HELLO Web Page template. It contains one Web section (see "Web pages" on page 547). Styling is done via style sheets (see "Local formatting versus style sheets" on page 741). The style rules are in the context_web_styles.css file. Note how they combine the HTML tag, ID and class of elements to select them. (See also: "Selectors in Connect" on page 878.) There are only two scripts in the template, as you can see on the Scripts pane.
The NodeJS Server Input task's HTTP action is set to hello. This means that this process will be invoked whenever someone tries to access the Workflow server with this URL: http:// {server's address}/hello. The Delete task is an Output task that does nothing, actually; it doesn't even remove anything. However, this step is useful when running the project step by step in Debug mode.
Input data If you want to add other parameters to the URL and use those data in the template, here's how to do that: 1. Run the project, add more parameters to the URL and let the process save the input data to a file (see "Saving input as sample data" on page 209). 2. Use the file to create a new data mapping configuration that extracts the additional data. (See "Creating a new data mapping configuration" on page 227.) 3.
same in both. Once the template is ready, send it to Workflow (see "Sending files to Workflow" on page 457). Finally, in Workflow, adjust the process: double-click the Create Web Content task to open it, and select the new template. This is only necessary when the file name has changed. Send the Workflow configuration to the server (see Saving and sending a Workflow Configuration in Workflow's Online Help).
l l l l l l Input tasks look for certain input data on a certain channel and start a process when they find it. The data that enter the process are handed from one plugin to the next in the form of a file: the 'job file'. Process logic tasks help you to control the process, for example by branching it, creating a loop, or referring to another process or a subprocess. Action tasks perform a wide variety of operations.
l COTG processes. The process that creates a form for the Capture OnTheGo app is in essence a web process, but a COTG solution consists of more than one process. The typical COTG processes are described here: "Capture OnTheGo Workflow processes" on page 217. Tip Project Wizards The OL Connect software comes with a number of Project Wizards that generate a Workflow configuration, and any Connect templates, data mapping configurations, and Print Presets required to make the project work.
Email The Create Email Content task creates email content items and sends them to the recipient. See "Email processes with OL Connect tasks" on page 218. Web The Create Web Content task can handle only one record at a time and returns a web page. See "Web processes with OL Connect tasks" on page 222. Print The Create Print Content task generates a set of Print content items in the OL Connect database, but it is not an Output task.
l l The Set Properties task adds properties as tags to items/sets in the OL Connect database. The Retrieve Items task retrieves items (records, or content items, etc.) or sets of items from the OL Connect database, by ID or by property. Note Combined, the Set Properties and Retrieve Items tasks make it possible to batch and commingle Print content items.
l l One process that authenticates and replies to document requests from COTG users. This process returns the actual document directly to the app. It starts with a Server Input task (the NodeJS Server Input task or the older HTTP Server Input task), which returns the final output of the process to the caller. One process that receives and handles the data when a COTG user submits a form. This process starts with a Server Input task as well.
enter an empty JSON string: {}. However, if the template should be merged with data, you will need to add one or more tasks to provide the required data. The Create Email Content task must receive either Metadata containing information regarding a valid Record Set, or JSON data. This can be the output of tasks like: l l An Execute Data Mapping task which retrieves data from the job file (such as the request XML).
Print processes with OL Connect tasks Generating print output from a template via an automated process requires you to design a print process in the PlanetPress Workflow configuration tool. This topic explains which tasks and files are used in a print process. Tip An easy way to setup a print project in OL Connect, including the print process and the files that it needs, is to use a Project Wizard. There are two Project Wizards that create a sample print project. See "Project Wizards" on page 973.
The All In One task is the fastest and most efficient way to create print output. The task exchanges less data with the server than the separate plugins do and it has multi-threading support: it can produce the data set and content items in parallel. Nevertheless, the separate plugins would be used in the following situations: l l l The record set, created by the Execute Data Mapping task, is also needed to create another kind of output in the same process.
All of these files are made with the Designer and need to be sent to PlanetPress Workflow before they can be used in the Workflow process; see "Sending files to Workflow" on page 457. When the necessary files have been created and sent to Workflow, the next step is to create a process in PlanetPress Workflow that generates Print output, using these files. For more information about how to create a process in Workflow, please refer to the Online Help of Workflow.
The Create Web Content task creates an HTML output file from the Web context in a template. Select the Web template in the task's properties. If the Web template doesn't need any data, you can set the Data Source of this task to JSON and enter an empty JSON string: {}, or set it to Record ID and enter 0 (zero). However, if the template should be merged with data, the task needs either a valid Record ID or a JSON object.
The next step is to create a process in PlanetPress Workflow that generates Web output, using these files. For more information about how to create a process in Workflow, please refer to the Online Help of Workflow.
The DataMapper The DataMapper is the tool to create a data mapping configuration. Data mapping configurations are used to extract data and transpose that data into a format that can be shared amongst different layouts and outputs created with the OL Connect Designer and Workflow. The original data, located in a file or database outside of OL Connect, is called a data source.
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. See "Data mapping workflow" on page 248 and "The Data Model" on page 286. What's next? Use the data mapping configuration in the Designer module to create templates for personalized customer communications. To learn more, see "The Designer" on page 449.
Creating a new data mapping configuration A new data mapping configuration can be made with or without a wizard. When you open a data file with a DataMapper wizard, the wizard automatically detects a number of settings. You can adjust these settings. Next, the wizard automatically extracts as many data fields (or metadata, in case of a PDF/VT or AFP file) as it can, in one extraction step. Without a wizard you have to make the settings yourself, and configure the extraction workflow manually.
l From the File menu 1. Click the File menu and select New. 2. Click the Data mapping Configuration drop-down and select Files and then the file type: l Comma Separated Values or Excel (CSV/XLSX/XLS), l Microsoft Access l PDF, PS, PCL or AFP l Text l XML. 3. Click Next. 4. Click the Browse button and open the file you want to work with. 5. Click Finish.
the DataMapper won't either. If the original is a PDF, it is recommended to find an alternative way to get it in the system instead of going through a print operation. l Rotated pages in a PDF are supported (if rotated 0/90/180/270 degrees). The Extract step will be able to extract data from horizontal and vertical lines of text on rotated pages.
The steps to take with the wizard depend on the file type. See: l "Using the wizard for CSV and Excel files" on page 232 l "Using the wizard for databases" on page 234 l "Using the wizard for PDF/VT or AFP files" on page 237 l "Using the wizard for XML files" on page 239 Generating a counter Instead of creating a data mapping configuration for a certain type of data file, you may create a data mapping configuration that only contains a series of sequential numbers.
l l l l l l 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. Padding character: Which character to add if the counter's value is smaller than the width. Width: The number of digits the counter will have.
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. If your data file contains transactional data, you will probably want more lines to go in one record and put the transactional data in detail tables. The wizard cannot create detail tables.
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 make the following settings: l l l First row contains field names: Uses the first row of the Excel sheet as headers, which automatically names all extracted fields. Sheet: Select the sheet from which the data should be extracted.
Tip The Sort on option, combined with the Stop data mapping option of the "Action step" on page 283, allows to process only a group of items without having to examine all records. (See also: "Text and PDF Files" on page 369.) Verify that the data are read properly. Finally click Finish. All data fields are automatically extracted in one extraction step. Using the wizard for databases The DataMapper wizard for database files helps you create a data mapping configuration for a database file.
4. Use the drop-down to select the database type. 5. Click Next. Wizard settings for a database file After opening a database file with a wizard there are a number of settings to make, depending on the database type (see below). On the last page of the dialog, click Finish to close the dialog and open the actual data mapping configuration. Note After creating the initial data mapping configuration you may use a custom SQL query via the Input Data Settings; see "Settings for a database" on page 252.
l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the selected column has numbers, it will be sorted as a text. Microsoft Access l l l Password: Enter a password if one is required. 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.
JDBC Note Since JDBC can connect to multiple types of databases, a specific database driver and path to 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.
Tip To extract information from the metadata in the extraction workflow itself, you have to create a JavaScript extraction (see "Using scripts in the DataMapper" on page 399 and "extractMeta()" on page 421). If the PDF doesn't contain any metadata, each page is a new record - in other words, a boundary is set at the start of a new page -, which is exactly what happens when you open the file without a wizard. You can open a PDF/VT or AFP file with a wizard using the Welcome screen or the File menu.
Click Finish to close the dialog and open the actual Data Mapping configuration. On the Settings pane, you will see that the boundary trigger is set to On metadata. The selected metadata fields are added to the Data Model. Note Extracting data from a PDF that comes from a Windows printer queue (a PDF converted to PostScript, converted back to PDF by an Input task in Workflow) might not work (see the Connect Knowledge Base.
3. From the Using a wizard pane, select XML. 4. Click the Browse button and open the XML file you want to work with. Click Next. l From the File menu 1. In the menu, click File > New. 2. Click the Data mapping Wizards drop-down and select From XML File. 3. Click Next. 4. Click the Browse button and open the XML file you want to work with. Click Next. After selecting the file, you have to set the split level and trigger type: l l XML Elements: This is a list of node elements that have children nodes.
This topic's intention is to provide you with a method to make LincPDF take these advanced settings into account, so the generated PDF can be correctly read in the DataMapper. Note The method described in this topic can only be done using PlanetPress Workflow. Requirements To be able to import PCL input files, you will need the PCL Input license, in addition to PlanetPress Connect. To check if you have a PCL Input license: 1. Open the Connect Software Activation module. 2.
1. Add a local variable to your process and name it lincPDFOptions. 2. Add another local variable named workingDir and give it a default Windows path (for example: C:\PCL2PDF\). 3. Add a plugin to capture the PCL File. You may use any input plugin that imports the PCL file into the process, such as Folder Capture, LPD Input, etc. 4. Using the Change Emulation plugin, change the Emulation to ASCII.
(default: 0). PDF Author -dAuthor:$s string PDF document’s author (default: null). PDF Title -dTitle:$s string PDF document’s title (default: filename). 6. Next, use the External Program plugin to convert the PCL to PDF with the above % {lincPDFOptions} options. In the General tab: l l l l l Set the Executable file to: C:\Program Files\Objectif Lune\OL Connect\LPDFConv\Bin\LincPDFC.exe Set the Parameters to: -i"%F" -o"%{workingDir}\Temp\%O.
the Workflow log. 7. Save the output of LincPDFC using the –o folder specifier in the parameter (% {workingDir}\Temp, in this case.) In another Workflow process, import the created PDF with the Folder Capture input plugin, specifying the output folder of the previous process (%{workingDir}\Temp in the example) as input folder, and %O.pdf as the file mask.
Once you have the PDF as job file, you may pass it to the Execute Data Mapping plugin for further processing. LincPDFC Options To view the available options that can be set in LincPDF, run the executable (LincPDFC.exe) in a command prompt window. It will display a help message with available options.
/*Open Windows Command Prompt Change directory cd C:\Program Files\Objectif Lune\OL Connect\LPDFConv\Bin C:\Program Files\Objectif Lune\OL Connect\LPDFConv\Bin\LincPDFC.exe LincPDF for Command-Line, Version 2.6.6.14 Copyright (c) 2001-2007 Lincoln & Co., a division of Biscom, Inc. Usage: LincPDF -iInput.PCL [-oOutput.
-dTitle:$s : PDF Title -dSubject:$s : PDF Subject -dAuthor:$s : PDF Author -dKeywords:$s : PDF Keywords -dVersion:num : PDF Version (multiply by 10) Page Setup: -pWidth:num : Page Width (required only if Page Type is Custom) -pHeight:num : Page Height (required only if Page Type is Custom) -pXOff:num : Page X Offset (see also Measurement) -pYOff:num : Page Y Offset (see also Measurement) -pMeasure:num : Page Measurement (0-inch, 1-mm, 2-point) -pOrient:num : Page Orientation (0-Portrait, 1-Landscape) -pTyp
-yCopyContents : Enable Copying Text and Graphics from Document -yUse128Bit : Use 128-bit Encryption -yAssembleDocument : Enable Assemble Document (128-bit encryption only) -yExtractText : Enable Text and Graphics Extraction (128-bit encryption only) -yLowResolutionPrint : Enable Lower-level Resolution Printing (128-bit encryption only) Tips ---------------------------------------------------. using quotation mark for complicated string, for example, -dKeywords:"key1, key2" .
after the Data Mapping workflow has completed ("Postprocessor step" on page 284). When you create a new data mapping configuration, these steps are added automatically, but they don't actually do anything until you configure them. In between the Preprocessor and Postprocessor step, the workflow can contain as many steps as needed to extract the required data. Adding steps Extracting data is the main way to build a data mapping workflow; see "Extracting data" on page 254.
clipboard. To place the step at its destination, right-click any step and select Paste Step, or use the Paste button in the toolbar. The pasted steps will be positioned below the selected step. Keep in mind that steps may influence each other, so you may have to move other steps as well to ensure that the workflow continues to function properly.
pane at the left. l l l Input Data settings help the DataMapper read the data source and recognize data correctly. Boundaries mark the start of a new record. They let you organize the data, depending on how you want to use them. Data format settings define how dates, times and numbers are formatted by default in the data source. Input data settings (Delimiters) The Input Data settings (on the Settings pane at the left) specify how the input data must be interpreted.
Settings for a PDF File PDF files have a clear and unmovable delimiter: pages. So, the Input Data settings are not used to set delimiters. Instead, these options determine how words, lines and paragraphs are detected when you select content in the PDF to extract data from it. For an explanation of all the options, see: "PDF file Input Data settings" on page 342. Settings for a database Databases all return the same type of information.
See also: "XML File Input Data settings" on page 345. Note The DataMapper only extracts elements for which at least one value is defined in the file. Record boundaries Boundaries are the division between records: they define where one record ends and the next record begins. Using boundaries, you can organize the data the way you want. You could use the exact same data source with different boundaries in order to extract different information.
By default, the user preferences are set to the system preferences. These user preferences become the default format values for any newly created data mapping configuration. To change these preferences, select Window > Preferences > DataMapper > DataMapper default format (see "DataMapper preferences" on page 832). Data format settings defined for a data source apply to any new extraction made in the current data mapping configuration.
Preprocessor step The Preprocessor step allows the application to perform actions on the data file itself before it is handed over to the Data Mapping workflow. In addition, properties can be defined in this step. These properties may be used throughout the extraction workflow. For more information, see "Preprocessor step" on page 274. Adding an extraction In an extraction workflow, Extract steps are the pieces that take care of the actual data extractions. To add an Extract step: 1.
field name stays the same. Drop data on empty fields or on the record itself to add new fields. Special conditions The Extract step may need to be combined with another type of step to get the desired result. l l l Data can be extracted conditionally with a Condition step or Multiple Conditions step; see "Condition step" on page 279 or "Multiple Conditions step" on page 282. Normally the same extraction workflow is automatically applied to all records in the source data.
1. Select the field in the Data Model that contains the extracted lines. 2. On the Step properties pane, under Field Definition, click the drop-down next to Split and select Split lines. Adding fields to an existing Extract step For optimization purposes, it is better to add fields to an existing Extract step than to have a succession of extraction steps. To add fields to an existing Extract step: 1. In the Data Viewer pane, select the data that needs to be extracted.
occurred and all data fields related to subsequent steps 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 that are displayed, you can either: 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.
To resize a data selection, click and hold one of the resize handles on the borders or corners, move them to the new size and release the mouse button. To move the data selection, click and hold anywhere on the data selection, move it to its new desired location and release the mouse button. Note In a Text or PDF file, when you move the selection rectangle directly after extracting data, you can use it to select data for the next extraction.
an XML document. Extracting transactional data Promotional data are data about customers, such as addresses, names and phone numbers. In Connect, each record in the extracted record set represents one recipient. The number of fields that contain promotional data is the same in each record. These data are stored on the root level of the extracted record.
For more information about detail tables, multiple detail tables and nested detail tables, see "Example " on page 335. 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 extraction step is placed inside the Repeat step, just before the GoTo step. 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. By default, the Repeat type of this step is set to For Each, so that each of the repeated elements is iterated over. 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.
2. (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. 3. Select the Repeat step on the Steps pane. 4. Extract the data: inside a repeating element, select the data that you want to extract. Then right-click the selected nodes and select Add Extraction, or drag & drop them in the Data Model. 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.
1. Select an element in the first line item. 2. Right-click on the selection and select Add Goto. The Goto step will move the cursor to the start of the first line item. 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.
1. Select the start of the Repeat step on the Steps pane. 2. Look for something in the data that distinguishes lines with a line item from other lines (or the other way around). Often, a "." or "," appears in prices or totals at the same place in every line item, but not on other lines. 3. Select that data, right-click on it and select Add Conditional. Selecting data - especially something as small as a dot - can be difficult in a PDF file.
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 255). 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. Dropping the data somewhere else on the Data Model pane, or using the contextual menu in the Data Viewer, creates a new detail table, with a default name that you can change later on (see "Renaming a detail table" on page 331).
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 facing 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.
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. However, the data can be spread over multiple lines and multiple pages: l l Line items may continue on the next page, separated from the line items on the first page by a page break, a number of empty lines and a letterhead.
Using a Condition step or Multiple Conditions step Using a Condition step ("Condition step" on page 279) or a Multiple Conditions step ("Multiple Conditions step" on page 282) one could determine how big the region is that contains the data that needs to be extracted. In each of the branches under the Condition or Multiple Conditions step, an Extract step could be added to extract the data from a particular region. The Extract steps could write their data to the same field.
Page 272
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 254. To add a field without extracting data, see "JavaScript-based field" on page 292. 2. On the Step properties pane, under Field Definition, select the field and change its Mode to Javascript.
Note that this script replicates exactly what can be done in a Condition step. In cases like this, it is recommended to use a Condition step. Only use a script when no steps are sufficient to give the expected result, or when the extraction can be better optimized in a script. Steps In the DataMapper, steps are part of an extraction workflow (see "Data mapping workflow" on page 248). They contain a specific instruction for the DataMapper, for example to extract data, create a loop, or apply a condition.
could be created to be added to each record in the output for integrity checks later on, or a time stamp could be 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.
Configuring the Preprocessor step For an explanation of the settings for preprocessors, see: "Preprocessor step properties" on page 357. 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 JavaScript code. The data is stored 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 254. Alternatively, right-click the Steps pane and select Add a Step > Add Extraction. Make the required settings on the Step properties pane.
avoid an infinite loop, except with XML data. 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 in most cases. 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.
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.
(in the Step properties pane).Make a selection in the Data Viewer and click the Use selected text button in the Right Operand section. You will now be able to see whether or not the proper text is extracted by the current selection. Repeat this until you are satisfied that the proper data is being extracted.Click on the Use selection button in the Left Operand section to fill out the coordinates.The point of origin of each character is at the bottom left of each of them and extends up and to the right.
Rules are by default combined with AND. To change the way rules are combined, right-click "AND" in the Rule Tree, on the Step properties pane, and select OR or XOR instead. (XOR means one or the other, but not both.) 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.
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 385. The settings for a Case are the same as for a Condition step; see "Condition step properties" on page 381.
l 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 274. Stop the processing of the current record and move on to the next one. 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 out some records or skip records partially.
To add a postprocessor: l Select the Postprocessor step on the Steps pane. l On the Step properties pane, under Postprocessor, click the Add button l . Under Postprocessor definition, add the script. Postprocessor tasks must be written in JavaScript (see "Using scripts in the DataMapper" on page 399 and "DataMapper Scripts API" on page 396). Configuring the Postprocessor step For an explanation of the settings for postprocessors, see "JavaScript" on page 392.
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. The Data Model is shown in the Data Model 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.
Creating a Data Model A Data Model is created automatically within each data mapping configuration, but it is empty at the start. To fill it you could use another Data Model (see "Importing/exporting a Data Model" below) or start creating a data mapping workflow (see "Data mapping workflow" on page 248). To learn how to add and edit fields, see "Fields" on page 291.
as the DataMapper immediately discards non-required fields that are not referenced by any Extract step. Editing the Data Model The Data Model is generally constructed by extracting data; see "Extracting data" on page 254. Editing fields You can modify the fields in the Data Model via the contextual menu that opens when you rightclick on something in the Data Model pane. For an explanation of the options in this menu, see "Data Model contextual menu" on page 328.
Alternatively, you can right-click the field, group or detail table and select one of the options in the Move menu, to move it up or down within the list or group. Fields cannot be moved into another table. However, inside a table they can be moved up or down. Grouping fields To group one or more fields, select the field(s), right-click and select Add group. It is also possible to create groups within groups; this is done in the same way.
Adding fields and data via Workflow The Data Model is not extensible outside of the DataMapper. When it is used in Workflow - as part of a data mapping configuration - the contents of its fields can be updated but not its structure. There are a number of instances however, where fields may need to be added to the data model after the initial data mapping operation has been performed.
Note Many of these actions can also be performed using REST calls. Please refer to PlanetPress Connect Workflow documentation for more information about the plugins involved. Fields Extracted data are stored in fields in the Data Model (see "The Data Model" on page 286). Fields can be present on different levels: on the record level or in a detail table (see "Example " on page 335). They can be moved up or down and put in groups (see below).
JavaScript-based field JavaScript-based fields are filled by a script: the script provides a value. Note that the last value attribution to a variable is the one used as the result of the expression. There is a number of ways to add a Javascript based field. Via the Steps pane 1. Make sure there is no data selection in the Data Viewer. 2. Right-click on an Extract step on the Steps pane and select Add a Step > Add Extract Field. (To add a new Extract step, select Add a Step > Add Extraction first.) 3.
Property-based field A property-based field is filled with the value of a property. Objects such as the sourceRecord and steps have a number of predefined properties. (For an explanation of the objects to which the properties belong, see "DataMapper Scripts API" on page 396.) Custom properties can be added via the Preprocessor step; see "Preprocessor step" on page 274. A property-based field cannot be added directly.
Renaming and reordering fields in an extraction step The names of fields, as well as the order of fields in an extraction step, can be changed via the properties of the Extract step that they belong to. 1. Select the Extract step that contains the fields that you want to rename. To do this you could click on one of those fields in the Data Model, or on the step in the Steps pane. 2. On the Step properties pane, under Field Definition, click the Order and rename fields button. 3.
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 304 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 260. 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 260).
Page 299
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 311 l "Integer" on page 311 l "Float" on page 310 l "Currency" on the facing page l "Date" on page 307 l "Object" on page 312 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.
l JavaScript Expression: Set the desired value to either true or false . Example: record.fields["isCanadian"] = true; 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.
l Extraction: l In the Data Model, select a field. l On the Step properties pane, under Field Definition set the Type to Currency. Under Data Format, specify how the value is formatted in the data source (see Extract Step; for the default format settings, see "Data source settings" on page 250). The field value will be extracted and treated as a Float. l l JavaScript Expression: Set the desired value to any Float value. Example: record.fields["PreciseTaxSubtotal"] = 27.
Extracting dates To extract data and have that data interpreted as a Date, set the type of the respective field to Date: 1. Select the field in the data model. 2. On the Step properties pane, under Field Definition, specify the Type as Date. 3. Make sure that the date in the data source is formatted in a way that matches the expectations of the DataMapper. If the date doesn't match the format that the DataMapper expects, it cannot be interpreted as a date.
l l l mm: Numeric representation of the month (i.e. 1, 09, 12) D: Short version of the weekday name ( i.e. Mon, Wed). These values are based on the current regional settings. DD: Long version of the weekday name (i.e. Monday, Wednesday). These values are based on the current regional settings. l dd: Numeric representation of the day of the month (i.e.
Value in raw data Mask to use Tuesday, June 25, 2013 @ 7h31PM DD, MM dd, yyyy @ hh\hnnap Entering a date using JavaScript In several places in the DataMapper, Date values can be set through a JavaScript. For example: l l In a field in the Data Model. To do this, go to the Steps pane and select an Extract step. Then, on the Step properties pane, under Field Definition click the Add JavaScript Field button (next to the Field List drop-down). Type the JavaScript in the Expression field.
Defining Float values l Preprocessor: l l l In the Step properties pane, under Properties, add or select a field. Specify the Type as Float and set a default value as a number with decimal points, followed by a semicolon; for example 546513.879;. Extraction: l In the Data Model, select a field. On the Step properties pane, under Field Definition set the Type to Float. The field value will be extracted and treated as a Float. l l JavaScript Expression: Set the desired value to any Float value.
Defining Integer values l l Preprocessor: l In the Step properties pane, under Properties, add or select a field. l Specify the Type as Integer and set a default value as a number, such as 42. Extraction: l In the Data Model, select a field. On the Step properties pane, under Field Definition set the Type to Integer. The field value will be extracted and treated as an integer. l l JavaScript Expression: Set the desired value to any Integer value. Example: record.
Defining Object values l Preprocessor: l In the Step properties pane, under Properties, add or select a field. l Specify the Type as Object and set a default value as a semi-colon. String Strings contain textual data. Strings do not have any specific meaning, which is to say that their contents are never interpreted in any way. Defining String values l Preprocessor: l l l In the Step properties pane, under Properties, add or select a field.
l l It is possible to put more than one string, as well as variables containing strings, by concatenating them with the + operator. For example, "Hello " + sourceRecord.property.FirstName + ", nice to meet you!". Adding more data to an existing string variable or field is possible using a combination of concatenation and assignment.
version="1" xmlns="http://www.objectiflune.com/connectschemas/DataModelConfig" 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.
version="1" xmlns="http://www.objectiflune.com/connectschemas/DataModelConfig" 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.
Keyboard 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 1009. Although some of the keyboard shortcuts are the same, this isn't a complete list of Windows keyboard shortcuts. Please refer to Windows documentation for a complete list of Windows keyboard shortcuts.
Key combination Function displays the corresponding menu.) The menu can then be browsed using the Enter key, arrow up and arrow down buttons.
Key combination Function Ctrl + Shift + S Save all Ctrl + Shift + W or Ctrl + Shift + F4 Close all Ctrl + F5 Revert Ctrl + F7 Next view Ctrl + Shift + F7 Previous view Ctrl + F8 Next perspective Ctrl + Shift + F8 Previous perspective Ctrl + F10 Save as Ctrl + F12 Send to Workflow / Package files F4 Ignore step/Reactivate step F6 Add an Extract step F7 Add a Goto step F8 Add a Condition step F9 Add a Repeat step Page 319
Key combination Function F10 Add an Extract field F11 Add an Action step F12 Add a Multiple Conditions step Alt + F12 Add a Case step (under a Multiple Conditions step) Home Go to the first step in the workflow End Go to the last step in the workflow Alt + V Validate records Shift + F10 or Ctrl + Shift + F10 Open context menu Viewer pane The following key combinations activate a function in the Viewer.
Key combination Function Ctrl + + Zoom in Ctrl + Shift + E Switch to Editor 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
Edit Script and Expression windows The following key combinations have a special function in the Expression and in the Edit Script windows (expanded view). 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.
File Menu l l l l l l l l l l New...: Opens the dialog to create a new data mapping configuration; see "Creating a new data mapping configuration" on page 227. Open: Opens a standard File Open dialog. This dialog can be used to open Templates and data mapping configurations. 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.
Edit Menu l Undo: Undoes the previous action. l Redo: Redoes the last action that was undone. 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.
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 l Reset Perspective: Resets all toolbars and panes to the initial configuration of the module. Preferences: Click to open the Preferences dialog. 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 PlanetPress Connect Designer: Displays the software's About dialog.
Filter To find a certain table, group or field in a large Data Model, start typing characters in the Filter box. This immediately narrows down the list of displayed items to all tables, groups and fields whose name contains the characters that were typed. Note that the filtering is case-insensitive. Data Model toolbar buttons : Import Data Model: Click to browse to a file that contains a Data Model. This may l be: l A Data Model file (*.OL-datamodel). l A JSON file (*.json; see the note below).
l l l l : Synchronize Fields and Structure: Click to synchronize the Data Model fields and structure in the currently loaded template and data mapping configuration. If you click this button when working on the data mapping configuration, the Data Model gets updated to the one in the template. If you click it when working on the template, the Data Model gets updated to the one in the data mapping configuration. : Show the ExtraData field. Note that this field is not meant to be filled via an extraction.
Note Rename, Delete and Set Type are only available for Data Model fields or detail tables that are not filled via an extraction. Fields and detail tables that are filled via an Extract step are to be changed (renamed, deleted etc.) via the properties of that Extract step; see: "Editing fields" on page 293 and "Renaming a detail table" on page 331. l l Rename: Click to rename the selected table, field or group. Enter the new name and click OK to rename.
l l l l l l l l The column on the left displays the name of the field. The column on the right displays the current value of the extracted field based on the record shown in the Data Viewer, if an Extract step has an extraction for this field (see "Extracting data" on page 254). The icon to the left of the name indicates the data type of the field (see "Data types" on page 304). A field name with an asterisk to the right indicates that this field is required.
l l l l Previous Record: Go to the previous record in the data sample. This button is disabled if the first record is shown. Current Record: Displays the current record or table entry. Type a record number and press the Enter key to display that record. The number has to be within the number of available records in the data sample. Next Record: Go to the next record in the data sample. This button is disabled if the last record is shown. Last Record: Go to the last record in the data sample.
3. Click somewhere else on the Step Properties pane to update the Data Model. You will see the new name appear. 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).
and you will have to rename the detail table created in each Extract step to pull the detail tables apart (see "Renaming a detail table" on page 331).
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).
Example An XML source file lists the services of a multi-service provider: Internet, Cable, Home Phone, Mobile. Each service in turn lists a number of "charges", being service prices and rebates, and 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 determined in the Data Source settings (see "Record boundaries" on page 253).
l l l 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. Lock/Unlock extracted data : Click to lock existing extraction selections so they cannot be moved or resized.
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 250.
l l Ignore unparseable lines: Ignores any line that does not correspond to the settings above. Skip empty lines: Ignore any line that has no content. Note that spaces are considered content. l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the selected column has numbers, it will be sorted as a text.
average character in the font. l l l l Line spacing: Determines the spacing between lines of text. The default value is 1, meaning the space between lines must be equal to at least the average character height. Paragraph spacing: Determines the spacing between paragraphs. The default value is 1.5, meaning the space between paragraphs must be equal to at least 1.5 times the average character height to start a new paragraph. Magic number: Determines the tolerance factor for all of the above values.
l l l Encoding: Defines what encoding is used to read the Data Source ( US-ASCII, ISO8859-1, UTF-8, UTF-16, UTF-16BE or UTF-16LE ). Sort on: Allows to select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the sorting column has numbers, it will be sorted as a text. With a Custom Query, this option is not available. Skip empty lines: Ignore any row that has no content, e.g. only nulls or empty strings.
l On text: Triggers a new page in the Data Sample when a specific string is found in a certain location. l Word to find: Compares the text value with the value in the data source. l Match case: Activates a case sensitive text comparison. l l l Location: Choose Selected area or Entire width to use the value of the current data selection as the text value. Left/Right: Use the spin buttons to set the start and stop columns to the current data selection (Selected area) in the record.
l Any other curly brackets that are not part of the JavaScript code must be escaped with a backslash. Single line comments (//...) in the code are not supported. Note that since the XPath is a string, the return value of the JavaScript statement will be interpreted as a string. l Note Currently, XPaths that select elements based on an attribute, attribute value, node value, node counter or node index are not supported.
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. Field name: Displays the fields in the top line. The boundaries are set on the selected field name.
l On text: Defines a boundary on a specific text comparison. l l 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 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. For example, if you know that your documents always have four pages delimited by the FF character, you can set the boundaries after every four delimiters. On text: Defines a boundary on a specific text comparison.
l l l Use selected text button: copies the text in the current selection as the one to compare to it. Match case: Makes the text comparison case sensitive. On script: Defines the boundaries using a custom JavaScript. For more information see "Setting boundaries using JavaScript" on page 401. XML file boundaries The delimiter for an XML file is a node. The Boundaries determine how many of those nodes go in one record.
A number of buttons let you manage the Data Samples. In addition to using the buttons listed below, you can right-click a file to bring up the context menu, which offers the same options plus the Copy and Paste options. Tip Data samples can be copied and pasted to and from the Settings pane using Windows File Explorer. l l l l l Add : Add a new Data Sample from an external data source. The new Data Sample will need to be of the same data type as the current one.
l l Current Locale Settings: Shows dates and times as formatted by Windows using the current Locale of the system on which Connect runs. All values are shown as a date including a time. ISO 8601 (UTC): Uses the ISO 8601 (UTC) format to display dates and times. All values are shown as a date including a time, taking the time zone into account. Note that when no time was specified with a date in the original file, the default time (12.00 AM) is used and converted; this may influence the displayed date.
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).
Using variables and properties in an SQL query When you use variables and properties in an SQL query, the selection will be dynamically adjusted each time the data mapping configuration is actually used in a Workflow process. To create a dynamic SQL query: l l The query must start with = Any variable or property must be enclosed in curly brackets: { ... }. This effectively inserts a JavaScript statement in the query. Note that all other curly brackets must be escaped with a backslash.
Example = SELECT {automation.variables.FieldList} FROM {automation.jobInfo.JobInfo9} If the Workflow variable defined as FieldList contains the value "id,name" and Job Info 9 contains the value "MyTable", then this custom query, once parsed, yields the following SQL statement: SELECT id,name FROM MyTable which is then executed. Steps pane The Steps tab displays the data mapping workflow: the process that prepares and extracts data.
You can also click on the Preprocessor step to select all the steps in the workflow to show a complete map of all the extracted data. Window controls The following controls appear at the top of the Steps pane: l Zoom In (CTRL +) l Zoom Out (CTRL -) : Click to zoom in by increments of 10% : Click to zoom out by increments of 10% Contextual menu You can access the contextual menu using a right-click anywhere inside the Steps pane. l Add a Step: Adds a step to the process.
Step properties pane The Step Properties pane is used to adjust the properties of each Step in the process (see "Steps" on page 274). The pane is divided in a few subsections depending on the Step and the data type. It always contains a subsection to name and document the selected Step. Other subsections allow you to edit or delete fields that belong to the Step (see "Fields" on page 291) or change the expected data format (see "Data Format" on page 366), for example.
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. Fixed Automation Properties The Fixed automation properties subsection lists all the fixed properties available from PlanetPress Workflow. These properties are equivalent to data available within the PlanetPress Workflow process.
PlanetPress Workflow. To access this property inside of any JavaScript code within the data mapping configuration, use automation.properties.ProcessName. In scripts, fixed automation properties are retrieved via the automation object (see "Objects" on page 406), for example automation.jobInfo.JobInfo9 or automation.properties.OriginalFilename.
{MyLocalVar} use only MyLocalVar, and for %{global.MyGlobalVar} use MyGlobalVar. If a global and a local variable have the same name ( %{myvar} and %{global.myvar} ), the local variable's value is used and the global one is ignored. To access a Workflow variable inside of any JavaScript code within the data mapping configuration, use automation.variables.variablename . l l Type: The data type of the property. For more information see "Data types" on page 304.
Preprocessor definition l Expression: Enter the JavaScript code to be performed on the data file. See "DataMapper Scripts API" on page 396. Extract step properties The Extract step takes information from the data source and places it in the record set that is the result of the extraction workflow. For more information see "Extract step" on page 276 and "Extracting data" on page 254. Description This subsection is collapsed by default in the interface, to give more screen space to other important parts.
to make further settings for that field. Tip To change the name of a field quickly, right-click it in the Data Model and select Rename. l l 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. Mode: Determines the origin of the data. Fields always belong to an Extract step, but they don't necessarily contain extracted data.
l Properties: The value of the property selected below will be the value of the selected field. l l l Property: This drop-down lists all the currently defined properties (including system properties). Custom properties can be defined in the Preprocessor step; see "Preprocessor step" on page 274. For an explanation of the objects to which the properties belong, see "DataMapper Scripts API" on page 396.
A Post function script operates directly on the extracted data, and its results replace the extracted data. For example, the Post function script replace("-", ""); would replace the first dash character that occurs inside the extracted string. l Use JavaScript Editor: Click to display the Script Editor dialog. l Trim: Select to trim empty characters at the beginning or the end of the field.
the data format that the DataMapper expects matches the actual format of the data in the data source; see "Data Format" on the facing page. l Split: l l l Split lines: Separate a multi-line selection into individual fields . Join lines: Join the lines in the selection with the Concatenation string defined below. Concatenation string: The (HTML) string used to concatenate lines when they are joined.
l XPath: The path to the XML field that is extracted. l Use selection: Click to use the value of the current data selection for the extraction. Note If the selection contains multiple lines, only the first line is selected. l Post Function: Enter a JavaScript expression to be run after the extraction. For example replace("-","") would replace a single dash character inside the extracted string. l l Use JavaScript Editor: Click to display the Script Editor dialog.
l l Date Language : Set the date language for a date value (ex: If English is selected, the term May will be identified as the month of May). Treat empty as 0 : A numerical empty value is treated as a 0 value. Order and rename fields dialog The Order and rename fields dialog displays the extracted fields in the currently selected Extract step. To open it, first select an Extract step on the Steps pane.
Note The order of fields in an extraction step isn't necessarily the same as the order of those fields in the Data Model; see "Ordering and grouping fields in the Data Model" on page 288. Action step properties The Action step can run multiple specific actions one after the other in order; see "Action step" on page 283 for more information. The properties of an Action step become visible in the Step properties pane when the Action step is selected on the Steps pane.
fields are stored as usual. If no fields were extracted prior to encountering the Action step, then no trace of the record is saved in the database at run time. l Stop data mapping: the extraction workflow stops processing the data. If fields of the current record were already extracted prior to encountering the Action step, then those fields are stored as usual, but the rest of the data is skipped.
l JavaScript : The result of the JavaScript Expression written below the drop-down will be the value of the extracted field. If the expression contains multiple lines, the last value attribution (variable = "value";) will be the value. See "DataMapper Scripts API" on page 396. 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 399 and "DataMapper Scripts API" on page 396).
CSV and Database Files l Property: Displays a list of record properties set in the Preprocessor step (see "Preprocessor step" on page 274). l Type: Displays the type of the 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 Use selection: Click to use the value of the current data selection for the extraction. Note If the selection contains multiple lines, only the first line is selected. l Data Format: Data format settings tell the DataMapper how certain types of data are formatted in the data source. 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.
Note If the selection contains multiple lines, only the first line is selected. l l Trim: Select to trim empty characters at the beginning or the end of the field JavaScript : The result of the JavaScript Expression written below the drop-down will be the value of the extracted field. If the expression contains multiple lines, the last value attribution (variable = "value";) will be the value. See "DataMapper Scripts API" on page 396. l l l l Expression: The JavaScript expression to run.
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). Treat empty as 0 : A numerical empty value is treated as a 0 value. Run JavaScript Running a JavaScript expression offers many possibilities.
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. Repeat Definition l Repeat type: l l l l While statement is true: The loop executes while the statement below is true. The statement is evaluated before the loop so the loop may not run at all. Until statement is true: The loop executes until the statement below is true.
[@lastname="{automation.jobInfo.JobInfo1}"]. In order to use JavaScript: l The XPath must start with = l The JavaScript statement must be enclosed in curly brackets: { ... } l l All other curly brackets that are not part of the JavaScript code must be escaped with a backslash. Single line comments (//...) in the code are not supported. Note that since the XPath is a string, the return value of the JavaScript statement will be interpreted as a string.
Text and PDF Files Note The Repeat Step expects lines of text in a PDF file to be horizontal (regardless of the orientation of the page). Vertical text will cause an error. l Based On: l Position: The data in the specified position for the comparison. l l l l l 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.
l l l l l Data Property: The value of a data-level property set in the Preprocessor step (see "Preprocessor step" on page 274). 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 "Preprocessor step" on page 274).
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 l l is equal to: The two specified value are identical for the condition to be True. contains: The first specified value contains the second one for the condition to be True. is less than: The first specified value is smaller, numerically, than the second value for the condition to be True. is greater than: The first specified value is larger, numerically, than the second value for the condition to be True. is empty: The first specified value is empty.
l l l l l Data Property: The value of a data-level property set in the Preprocessor step. Record Property: One of the local variables that you can create and that are reset for each document as opposed to data variables that are global because they are initialized only once at the beginning of each job. Automation Property: The current value of a Document-level property set in the Preprocessor step.
Description This subsection is collapsed by default in the interface, to give more screen space to other important parts. Name: The name of the step. This name will be displayed on top of the step's icon in the Steps pane. Comments: The text entered here will be displayed in the tooltip that appears when hovering over the step in the Steps pane.
l Based On: 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 l l l l Top offset: The vertical offset from the current pointer location in the Data Sample (Viewer). 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.
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 "Preprocessor step" on page 274). Extractor Property: The value of an internal extractor variable: l l l Counter: The value of the current counter iteration in a Repeat step.
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. Condition Left operand, Right operand The Left and right operand can be Based on: 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 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. See also: "DataMapper Scripts API" on page 396. Use JavaScript Editor: Click to display the Edit Script dialog (see "Using scripts in the DataMapper" on page 399). 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 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.
Text file l Target Type: Defines the type of jump. l Line: Jumps a certain number of lines or to a specific line. l l l l Current Position: The Goto begins at the current cursor position. l Top of record: The Goto begins at line 1 of the source record. Move by: Enter the number of lines or pages to jump. Page: Jumps between pages or to a specific page.
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 Left: The starting column, inclusively. l Right: The end column, inclusively. l l Use selection: Click while a selection is made in the Data Viewer to automatically set the left and right values to the left and right edges of the selection. Next occurrence of: Jumps to the next occurrence of specific text or a text pattern, either anywhere on the line or in specific columns.
XML File l Destination (XML files): Defines what type of jump to make: l l l l l Sibling element: Jumps the number of siblings (nodes at the same level) defined in the Move byoption. Sibling element with same name: Jumps the number of same name siblings (nodes at the same level of which the node is the same name) defined in the Move byoption. Element, from top of record: Jumps to the specified node. The XPATH in the Absolute XPATHoption starts from the root node defined by /.
Postprocessor The Postprocessor subsection defines what postprocessors run on the Data Sample at the end of the data mapping workflow. Each Postprocessor runs in turn, using the result of the previous one as an input. l Name: The name to identify the Postprocessor. l Type: The type of Postprocessor. Currently there is a single type available. l JavaScript: Runs a JavaScript Expression to modify the Data Sample. See "DataMapper Scripts API" on page 396.
Open: Displays the Open dialog to open an existing data mapping configuration. l l Save: Saves the current data mapping configuration. If the configuration has never been saved, the Save As... dialog is displayed. Step manipulation Note All steps except the Action step require an active data selection in the Data Viewer (see "Selecting data" on page 258 and "The Data Viewer" on page 338). l l l l l l l Add Extract Step: Adds an Extract Step with one or more extract fields.
l 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 after the currently selected step.
To go back from the Welcome Screen to the template or data mapping configuration that you were working on: l Close the Welcome Screen by clicking the cross next to the text 'Welcome' at the top. Contents l Resources l l l Documentation: Opens this documentation. Training: Opens Learn: the Objectif Lune e-Learning Center, with its tutorials, forum, and how-tos. l Support: Opens the support page in the PlanetPress Connect website.
l New DataMapper Configuration: Lets you build a data mapping configuration from a file or with a wizard; see "Data mapping configurations" on page 226. DataMapper Scripts API This page describes the different features available in scripts created inside DataMapper. See "Using scripts in the DataMapper" on page 399.
Name Description Available in scripts of type "record" on page 427 The current record in the main data set. Extract, Condition, Repeat and Multiple Conditions steps "region" on page 428 An object that defines a subsection of the input data. Boundaries "sourceRecord" on page 431 An object containing properties specific to the current source record being processed.
Name Description page 438 alphanumeric, lower case characters and four hyphens (format: 84-4-4-12). Example: 123e4567-e89b-12d3-a456-426655440000. "createHTTPRequest ()" on page 438 Creates a new HTTP Request Object. createTmpFile() Creates a file with a unique name in the temporary work folder and returns a file object. deleteFile() Deletes a file. execute() Calls an external program and waits for it to end. newByteArray() Returns a new byte array. newCharArray() Returns a character array.
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 401). The script determines where a new record starts. Scripts can also be used in different steps in the extraction workflow.
Keyboard shortcuts for the script editor are listed in the following topic: "Keyboard shortcuts" on page 1009. Syntax rules In the DataMapper, all scripts must be written in JavaScript, following JavaScript syntax rules. For example, each statement should end with ; and the keywords that can be used, such as var to declare a variable, are JavaScript keywords. There are countless tutorials available on the Internet to familiarize yourself with the JavaScript syntax.
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 253), you are instructing the DataMapper to read the source file sequentially and to trigger an event each and every time it hits a delimiter. (What a delimiter is, depends on the source data and the settings for that data; see "Input data settings (Delimiters)" on page 251).
l Compare the contents of one region with another. l Etc. To access this data in the script, use the get() function of the boundaries object. This function expects different parameters depending on the type of source file; see "Example" on page 410. Getting access to other data Data that is not passed with the event, but that is necessary to define the record boundaries, can be stored in the boundaries object using the setVariable function (see "boundaries" on page 408 and "Example" on page 413).
Note The first line is just the header with the names of the CSV columns. The data is already sorted per year, per artist, and per album. Your goal is to examine two values in each CSV record and to act when either changes. The DataMapper GUI allows you to specify a On Change trigger, but you can only specify a single field. So for instance, if you were to set the record boundary when the "Released" field changes, you'd get the first four lines together inside a single record.
simply the column name. The region is passed as a parameter to the get() method, which reads its contents and converts it into an array of strings (because any region, even a CSV field, may contain several lines). l l l To "remember" the values that were processed the last time the event was triggered, we use variables that remain available in between events. Note that these variables are specific to the Boundary context and not available in any other scripting context in the DataMapper.
The purpose of the script, again, is to set the record boundary when EITHER the year OR the artist changes. The script would look like this: /* Read the values of both columns we want to check */ var zeBand = boundaries.get(region.createRegion(1,1,30,1)); var zeYear = boundaries.get(region.createRegion(61,1,65,1)); /* Check that at least one of our variables holding previous values have been initialized already, before attempting to compare the values */ if (boundaries.
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 properties Returns a ScriptableAutomation object containing additional information (file name, process name and task ID) from PlanetPress Workflow. variables Returns a ScriptableAutomation object containing the list of local and global variables defined by the user in PlanetPress Workflow. Note that there is no way to distinguish local variables from global ones (local variables take precedence over global variables).
automation.properties.OriginalFilename; To access Workflow variables (declared in the "Preprocessor step" on page 274 properties): automation.variables.Same_as_workflow; boundaries Returns a boundaries object encapsulating properties and methods allowing to define the boundaries of each document in the job. This object is available when triggering document boundaries On script. Properties The following table lists the properties of the boundaries object.
Method Description Script type getVariable () Retrieves a value of a variable stored in the boundaries object. Boundaries set() Sets a new record boundary. (See: "Record boundaries" on page 253.) 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.
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 430. When used to search through a Text file, the find() method returns a different region object (see "region" on page 428) 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.
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.
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.
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. Example This script examines a specific region and stores its contents in a variable in the boundaries. var addressRegion = region.
Property Description Return type the preprocessor step (see Preprocessor Step Properties for details). 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 "Examples" on page 416 Extracts the text value from a rectangular region. Extract, Condition, Repeat, and Action steps All "extractMeta ()" on page 421 Extracts the value of a metadata field.
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. Coordinates are expressed as characters (horizontally) or lines (vertically). left Number that represents the distance, measured in characters, from the left edge of the page to the left edge of the rectangular region.
is a line break in HTML and Designer templates are actually HTML files. l 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.extract(1,22,8,1,"
"); means that the left position of the extracted information is located at character 1, the right position at character 22, the offset position is 8 (since the line number is 9) and the regionHeight is 1 (to select only 1 line).
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 413.
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
l l For a PDF file, the range() method contains the physical coordinates of the region: x1 (left), y1 (top), x2 (right), y2 (bottom), expressed in millimeters. For a CSV file, the range contains the name of the column that defines the region. sourceRecord Returns a sourceRecord object containing properties specific to the current source record being processed. Properties sourceRecord.properties.
1. Enter the property's 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.
Method Description File type currentPageWidth The width of the current page in millimeters. PDF 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.
Example In this example, an extraction area is assigned to the variable curLine each time the current page value has changed. curPage = steps.currentPage; for(i=0;i<100;i++) { if(steps.currentPage > curPage) { let curLine = data.extract(51, 88, 0, 1, "").trim(); curPage++; } } moveTo() Moves the position of the pointer in the source data file. This is a method of the steps object (see "steps" on page 432).
With the scope set to 2, verticalPosition is not used. The position is moved to the next line after the current position that contains any text. Example The following line of code moves the current position in a text file 14 lines down from the current vertical position (steps.currentPosition) of the pointer in the data, as long as it is on the same page. if(steps.currentPage > curPage) { steps.moveTo(0, steps.
String that defines a node in the XML file. Tip The XML elements drop-down (on the Settings pane, under Input Data) lists xPaths defining nodes in the current XML file. moveTo(row) Moves the current position in a CSV file to the given row number. row Number that represents the index of the row, relative to the top of the record. moveToNext() Moves the position of the pointer in the source data file to the next line, row or node.
steps.moveToNext(2); XML scope Number that may be set to: l l 0 or steps.MOVENODE: the current position is set to the next parent node in the XML hierarchy. 1 or steps.MOVESIBLING: the current position is set to the next sibling node in the XML hierarchy. moveToNext(left, right) Moves the current position in a PDF file to the next line that contains any text, the search for text being contained within the left and right parameters, expressed in millimeters.
Example This script copies the file test.txt from c:\Content into the c:\out folder. copyFile("c:\Content\test.txt","c:\out\") createGUID() This function returns a unique 36-character string consisting of 32 alphanumeric, lower case characters and four hyphens. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12 characters). Example: 123e4567-e89b-12d3-a456-426655440000.
Supported properties l response l status l statusText l timeout (ms). Default: 1 minute. Supported methods create() l l open(String method, String url, String user, String password) open(String verb, String url, String userName, String password, String[] headers, String[] headervalues, String requestBody) l send() l send(String requestBody) Creates a new instance of ScriptableHTTPRequest. Opens a HTTP request. Note If you don't use a user name and password, pass empty strings: request.
getResponseBody() Returns the full response body of the last HTTP request. setRequestBody(String requestBody) Sets the HTTP request body (for POST and PUT). getPassword() Gets the password for HTPP basic authentication setPassword(String password) Sets the password for HTPP basic authentication getTimeout() Gets the time to wait for the server's response setTimeout(int timeout) Sets the time (in ms.) to wait for the server's response.
try{ // Open a reader var reader = openTextReader(data.filename); // Create a temporary file var tmpFile = createTmpFile(); // 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.
Examples 1. Deleting a file in a local folder: deleteFile("c:\Content\test.txt"); 2. Deleting the sample data file used in the DataMapper: deleteFile(data.filename); execute() Function that calls an external program and waits for it to end. execute(command) Calls an external program and waits for it to end. command String that specifies the path and file name of the program to execute. newByteArray() Function that returns a new byte array.
newDoubleArray() Function that returns a new double array. newDoubleArray(size) Returns a new Double array of the specified number of elements. size Integer that represents the number of elements in the new array. newFloatArray() Function that returns a new float array. newFloatArray(size) Returns a new Float array of the specified number of elements. size Integer that represents the number of elements in the new array. newIntArray() Function that returns a new array of Integers.
Integer that represents the number of elements in the new array. newStringArray() Function that returns a new string array. newStringArray(size) Returns a new String array of the specified number of elements. size Integer that represents the number of elements in the new array. openBinaryReader() Function that opens a file as a binary file for reading purposes. The function returns a DataInputStream (see DataInputStream).
end. openTextReader(filename,encoding) filename String that represents the name of the file to open. encoding String that specifies the encoding of the file to read (UTF-8, ISO-8859-1, etc.). Example In the following example, the openTextReader() function is used to open the actual data sample file in the DataMapper for reading. var var var var fileIn = openTextReader(data.filename); tmp = createTmpFile(); fileOut = openTextWriter(tmp.getPath()); line; while((line = fileIn.readLine())!=null){ fileOut.
Property/method Description close() Closes the stream and releases resources. open(inStream, inEncoding) Creates a reader from an input stream. Parameters: open(inFileName, inEncoding) parseCharset (inEncoding) l inStream: the input stream to read l inEncoding: the encoding to use when reading the file Creates a reader on the specified file. Parameters: l inFilename: the path of the file to read l inEncoding: the encoding to use when reading the file Returns a character set (Charset).
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).
Property/method Description close() Close the stream. newLine() Creates a new line in the file. open(filename) Creates a new writer on a file to write at the beginning of the file. Parameters: l open(inFilename, inEncoding, append) filename: the path of the file to open Creates a new writer on a file.
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.
page 451. 2. Fill the template Add text, images and other elements to the template and style them. See "Content elements" on page 628 and "Styling and formatting" on page 741. 3. Personalize the content Personalize the content using variable data. See "Personalizing content" on page 786. 4. Generate output Adjust the settings, test the template and generate output: letters, emails, and/or web pages. See "Generating output" on page 1408.
l "Print" on page 474. This topic helps you design and fill sections in the Print context. l "Email" on page 515. This topics helps you design an email template. l "Web" on page 540. This topic helps you design a web page. "Sections" on page 470. Sections in one context are designed for the same output channel. "Content elements" on page 628. Elements make up the biggest part of the content of each design. "Snippets" on page 737.
There are Wizards for the three types of output channels, or contexts as they are called in the Designer: Print, Email and Web. See: l "Creating an Email template with a Wizard" on page 520 l "Creating a Print template with a Wizard" on page 477 l "Creating a Web template with a Wizard" on page 541 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.
Warning A template created in an older version of the software can be opened in a newer version. However, opening and saving it in a newer version of the software will convert the template to the newest file format. The converted template can't be opened in older versions of the software. Opening a package file Templates can also be stored in a package file (see "Creating package files" on page 457). To open a package file, switch the file type to Package files (*.OL-package) in the Open File dialog.
Saving older templates Saving a template in a newer version of the software will convert the template to the newest file format. This makes it unreadable to older versions of the software. The warning message that is displayed in this case can be disabled. To re-enable this message (and all other warning dialogs), go to Window > Preferences > General, and click the Reset All Warning Dialogs button at the bottom.
Backup files have the same name as the original template with two underscores and a progressive number (without leading zeros) at the end: originalname__1.OL-template, originalname__2.OL-template, etc. Note The Auto Save function does not cause backup files to be created. File properties On the menu, select File > Properties to view and complement the file properties. See "File Properties dialog" on page 936. The file properties can also be used in scripts; see "template" on page 1379.
To create a package file, select File >Send to Workflowand choose File in the Destination box. For the other options, see "Sending files to Workflow" on the next page. The package file has the extension .OL-package and can be opened in the Designer (see "Opening a package file" on page 453). Exporting a template report A template report can be used for archiving purposes or to provide information about the template to people who do not have access to Connect.
To test a template first, select Context > Preflight. Preflights execute the template without actually producing output and it displays any issues once it's done (see also: "Testing scripts" on page 862). Sending files to Workflow Workflow can generate output from a template in automated processes. For this, the template has to be sent to Workflow. Alternatively you may create a Package file (see "Creating package files" below) and import that into Workflow.
Creating a Web template with a Wizard With the Designer you can design Web templates and output them through Workflow or as an attachment to an email when generating Email output. Capture On The Go templates are a special kind of Web templates; see "Capture OnTheGo template wizards" on page 579. A Web Template Wizard helps you create a Web page that looks good on virtually any browser, device and screen size.
l Jumbotron l Thank You If you don't know what template to choose, see "Web Template Wizards" on page 461 further down in this topic, where the characteristics of each kind of template are described. 3. Click Next and make adjustments to the settings. The wizard remembers the settings that were last used for a Foundation Web template. l Section: l l l Description: Enter the description of the page. This is the contents of a HTML tag.
l l l l A Web context with one web page template (also called a section) in it. The web page contains a Header, a Section and a Footer element with dummy text, and depending on the type of web page, a navigation bar, button and/or Form elements. Resources related to the Foundation framework (see "Web Template Wizards" on the next page): style sheets and JavaScript files. The style sheets can be found in the Stylesheets folder on the Resources pane.
Web Template Wizards Foundation With the exception of the most basic one, all Web Template Wizards in the Designer make use of the Zurb Foundation front-end framework. A front-end framework is a collection of HTML, CSS, and JavaScript files to build upon. Foundation is a responsive framework: it uses CSS media queries and a mobile-first approach, so that websites built upon Foundation look good and function well on multiple devices including desktop and laptop computers, tablets, and mobile phones.
A Capture OnTheGo Form is actually just a Web Form, that you could add without a wizard, but the COTG Template Wizards include the appropriate JavaScript files for the Capture OnTheGo app, and styles to create user-friendly, responsive forms. They are built upon the Foundation framework. Foundation With the exception of the most basic one, all Web Template Wizards in the Designer make use of the Zurb Foundation front-end framework.
2. Select a template. There are 8 types of Web Template Wizards: l l l l l l l l Blank. The Blank COTG Template has some basic design and the appropriate form, but no actual form or COTG elements. Bill of Lading. The Bill of Lading Template is a transactional template that includes a detail table with a checkmark on each line, along with Signature and Date COTG elements. Use this wizard as a way to quickly start any new Zurb Foundation based form for Capture OnTheGo. Event Registration.
Do the same for the background color of the navigation bar at the top and for the buttons on the Form. 4. Click Next to go to the next settings page if there is one. 5. Click Finish to create the template. The Wizard creates: l l l A Web context with one web page template (also called a section) in it. The web page contains an 'off-canvas' Div element, Header, a Section and a Footer element with dummy text, and depending on the type of web page, a navigation bar, button and/or Form elements.
Filling a COTG template Before inserting elements in a COTG Form, have the design ready; see "Designing a COTG Template" on page 575. In a Capture OnTheGo form, you can use special Capture OnTheGo Form elements, such as a Signature and a Barcode Scanner element. For a description of all COTG elements, see: "COTG Elements" on page 705. To learn how to use them, see "Using COTG Elements" on page 593.
Tip Click the Edges button on the toolbar t emporarily adds a frame to certain elements on the Design tab. These will not .Print or output. Tip If you have started creating your Capture OnTheGo template using a COTG Template Wizard, you can find ready-made elements in the Snippets folder on the Resources pane. 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.
When refering to them, normally you would simply use the path directly with the file name. The structure within those folders is maintained, so if you create a "signatures" folder within the "Images" folder, you need to use that structure, for example in HTML: . In scripts, you can refer to them in the same way, for example: results.loadhtml("snippets/en/navbar.
Web resources Web resources are simply accessed using a full URL. This URL needs to be publicly accessible: if you type in that URL in a browser on the server, it needs to be visible. 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).
with an Email Template Wizard; see "Creating an Email template with a Wizard" on page 520. 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 1438, "Generating Print output" on page 1410 and "Generating Web output" on page 1448. 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.
Warning If you don't have a backup of the template, the only way to recover a deleted section, is to click Undo on the Edit menu, until the deleted section is restored. After closing and reopening the template it is no longer possible to restore the deleted context this way. In the Saving Preferences you can set whether a backup file should be created when you save the template; see "Save preferences" on page 850. Sections Sections are parts of one of the contexts in a template: Print, Emailor Web.
Editing a section To open a section, expand the Contexts folder on the Resources pane, expand the respective context (Print, Emailor Web) and double-click a section to open it. Each section can contain text, images and many other elements (see "Content elements" on page 628), including variable data and other dynamic elements (see "Personalizing content" on page 786). To preview a section, open the Preview tab in the Workspace (see "Workspace" on page 1049). Copying a section To copy a section: 1.
Tip The easiest way to copy a section to another template, is to use the Import Resources dialog in the other template. See: "Import Resources dialog" on page 942. 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.
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.
Arranging sections Changing the order of the sections in a context can have an effect on how they are outputted; see: "Print sections" on page 487, "Email templates" on page 526 and "Web pages" on page 547. To rearrange sections in a context: 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.
l PCL 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.
See "Pages" on page 497 for an overview of settings and elements that are specific for pages. 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.
talker. This feature is only available with Box and Div elements in Print sections. For more information about this feature see "Copy Fit" on page 757. 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 (called 'sections') can be added later. Print template wizards can be found in the Welcome screen and on the File menu.
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. Basic Print template wizards There are two 'basic' Print Template wizards: one for a formal letter, and one for a postcard. 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.
Formal letter The Formal Letter Wizard first lets you select the page settings, see "Page settings: size, margins and bleed" on page 498. These settings are fairly self-explanatory, except perhaps these: 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.
l Selectors for variable data, for example: @Recipient@. You will want to replace these by the names of fields in your data. See "Variable Data" on page 801. The Wizard opens the Print section. You can add text and other elements; see "Content elements" on page 628. 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.
After clicking Next, you can change the settings for the page. The initial page size and bleed area are taken from the selected PDF. When you click Finish, the Wizard creates: l l l A Print context with one section in it; see "Print context" on the facing page and "Print sections" on page 487. The selected PDF is used as the background of the Print section; see "Using a PDF file as background image" on page 492. For each page in the PDF one page is created in the Print section. One empty Master Page.
l l l Enter your contact details. Click the Browse button to select a logo, or select to use a placeholder logo or no logo at all. Select a PDF file with the letterhead stationery. Also see "Media" on page 508. Tip Nice to know: your info and preferences are saved and will be reused the next time you create an ERP template. When you click Finish, the Wizard creates: l l l l A Print context with one section in it; see "Print context" below and "Print sections" on page 487. One Master Page.
output" on page 1410). The Print context can also be added to Email output as a PDF attachment; see "Generating Email output" on page 1438. 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.
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. Master Pages can only be used in the Print context. See "Master Pages" on page 505.
Printing on both sides To print a Print section on both sides of the paper, that Print section needs to have the Duplex printing option to be enabled; see "Enabling double-sided printing (Duplex, Mixplex)" on page 495. This setting can not be changed in a Job Creation Preset or an Output Creation Preset. Note Your printer must support duplex for this option to work.
Setting the bleed The bleed is the printable space around a page. It can be used on some printers to ensure that no unprinted edges occur in the final trimmed document. The bleed is one of the settings for a section. See "Page settings: size, margins and bleed" on page 498. Overprint and black overprint Normally, when two colors overlap in Print output, the underlying color is not printed.
1. Right-click the Print context in the Resources pane and select Color Output. 2. Enable the Keep RGB black in output option. In Connect versions prior to 2018.2, RGB black was not automatically converted to CMYK black. Therefore, this option is by default enabled in templates made with an earlier version. In new templates, this option is disabled by default. Print sections Print templates (also called Print sections), are part of the Print context.
See "Master Pages" on page 505 for an explanation of how to fill them and how to apply them to different pages. Using stationery (Media) When the output of a Print context is meant to be printed on paper that already has graphical and text elements on it (called stationery, or preprinted sheets), you can add a copy of this media, in the form of a PDF file, to the Media folder. Media can be applied to pages in a Print section, to make them appear as a background to those pages.
to be printed out on paper. When a Print template is created (see "Creating a Print template with a Wizard" on page 477 and "Print context" on page 482), only one Print section is added to it, but you can add as many print sections as you need. To add a section to a context: l On the Resources pane, expand the Contexts folder, right-click the Print context , and then click New section. Note that the new section automatically gets the same properties as the first section.
Tip If you need a whole Print section to be visible in the output only under certain conditions, consider using the Conditional Print Section script wizard; see "Conditional Print sections" on page 813. You can use the Conditional Content script wizard to hide parts of the content of a section; see "Showing content conditionally" on page 810. Importing a Print section To import a section from another template, click File > Import Resources... in the menu. See: "Import Resources dialog" on page 942.
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. To rearrange sections in a context: l l On the Resources pane, expand the Print context and drag and drop sections to change the order they are in. Alternatively, on the Resources pane, right-click a section in the Print context and click Arrange.
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. When style sheets have a conflicting rule for the same element, class or ID, the last style sheet ‘wins’ and overrides the rule found in the previous style sheet. Note Style sheets that are linked to (i.e.
file that was used as input file, or another type of input file, converted to a PDF file. With this option you don't need to make any other settings; click OK to close the dialog. 3. For a PDF resource, you have to specify the path. Clicking the Select Image button opens the Select Image dialog (see "Select Image dialog" on page 993). 4. l 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.
images need to be available when the template is merged with a record set to generate output, and that their location should be accessible from the machine on which the template's output is produced. External images are updated (retrieved) at the time the output is generated. 5. 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.
Dynamic backgrounds To make the background change based on the value of a data field, you may use the Dynamic Background Script Wizard; see "Dynamic Print section backgrounds" on page 816. Alternatively you could write your own Control Script to set the background; see "Control Script: Setting a Print section's background" on page 893. The settings in a script take precedence over the settings made in the Print Section Properties dialog.
Note Your printer must support Duplex for this option to work. To enable Duplex or Mixplex printing: 1. On the Resources pane, expand the Print context, right-click the print section and click Sheet configuration. 2. Check Duplex to enable content to be printed on the back of each sheet. 3. When Duplex printing is enabled, further options become available. l Check Omit empty back side for Last or Single sheet to reset a page to Simplex if it has an empty back side.
Scripts" on page 885 and "Control Script API" on page 1351). This is especially useful when you need identical sections with different settings. Pages Unlike emails and web pages, Print sections can contain multiple pages. Pages are naturally limited by their size and margins. If the content of a section doesn't fit on one page, the overflow goes to the next page. This happens automatically, based on the section's page size and margins; see "Page settings: size, margins and bleed" on the facing page.
l Detail tables can be used in all contexts, but transport lines are only useful in a Print context; see "Detail Table" on page 818. Positioning and aligning elements Sometimes, in a Print template, you don't want content to move up or down with the text flow. To prevent that, put that content in a Positioned Box. See "Content elements" on page 628. When it comes to positioning elements on a page, Guides can be useful, as well as Tables. See "How to position elements" on page 758.
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 786) can have a variable amount of space at the bottom of the last page. It is useful to fill the empty space at the bottom with transpromotional material, but of course you don’t want extra pages created just for promotional data. 'Whitespace elements' are elements that will only appear on the page if there is enough space for them.
page 505. 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. If a page is empty or does not display a page number, it is still added to the page count. Page count: The total number of pages in the document, including pages with no contents or without a page number.
Creating a table of contents A table of contents can only be created in a script. If you are looking to create a short, simple table of contents in one section, you could add a Standard Script that uses the pageRef() function. For an example, see "Creating a table of contents" on page 1317. For a multi-page, cross-section table of contents you must use a Post Pagination Script; see "Creating a Table Of Contents" on page 902.
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).
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 753): 1. Select the element (see "Selecting an element" on page 632). 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 747. 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" on the next page. 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.
Adding a header and footer Headers and footers are not designed as part of the contents of a Print section, but as part of a Master Page, which is then applied to a page in a print section. To create a header and footer: 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.
check Tumble to duplex pages as in a calendar, and Facing pages to have the margins of the section switch alternately, so that pages are printed as if in a magazine or book. 3. If the option Same for all positions is checked, the same Master Page will be applied to every page in the print section (and to both the front and the back side of the page if duplex printing is enabled). Uncheck this option. 4.
For further explanation about how to apply Media to different pages, see "Applying Media to a page in a Print section" on page 512. Media will not be printed, unless you want them to; see below. Per Media, a front and back can be specified and you can specify on what kind of paper the output is meant to be printed on. This includes paper weight, quality, coating and finishing; see "Setting Media properties" below.
type of image file) for both the front and the back of the Media, and you can determine how the virtual stationery should be positioned on the page. This is done as follows: 1. On the Resources pane, expand the Contexts folder, expand the Media folder, rightclick the Media and click Properties. 2. Now you can change the name and page size of the Media. Note that it isn't possible to change the page size once the Media is applied to a section. Media can only be applied to sections that have the same size. 3.
not selected, the Select Image dialog automatically adds the filetype parameter with the file extension as its value (for example: ?filetype=pdf (if it is the first parameter) or &filetype=pdf). The filetype, page and nopreview parameters are not sent to the host; they are used internally. Therefore, URLs that rely on one of these parameters cannot be used. l With an external image, you can check the option Save with template.
Setting the paper's characteristics To set a Media's paper characteristics: 1. On the Resources pane, expand the Contexts folder, expand the Media folder, and right-click the Media. Click Characteristics. 2. Specify the paper's characteristics: l l l l l l l Media Type: The type of paper, such as Plain, Continuous, Envelope, Labels, Stationery, etc. Weight: The intended weight of the media in grammage (g/m2).
To apply Media to specific page positions in a Print section: 1. On the Resources pane, expand the Print context; right-click the Print section, and click Sheet configuration. 2. Optionally, check Duplex to enable content to be printed on the back of each sheet. Your printer must support duplex for this option to work.
1. On the Resources pane, expand the Contexts folder, expand the Print context, rightclick the print section and click Sheet configuration. 2. Decide which pages should have dynamically switching media: every first page in the Print section, every last page, one of the pages in between (a 'middle page'), or a single page. (Uncheck the option Same for all positions, to see all page positions.) 3. In the area for the respective sheet position, click the Edit script button next to Media.
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 509). Section backgrounds are rotated separately (see "Using a PDF file as background image" on page 492). If in the Media properties, the Virtual Stationery position is set to Absolute, any offset given by the Top and Left values will be applied after rotation.
HTML email that displays properly on a variety of devices and screen sizes is challenging. Building an email is not like building for the web. While web browsers comply with standards (to a significant extent), email clients do not. Different email clients interpret the same HTML and CSS styles in totally different ways.
Designing an Email template With the Designer you can design Email templates. It is strongly recommended to start creating an Email template with an Email Template Wizard, because it is challenging to design HTML email that looks good on all email clients, devices and screen sizes that customers use when they are reading their email.
Email templates: Slate and others The most obvious solution offered in the Designer is to use one of the templates provided with the Designer; see "Creating an Email template with a Wizard" on page 520. 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.
All standard abbreviations can be found in Emmet's documentation: Abbreviations. 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 840.
Do not capture your email in one big image Most e-mail clients do not automatically download images, so do not capture your email in one big image. The recipient initially sees a blank message and probably deletes it right away. Do not resize images in your email Many mail clients do not support image resizing and will show the image in its original dimensions. Resize the images before you link to or embed them.
1. In the Welcome screen that appears after startup: l l Choose Browse Template Wizards. Scroll down until you see the Email Template Wizards. There are three types of Email Template Wizards: l Basic Email templates l Banded Email templates l Slate: Responsive Email templates by Litmus. Or choose Create a New Template and select the Email template. This starts the Basic Action Email wizard. Alternatively, on the File menu, click New, and: l l Select Email Template.
on which Template Wizard was used. The style sheets can be found in the Stylesheets folder on the Resources pane. The Wizard opens the Email section, so that you can fill it with text and other elements; see "Content elements" on page 628, "Email context" on page 524, and "Email templates" on page 526. Tip Use the Outline pane at the left to see which elements are present in the template and to select an element.
More than 50% of emails are opened on mobile. These five responsive HTML email templates are optimized for small screens and they look great in any inbox. They’ve been tested in Litmus and are completely bulletproof. Tip After creating the email template, click the Responsive Design View icon of the workspace to see how the email looks on different screen sizes. at the top The only thing you can set in advance for a Slate template is the color of the call-to-action button.
page 774. l The web address where the recipient of the email will be taken after clicking the button in the email. Type the URL in the Link field. In addition, for an Invoice email you can change the following content settings: l l Show Welcome Message. Check this option to insert a salutation and one paragraph with dummy text in the email. Detail Table Name. Type the name of a detail table to fill the lines of the invoice with data.
Sending email When the template is ready, you can generate Email output; See "Generating Email output" on page 1438. To test a template, you can send a test email first. This allows you to override the recipient address. Output, generated from an Email template, can have the following attachments: l The contents of the Print context, in the form of a single PDF attachment. (Compression options for PDF attachments can be specified in the Email context's properties; see "Compressing PDF attachments" below.
1. On the Resources pane, expand the Contexts folder; then right-click the Email context and select PDF Attachments. Alternatively, select Context > PDF Attachments on the main menu. This option is only available when editing an Email section in the Workspace. 2. Change the properties of the PDF file that will be attached when the Print context is attached to the email. Lossless is the maximum quality. Note that this will produce a larger PDF file. Uncheck this option to be able to set a lower quality.
An Email context can contain multiple templates. When generating output from the Email context, however, only one of the Email templates can be merged with each record. Set the 'default' Email section (see below) before generating Email output; see also "Generating Email output" on page 1438. For information about attachments see "Email attachments" on page 537.
Note that when the imported Email section replaces an Email section in your template, the PDF attachments settings are imported as well. (See: "Compressing PDF attachments" on page 525.) Deleting an Email template To delete an Email section: l On the Resources pane, expand the Contexts folder, expand the Email context, rightclick the name of the section, and then click Delete.
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. 2.
Setting a default Email template for output An Email context can contain multiple templates. When generating output from the Email context, however, only one of the Email templates can be merged with each record. To select the Email section that will be output by default: l On the Resources pane, expand the Email context, right-click a section and click Set as Default.
Note Using a variable email address requires you to load dataor a data mapping configuration first; see "Loading data" on page 788. The Email Script Wizard In addition to the drag and drop method, you can use the Email Script Wizard to add data to an email header field. It lets you choose one or more data fields and enter a prefix and/or suffix (per data field). There are two ways to open the Email Script Wizard: l l Via the Email Fields.
Default SMTP settings can be specified in the Preferences dialog: select Window > Preferences, expand the Email preferences and click SMTP. You can add as many presets as needed, for example for different Email Service Providers (see "Using an ESP with PlanetPress Connect" on page 1442). To do this, click the Add button at the right. Then fill out the following settings: l l l l l Name: The name of the preset. This will show up in the Send Email dialog.
To add variable data to the subject of an email section, drag and drop a data field into the Subject field at the top of the workspace. Two things will happen: l A placeholder for the data field appears in the subject line (for example: @email@). l A new script, named Subject, is added to the Scripts pane. You can add as many data fields to the subject as you like.
to make the script work for all email sections. Recipients: To, CC and BCC To specify recipients for Email output, you can simply drag and drop a data field that contains an email address into the To field at the top of the workspace. A new script, named To, will be added to the Scripts pane. Note that you can add only one data field to the email field this way. When you drag another data field into the email field the existing script will be replaced..
Tip A dynamic From address is often used when sending email campaigns and to do tracking of email replies. Include the recipient's email address in a dynamic From address to enable automatic detection and removal of undeliverable e-mail addresses. (This technique is called VERP; see Wikipedia.
4. For a name-type meta tag, enter the value. 5. Enter the content. Example When you add a name meta tag with the value viewport and content width=320, the following will be added to the email header: . For more information on tags, see W3Schools - HTML meta tag.
Note Via a Control Script it is possible to set a different user password and owner password, see "Control Script: Securing PDF attachments" on page 898, "Control Scripts" on page 885 and "Control Script API" on page 1351. Email attachments Output, generated from an Email template, can have the following attachments: l The contents of the Print context, in the form of a single PDF attachment.
This topic explains how to attach files other than those generated by the Print or Web context. Note A plain-text version of the HTML is added to each email if the option is checked in the Email section's properties (see "Properties tab" on page 987). With new templates this is always the case. Attaching files Selecting and adding files as attachments If you want all recipients to get the same attachments with their email, you can add the attachments to the Email section(s).
2. A new script called Attachments has appeared in the list. Double-click to open it. 3. Choose an Email section from the Section drop-down list. 4. Fill in the different parts of which the file name is composed: l l l Prefix. The first prefix contains the base path (or at least the first, static part of the path). For example:C:\Attachments\, C:/Attachments/, or file:///C:/Attachments/. Data field/s. The selected data field/s will be evaluated. If a data field is empty, the entire row is skipped.
If you want to write your own email attachment scripts, there is a how-to that you may find helpful: How to add custom email attachments. Renaming attachments Print and Web sections that are attached to an email can only be renamed via a Control Script; see "Parts: splitting and renaming email attachments" on page 890. Renaming dynamic attachments Dynamic attachments can be renamed via the script that attaches them to the email. Doubleclick the script to open it and click the Expand button.
Capture OnTheGo app (see "Capture OnTheGo" on page 569). They are stored in the Web folder as well. The Web context outputs one HTML web page. In addition to the HTML text it contains either the resources or references to the resources necessary to display it. JavaScript files are added to the
in the generated HTML file. JavaScript toolboxes like jQuery and its plugins, or MooTools, are useful when you want to implement special features in the web page. (See "Using JavaScript" on page 564.
Capture On The Go templates are a special kind of Web templates; see "Capture OnTheGo template wizards" on page 579. A Web Template Wizard helps you create a Web page that looks good on virtually any browser, device and screen size. Foundation With the exception of the most basic one, all Web Template Wizards in the Designer make use of the Zurb Foundation front-end framework. A front-end framework is a collection of HTML, CSS, and JavaScript files to build upon.
3. Click Next and make adjustments to the settings. The wizard remembers the settings that were last used for a Foundation Web template. l Section: l l l Description: Enter the description of the page. This is the contents of a HTML tag. Top bar group: l l l l Name: Enter the name of the Section in the Web context. This has no effect on output.
JavaScript folder on the Resources pane, in a Foundation folder. l l A collection of Snippets in the Snippets folder on the Resources pane. The Snippets contain ready-to-use parts to build the web page. Double-click to open them. See "Snippets" on page 737 for information about using Snippets. Images: icons, one picture and one thumbnail picture. Hover your mouse over the names of the images in the Images folder on the Resources pane to get a preview.
and function well on multiple devices including desktop and laptop computers, tablets, and mobile phones. Foundation is tested across many browsers and devices, and works back as far as IE9 and Android 2. See http://foundation.zurb.com/learn/about.html. Jumbotron The name of the Jumbotron template is derived from the large screens in sports stadiums. It is most useful for informative or marketing-based websites.
l l The Web context is created and one Web page or section is added to it. You can see this on the Resources pane: expand the Contexts folder, and then expand the Web folder. See "Web pages" on the next page to learn how to fill a web page template in the Designer. Although only one web page can be generated per record when generating Web output, the Web context can contain multiple sections.
that this option is only available when editing a Web section in the Workspace.) For further explanation see: "Includes dialog" on page 943. To make this setting for a particular Web section, right-click the section on the Resources pane and select Includes. Web pages Web pages (also called Web sections) are part of the Web context (see "Web Context" on page 545) in a template. The Web context outputs one HTML web page.
To provide alternative content for the web page, you could use Conditional Content (see "Showing content conditionally" on page 810), or Snippets and a script (see the Help topics "Snippets" on page 737 and "Loading a snippet via a script" on page 872, and this how-to: Multi-page Web template.) Tip For an example of how to serve different web pages using snippets, see the following how-to: Creating a multi-page Web template.
save the template; see "Save preferences" on page 850. Filling a Web page Many of the content elements that are available for all three contexts are particularly suitable for web pages; see "Content elements" on page 628. Do not use Positioned Boxes and Tables to position elements, however; use Inline Boxes instead. Forms and Form elements are only available in a Web context; see "Forms" on page 713 and "Form Elements" on page 718.
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. 2.
Note Which style sheets are included can also be set for the Web context as a whole: in step 1, right-click the Web context, instead of a section. Setting a default Web page for output When generating output from the Web context, only one of the Web templates can be merged with each record. To select the Web section that will be output by default: l On the Resources pane, expand the Web context, right-click a section and click Set as Default.
Setting the title, meta data and a shortcut icon Each Web section has a set of properties to define the title of the web page, the shortcut icon and the meta tags appearing in the web page's head (with the HTML tag:
, see https://www.w3schools.com/tags/tag_head.asp). To change these properties: 1. On the Resources pane, expand the Web context, right-click the section and click Properties. 2. Enter the Page Title. The contents of this field will go in the HTML tag.
2. Change the name of the script, so that it reflects what the script does. Note Scripts can only have the same name when they are not in the same folder. 3. Choose the option Selector and in the Selector field, type head. 4. Write a script that appends an element to the
of the web page. Example The following script adds a element to the head of a web page. results.append(""); Forms Web templates can contain Forms.
the Form's properties, validation method and location, but doesn't allow you to specify fields. If you choose this method, skip step 8 and 9 of this procedure and add fields after inserting the Form (see "Adding elements to a Form" on page 558). 3. Add an ID and/or a class. ID's and classes are particularly useful with regard to variable data (see "Personalizing content" on page 786) and styling (see "Styling templates with CSS files" on page 743). 4.
validation as it is browser independent. The necessary JQuery files will be added to the JavaScript folder on the Resources pane when the form is inserted. 8. Under Fields, click the Add button and click on the desired field type to add a field of that type; see "Form Elements" on page 718. Note A Fieldset is not available in the Form Wizard, because a Fieldset itself can contain multiple different fields. Add the Fieldset after inserting the Form; see "Adding elements to a Form" on page 558. 9.
Note: HTML has some restrictions as to which types of elements are allowed as children of other elements. For example, a paragraph element is not allowed to have children that are block level elements - like a Div or a Table. If inserting content at the selected location would produce invalid HTML the final result may be different than expected. For example, when you insert a Div into a paragraph, the paragraph gets split in two. This means you end up with two paragraphs with the Div in between. 12.
Changing a Form's validation method In Connect PlanetPress Connect, there are two ways in which a Form's input can be validated: l l The Browser validation method leaves it up to the browser to validate the user input. When adding fields to the Form (see the next step) you can only make fields required and set the maximum length as an additional requirement for some fields. JQuery Validation validates input using JQuery scripts.
Validation in Connect 1.0.0 In Connect 1.0.0, the validation method of the template was stored using the names "standard" and "custom". Standard has changed to "browser" and custom is now "jquery-validation". When you open a template made with that version of the software, the template will be migrated to use the new attribute values for the data-validation-method attribute of the
1. Add an ID (required) and, optionally, a class. Note The ID will be copied to the name attribute of the element. The name attribute is what identifies the field to the receiving server-side script. To change the name, select the element after inserting it and type the new name on the Attributes pane. ID's and classes are also useful with regard to variable data (see "Personalizing content" on page 786) and styling (see "Styling templates with CSS files" on page 743). 2.
Tip For other Form elements, you can set the default value to be the value of a field in the record set; see "Specifying a default value" on the next page. l l For a Checkbox or Radio Button you can check checked or selected respectively for the element to initially be checked/selected when the web page is shown.
Adding new HTML5 elements HTML5 added several new input element types that can't be found in the Designer menu. To add such an element to a template you can do the following: 1. Add an input element from the menu, for example a Text or Button. 2. Select the element in the template. 3. On the Attributes pane, select the desired input type from the Type drop-down list.
Note To enable submitting arrays, you need to check the Use PHP arrays or Use enhanced PHP arrays option in the HTTP Server user preferences in Workflow; see Workflow Online Help. A simple method to create arrays in the job data file is to use two pairs of square brackets in the name of the form inputs. Put the name of the array between the first pair of square brackets. Between the second pair of square brackets, define the key to which the value belongs.
With the Use enhanced PHP arrays option, the XML looks similar, but in this case, the value between the first pair of square brackets is expected to consist of two parts, separated by an underscore (e.g. row_0). The first part becomes the element's name. All content after the first underscore (preferably an integer) is given as an attribute of the element (e.g. ). The above HTML results in the following XML: pparker@eu.objectiflune.
When multiple fields with the same name are encountered, the previous value is overwritten. This way the values for unchecked checkboxes and radio buttons can be processed easily. Tip The Capture OnTheGo (COTG) plugin automatically adds a hidden field for every unchecked checkbox on a Form when the Form is submitted.
Adding JavaScript files to the Resources Adding a JavaScript file To add a JavaScript file to the resources: 1. Add the file: l l l Right-click the JavaScript folder on the Resources pane, and click New JavaScript. Double-click it to open and edit it. Alternatively, drag and drop the JavaScript file from the Windows Explorer to the JavaScript folder on the Resources pane. Or import one or more JavaScript files from another template; see "Import Resources dialog" on page 942. 2.
When generating Web output, these files are referenced in the web page's header and are served by the remote server, not by the Connect Server module. There are a few advantages to using remote resources: l l These resources are not served by your server, saving on space, bandwidth and processing. Using a popular CDN takes advantage of caching - a client having visited another website using that same CDN will have the file in cache and not re-download it, making for faster load times for the client.
option to download and embed all remote resources. (See Workflow Help: Create Web Content.) Tip After adding the remote file, you may right-click it and select Download Resource. This allows you to maintain a central file, from which you can quickly download a copy to your template without having to copy & paste. Note that a local copy of a remote resource is a snapshot; it is not automatically kept in sync with its remote content.
Note Any JavaScript files included in a section run after the scripts in the Scripts pane. Using JavaScript in other contexts Email clients do not support JavaScript. Therefore, Email contexts cannot include JavaScript resources. When a JavaScript file is included in a Print section, the Designer itself acts as the browser. When generating Print output, it runs the JavaScript after generating the main page flow contents and the pagination.
the browser compatibility table at the bottom of the Mozilla documentation for "let": Mozilla documentation.) Capture OnTheGo With the Designer you can create Capture OnTheGo templates. COTG templates are used to generate forms for the Capture OnTheGo mobile application. For more information about the application refer to these websites: Capture OnTheGo and Capture OnTheGo in the Resource Center.
however, to start the COTG Template using one of the COTG Template Wizards. They all include the appropriate JavaScript files and style sheets to create user-friendly, responsive forms; see "Capture OnTheGo template wizards" on page 579. Before starting to create a COTG Form, take some time to structure the design process and to get familiar with the principles of form design, as explained in the topic "Designing a COTG Template" on page 575.
In a Capture OnTheGo form, you can use special Capture OnTheGo Form elements, such as a Signature and a Barcode Scanner element. For a description of all COTG elements, see: "COTG Elements" on page 705. To learn how to use them, see "Using COTG Elements" on page 593. Tip If you have started creating your Capture OnTheGo template using a COTG Template Wizard, you can find ready-made elements in the Snippets folder on the Resources pane.
Using JavaScript COTG plugin Capture OnTheGo widgets do not function without the COTG plugin: cotg-2.0.0.js. This plugin also makes it possible to add COTG Elements dynamically, set defaults for COTG elements, react to events that occur when a user interacts with a COTG element, etc. For more information see: "Using the COTG plugin: cotg-2.0.0.js" on page 605.
Next, you can start building a Workflow configuration that receives and handles the submitted data. The configuration should start with a HTTP Server Input task (see Workflow Help: HTTP Server Input) of which the HTTP action is the one specified in the COTG Form's action. Using COTG data in a template When a user submits a COTG Form, a Workflow configuration may store the information in a database and/or push it into other Workflow processes, for example to send a letter or an email receipt.
2. Create a data mapping configuration Use the resulting XML file to create a data mapping configuration (see "Data mapping configurations" on page 226). 1. Choose File > New > Data mapping Wizards > From XML file. 2. Select the XML data file as its source and click Next. 3. Set the XML Elements option to /request/values. This will automatically add an extraction step for the submitted form fields. 4. Click Finish.
1. Click the Insert Inline Box icon on the toolbar. The Insert Inline Box dialog appears. 2. Enter an ID for the box (anything will do, as long as it helps you identify the box) and click OK. The box is added to the text flow and can be resized if needed. 3. Switch to the Source tab and replace the content of the box:
Div content goes here
by this text: 4. Switch back to the Design tab. You will see a small, empty rectangle inside at the top of the inline box.
company actually needs will prove to be well worth your time. Creating specifications up front prevents discussions, reduces rework and therefore saves time. 2. Listing the input fields that are needed, their type, and possible input constraints. Think of how the information should be visually grouped.
Tip If the COTG Form replaces a paper form, it can be tempting to stick to the original layout for the sake of recognizability. Don't fall into that trap. In the end, the users - customers and employees will be happier with a user-friendly form that adapts to different screen sizes and looks like it was designed for the web. Most design guidelines for web forms apply to COTG forms as well. Two key concepts are responsive design and usability.
Usability Usability defines the ease of use of a form. Is the layout intuitive? Are the form elements easy to tap on a mobile device? A visually consistent design allows the user to follow the flow while filling out the form. Below are some key usability aspects to keep in mind when designing forms. Provide clear labels. Many modern web sites show labels inside the actual form inputs while they are empty. This saves space on the form, but once the user has entered data the label is no longer visible.
Forms for offline use Capture OnTheGo forms can be used offline. This is the case even when the form relies on remotely stored source files like JavaScript files and style sheets, provided that the option Use cached Capture OnTheGo resource is checked when adding them to the form. 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.
user-friendly as possible. See "Designing a COTG Template" on page 575. 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.
Tip Use the Outline pane at the left to see which elements are present in the template and to select an element. 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 t emporarily adds a frame to certain elements on the Design tab. These will not .Print or output.
Capture OnTheGo and Jumbotron template wizards automatically add the Foundation files v. 5.5.1 to the resources of the template. In a future version of PlanetPress Connect, Foundation 6 will be included. If you'd rather start using the newest Foundation files right away, you have two options: l l Download the Foundation files (from http://foundation.zurb.com/sites/download.html/) and add them to the template manually. Use remote Foundation files from a CDN, such as https://cdnjs.
These classes can be combined, so that depending on the screen size, a Div can take more or less space in a row. Separate the class names with a space. Tip Start with the class for small screens. For example:
. Larger devices will inherit those styles (thanks to the mobile-first approach of Foundation's style sheet). Customize for larger screens as necessary.
To add Grid rows and columns quickly, you could also use the Grid snippets or Row snippets, found in the Snippets folder on the Resources pane after using a wizard to create a Foundation web page or a Capture OnTheGo template. For more information about Snippets, see "Snippets" on page 737. For more information about template wizards, see "Creating a Web template with a Wizard" on page 541 and "Capture OnTheGo template wizards" on page 579.
OnTheGo form elements. For more information about the application refer to these websites: Capture OnTheGo and Capture OnTheGo in the Resource Center. Capture OnTheGo (COTG) elements can only be added within a Form element in a Web context; see "COTG Forms" on page 569. For information about how to add and use COTG Elements, see "Using COTG Elements" on page 593.
l l l Take now: Opens the device's default Camera application to take a picture using the device's camera. Capture OnTheGo has no impact on the device's applications, so the features available (quality, orientation, filters) are dependent on the device itself. You can, however, set the format, quality and scaling for images that are submitted by the Camera element, as explained below.
and edit the Image properties: l Format: The image format can be PNG or JPG. l Quality: Set the compression in a percentage. l Scale Image: Check this option to enable image scaling. Then set the maximum width and height of images before they are sent to the server. Note that only the smallest of these is applied and the size ratio is always maintained. Time stamp A time stamp can be added to each picture taken.
Date and Formatted Date The Date element and the Formatted Date element display the current date on the device when the form is first opened. When the element is touched, a date selector appears so the user can modify this date. The Formatted Date element displays dates in a format that depends on the locale of the device on which the user is viewing the form. A Date Element displays dates in the ISO 8601 format: YYYY-MM-DD. When the form is submitted, the date data is sent as plain text.
Geolocation The Geolocation Element adds a button to read the device's current GPS coordinates and save them in a form field. When the button is pressed, the GPS coordinates are requested and saved. When the form is submitted, the Geolocation data is sent in plain text. High accuracy By default, devices attempt to retrieve a position using network-based methods.
Repository ID The Repository ID element retrieves the repository ID (read only) from the app based on the currently logged on COTG user. You could put the Repository ID in a hidden input, so that when the form is submitted, the Repository ID is submitted as well. This information can be used on the server side to take specific actions, such as sending properly branded emails. Signature The Signature Element adds a signature box to a COTG form.
form is available to many different users, to detect who submitted it. If desired the field can be hidden; it will still be submitted. Using COTG Elements Capture OnTheGo (COTG) elements are Web Form elements that are specially designed to be used in a Capture OnTheGo Form (see "Capture OnTheGo" on page 569). This topic explains how to add these elements to a Capture OnTheGo Form or and how to prepare them so that when the Form is submitted, they provide valid data that can be handled easily.
l l Use label as placeholder inserts the given label text in the placeholder attribute of the field. No style omits the label altogether. Note The first two label styles ensure that when the user clicks the label, the input element gets the focus. When you add a Capture OnTheGo (COTG) element to a template that you didn't start with a COTG template wizard, the Designer will automatically add the necessary JavaScript files: the jQuery library and the COTG library: cotg-2.0.0.js.
All COTG elements have a role attribute. This attribute is not supposed to be edited: without the correct role attribute, the element won't function. As noted, the name attribute is what identifies the element after submitting the form. Tip Use the Outline pane at the left to see which elements are present in the template and to select an element. Use the Attributes pane at the right to see the current element's ID, class and some other properties.
{"timeout":6000}">. Settings in the HTML override the default settings for that element. They are applied to the widget when the Form is created and cannot be changed afterwards. For a complete list of options see the Capture OnTheGo API: "Capture OnTheGo API" on page 616. Settings for a dynamically added element can be made in code; see "Dynamically adding COTG widgets" on page 608.
With the Use PHP arrays option enabled in Workflow, the above HTML results in the following XML: pparker@eu.objectiflune.
341 dent This option makes it easier to select all elements on the same level in a data mapping configuration, and to convert the XML to a JSON object. You can try out this feature with the COTG Time Sheet template, as explained in this how-to: Using The PHP Array Option. The COTG Fields Table element (see "Fields Table" on page 709) in that template has an Add button to add rows to a table, and groups data following this approach.
Previewing the form On a PC A Capture OnTheGo template can be previewed on a PC in two different ways. Note that Capture OnTheGo form elements will not be functional unless they are sent to a device. l l Within PlanetPress Connect Designer. You can open the Preview tab or the Live tab in the Workspace. This displays the output HTML along with any variable data being added.
1. Go to the Capture OnTheGo Repository Login: https://config-us.captureonthego.com/. 2. Login with your Repository ID and Password. 3. Go to the Users page. 4. Add a new user. The user name should be in the form of an email address. Next, make sure that the Capture OnTheGo mobile application is installed and that it is logged on as a known user of the Capture OnTheGo Repository. Now, with your Capture OnTheGo template open in the Connect Designer module, click on the Send COTG Test… button in the toolbar.
validation method" on page 717 and "How to make COTG elements required" on page 595). Get Job Data File on Submit It is possible to test a COTG Form in the Designer and get access to an XML file that contains the submitted data, without having a Workflow configuration to handle the data. This option requires that: l l Workflow has been installed on the local machine, and the Workflow HTTP/Soap Service has been started.
4. Save the XML file to disk. You can view it, create or update a data mapping configuration for it (see "Data mapping configurations" on page 226), and insert the data in a template, using the data mapping configuration (see "Personalizing content" on page 786). Note Checkboxes and Radio buttons that are unchecked will not be submitted to the job data. This is standard behavior in HTML.
Capture On The Go input dummy data values Input Dummy Value Signat ure Receives SVG signature data and the onscreen presentation of that data. Camer a A dummy foto is added, and a (SVG) annotation if that option is set for the widget. Note that the script doesn't look at the PNG/JPG or resolution options, the only option it considers is the annotation option.
Input Dummy Value widget Locale widget en-US * Note that the formatted date and time can be different from the values that the COTG app provides. In the COTG app the formatted date comes from the COTG API, and the formatted date and time normally depend on the locale/region settings on the mobile device. The ISO date and time should be the same as when using the COTG app.
Get submitted data via Workflow Eventually, when a user submits a Capture OnTheGo Form, the data are received by the Workflow HTTP Server Input task (see Workflow Help: HTTP Server Input) that has the same HTTP action as the one specified in the Form's action (see "COTG Forms" on page 569). The Workflow configuration should then handle the submitted data.
Form. If you are new to it, spend a few minutes on learning it - it's that easy. For more information, see: https://jquery.com/. and http://learn.jquery.com/. Adding the plugin When you create a template with a COTG Template Wizard (see "Capture OnTheGo template wizards" on page 579), the Designer automatically adds the jQuery library and the COTG library: cotg-2.0.0.js. This also happens when you add a Capture OnTheGo (COTG) element to a template that you didn't start with a COTG template wizard.
Example The following code sets the default timeout and accuracy for Geolocation objects. and the default maximum height and width for Camera widgets. $.fn.cotgGeolocation.defaults.timeout = 6000; // 6 secs $.fn.cotgGeolocation.defaults.enableHighAccuracy = true; $.fn.cotgPhotoWidget.defaults.width = 1024; $.fn.cotgPhotoWidget.defaults.height = 768; $.fn.cotgPhotoWidget.defaults.quality = 60; Reacting to, or triggering, widget events The new COTG plugin introduces custom events for COTG controls.
$('#date1').trigger("show-date-picker.cotg", new Date("2018 01")); }); }); Dynamically adding COTG widgets Capture OnTheGo (COTG) widgets can be added to a Form dynamically, via jQuery. For example: a new Camera element could be added when the user clicks an Add button. This topic explains how to implement this. It is assumed that you have a basic understanding of HTML forms, CSS, JavaScript, and jQuery.
}); }); Creating the widget Now you can start writing the code that constructs, adds and initializes the widget. This code has to be based on jQuery. Constructing the HTML A widget basically is an HTML element with certain attributes and contents. The HTML structure of a widget can be seen on the Source tab after adding the widget to a Form in the Designer. In code, reconstruct the HTML. Make sure to give the new element an ID.
Optionally, while initializing an element, you can make settings for this specific element. These settings get prevalence over the options already specified in the HTML and over the default settings specified in the COTG plugin. The code snippet below initializes a new Camera element (with the ID myCamera) with a number of settings: $('#myCamera').
addCameraWidget(cameraID); }); }); function getCameraIndex(){ return $("input.camera-dyn").length; } function addCameraWidget(cameraID, value) { if(typeof value == 'undefined') { value = ''; } var html = ''; $('#cameras').
Event Description clear.cotg Removes the scanned Barcode data. scan.cotg Opens the scanner. The Barcode Scanner broadcasts the following events. Event Description set.cotg This event is fired after Barcode data has been set to the value of the input. Camera cotgPhotoWidget([options]) options Optional. An array containing the desired settings, e.g. {quality: 50, height: 1024, width: 1024}. For any unspecified options the default settings will be used.
Option Description Type Default height The maximum height in pixels Number 864 width The maximum width in pixels. Number 1152 source Which buttons are enabled: Take now (take), Library (pick), or both (takeandpick). String 'takeandpick' scaleimage Scales the image to fit the maximum width or height. The aspect ration is maintained. Boolean true quality Quality of the saved image, expressed as a range of 0-100, where 100 is full resolution with no loss from file compression.
Option Description Type Default stampFontSize The time stamp's font size: small, medium, or large. String 'medium' Events The Camera listens for the following custom events. Event Description clear.cotg Removes the picture. savestate.cotg Saves the path of the current picture to the local storage of the COTG app. restorestate.cotg Restores the state of the widget when the form is reopened in the COTG app, after the app has restored previously entered values of static input fields.
Events The Date and Formatted Date elements listen for the following custom events. Event Description clear.cotg Removes the date. set.cotg Sets the given date. The date should be given as a Date object, for example: $("#date").trigger("set.cotg", new Date()); // set current date show-datepicker.cotg Opens the Date picker. Optionally, you can provide a date (as a Date object) for the Date picker to be opened with, for example: $('#date1').trigger("show-date-picker.
Event Description set.cotg This event is fired during initialization of the element, after setting its info to the current device. Document ID cotgDocumentId() Initializing a new Document ID puts the current Document ID in the hidden input of the element. Example: $('#myDocID').cotgDocumentId(); Events The Document ID element listens for the following event. Event Description clear.cotg Removes the Document ID. The Document ID element broadcasts the following event. Event Description set.
(){ $(this).closest('tr').cotgDeleteRow(); }); Geolocation cotgGeolocation([options]) options Optional. An array containing the desired settings, e.g. {enableHighAccuracy: true, timeout: 3000}. For any unspecified options the default settings will be used. Call cotgGeolocation([options]) on the new Geolocation element with any settings that you want to be different from the defaults. Example: $('#myGeolocation').
Event Description clear.cotg Removes the Geolocation data. restorestate.cotg Restores the state of the widget when the form is reopened in the COTG app, after the app has restored previously entered values of static input fields. update.cotg Sets the element to the current geolocation. Image & Annotation cotgNoteOnImage() Initializing a new Image & Annotation element prepares it for user interaction. Example: $('#myNoteOnImage').
Event Description savestate.cotg Saves the annotations. The Image & Annotation element broadcasts the following events. Event Description set.cotg Fired after an annotation has been made. Locale cotgLocale() Initializing a new Locale element sets it to the device's locale. Example: $('#myLocale').cotgLocale(); Events The Locale element listens for the following event. Event Description clear.cotg Removes the Locale data. The Locale element broadcasts the following event.
Repository ID cotgRepositoryId() Initializing a new Repository ID puts the current Repository ID in the hidden input of this element. The Repository ID is based on the currently logged on COTG user. Example: $('#myRepID').cotgRepositoryId(); Events The Repository ID element listens for the following custom events. Event Description clear.cotg Removes the Repositiory ID data. The Repository ID element broadcasts the following event. Event Description set.
Field Description draw.cotg Draws the signature on the form (e.g. after a set.cotg or restore-state.cotg event). restorestate.cotg Called when the form is reopened in the COTG app, after the app has restored previously entered values of static input fields. savestate.cotg Saves the signature data to the local storage of the COTG app. set.cotg Sets the given signature. The signature should be given as an SVG string, for example: $(“#signature”).trigger(“set.
Events The Time and Formatted Time elements listen for the following custom events. Event Description set.cotg Stores the given time (specified in a Date object). clear.cotg Removes the set time. show-timepicker.cotg Opens the Time Picker. If no time is provided (specified in a Date object), the current time will be shown. User Account cotgUserAccount() Initializing a new User Account element puts the account of the current user in the hidden input of this element. Example: $('#myUser').
Content elements Once you have created a template, it can be filled with all kinds of elements, from text to barcodes and from tables to fields on a web form. All types of elements are listed on this page. There are several ways to insert elements, see "Inserting an element" on page 631. Each element can have an ID and a class, as well as a number of other properties, depending on the element's type.
see "Using the Text Script Wizard" on page 803 and "Styling and formatting" on page 741. l "Hyperlink and mailto link" on page 721 l "Barcode" on page 634 l Web "Forms" on page 713 and Web "Form Elements" on page 718 l l l l "Whitespace elements: using optional space at the end of the last page" on page 499 (Print context only) "Page numbers " on page 499 (Print context only) Article, Section, Header, Footer, Nav and Aside are HTML5 semantic elements; see https://www.w3schools.
breadcrumbs show the HTML tag of the clicked element, as well as the HTML tags of other elements to which the clicked element belongs. The clicked element is at the end of the line. To edit the HTML text directly: l In the workspace, toggle to the Source tab. On this tab you can view and edit the content of the template in the form of plain text with HTML tags (note the angle brackets: <>). You may add and edit the text and the HTML tags, classes, ID’s and other attributes.
For each type of element, a small selection of attributes is visible on the Attributes pane at the top right. In a multilingual template, the proprietary data-translate attribute marks an element for translation. For more information see "Translating templates" on page 907 and "Tagging elements for translation" on page 909. Changing attributes via script Many attributes can be changed via the user interface. Another way to change attributes is by using a script.
4. Use the Location drop-down (if available) to select where to insert the element. l l l l l l At cursor position inserts it where the cursor is located in the template. Before element inserts it before the HTML element in which the cursor is currently located. For example if the cursor is within a paragraph, the insertion point will be before the
tag.* After start tag inserts it within the current HTML element, at the beginning, just after the start tag.
Tip Click the Edges button on the toolbar t emporarily adds a frame to certain elements on the Design tab. These will not .Print or output. There are two more ways to select an element in the content: l Using the Breadcrumbs at the top of the workspace. Breadcrumbs show the HTML tag of the clicked element, as well as the HTML tags of 'parent elements': elements inside of which the clicked element is located. The clicked element is at the end of the line.
Styling and formatting an element Format elements directly Images and other graphical elements can be resized by clicking on them and dragging the resize handles. There are toolbar buttons to color, indent or style text. Other toolbar buttons can left-align, right-align, or rotate graphical elements. The toolbar buttons only represent a selection of the formatting options for each element. There are no toolbar buttons to change an element's margins, or to add a border to it, for example.
Adding a Barcode Note When generating Print output, you can add extra barcodes and OMR marks. The reason why you would do this, is that at merge time more information is available about the actual output document. The page count, for example, is not available at design time. To add barcodes and OMR marks on the fly when generating Print output, select File > Print and check the option Add additional content (see "Page breakdown" on page 1195) in the Print Wizard.
l l After element inserts it after the element in which the cursor is currently located. For example if the cursor is within a paragraph, the insertion point will be after the end tag of the paragraph (
).* Replace inserts it in place of the currently selected element. (This option is not available when inserting content in a Master Page.) * If the current element is located inside another element, use the Elements drop-down to select which element is used for the insertion location.
A barcode is always added with the barcode type's default properties and dimensions, but they can easily be changed; see "Barcode type and properties" below. Changing a barcode Barcode script The barcode script determines which value is fed to the barcode generator. Double-click the script on the Scripts pane to change which field or fields are added to the barcode value.
l Code 11, see "Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, Matrix 2 of 5" on page 670 l "Code 39" on page 646 l "Code 39 extended" on page 647 l Code 93, see "Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, Matrix 2 of 5" on page 670 l "Code 93 extended" on page 651 l "Code 128" on page 653 l "Data Matrix" on page 655 l EAN-8, EAN-13, see "UPC-A, UPC-E, EAN-8, EAN-13" on page 688 l "GS1 DataMatrix" on page 660 l "GS1-128" on page 662 l l Industrial 2 of 5, see "C
Australia Post, Japan Post, KIX, USPS IMb Australia Post, Japan Post, KIX and USPS IMb are some of the types of barcodes that can be added to a template; see "Barcode" on page 634. In PlanetPress Connect versions prior to 2019.2 the USPS IMb barcode was called "OneCode". The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties.
Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format.
Configuration type Use the drop-down to select the format type used when creating the barcode: only full range format, only compact formats, or any format. Preferred configuration Use the drop-down to select the preferred format for the barcode. Note that the barcode generator may choose a different format if the data cannot be represented by the preferred format.
Tilde processing Check this option to process tilde characters in the data as special characters. (See the Java4less Barcodes Guide to learn what the tilde character can be used for.) Note that with this option checked, any tilde that needs to be included in the output must be escaped by adding another tilde: ~~.
Barcode properties This topic lists the properties of the Codabar barcode. For the properties of other barcode types, see "Barcode type and properties" on page 637. Module width Specifies the width of the narrow bars in centimeters. Changing this value to a higher value will make the barcode bigger when Scale is set to None. Start Char and Stop Char Use the drop-down to select the start and stop character for the barcode, which defines the encoding mode. Available characters are A, B, C.
w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format.
For the properties of other barcode types, see "Barcode type and properties" on page 637. Module width Specifies the width of the narrow bars in centimeters. Changing this value to a higher value will make the barcode bigger when Scale is set to None. Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height.
l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format. This has a slightly lower quality than SVG but is usually generated faster and will display properly in Email output. Code 39 Code 39 and Code 39 extended are two of the barcode types that can be added to a template.
l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height. l Proportionally: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Add Checksum When checked, PlanetPress Connect will calculate a Checksum character and add that to the result of the Barcode script.
The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties. To change those properties, such as the scale and color, open the Barcode properties dialog: right-click the barcode (on the Design tab in the Workspace) and select the Barcode... option in the context menu.
Add Checksum When checked, PlanetPress Connect will calculate a Checksum character and add that to the result of the Barcode script. If the value to be encoded is longer than 10 digits, a second check character will be calculated. Tilde processing Check this option to process tilde characters in the data as special characters. (See the Java4less Barcodes Guide to learn what the tilde character can be used for.
Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, Matrix 2 of 5 Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, and Matrix 2 of 5 are a few of the barcode types that can be added to a template. The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties.
l Proportionally: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Add Checksum When checked, PlanetPress Connect will calculate a Checksum character and add that to the result of the Barcode script. If the value to be encoded is longer than 10 digits, a second check character will be calculated.
Initially the barcode will have the barcode type's default properties. To change those properties, such as the scale and color, open the Barcode properties dialog: right-click the barcode (on the Design tab in the Workspace) and select the Barcode... option in the context menu. Barcode properties This topic lists the properties of the Code 93 extended barcode. For the properties of other barcode types, see "Barcode type and properties" on page 637.
The font size is given in points (pt). Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page.
Module width Specifies the width of the narrow bars in centimeters. Changing this value to a higher value will make the barcode bigger when Scale is set to None.
Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format.
Guide to learn what the tilde character can be used for). Any tilde that needs to be included in the output must be escaped by adding another tilde (either "~~", or "7E7E" if the Hex input option is enabled). This can be done with a replace() call in the Barcode script, after expanding the script. Hex Input For optimized mailings, German Post requires the supplied data for the Data Matrix barcode to be hexadecimal input. Check this option if your input data is a hexadecimal code.
l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height. l Proportionally: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Tilde processing Check this option to process tilde characters in the data as special characters. (See the Java4less Barcodes Guide to learn what the tilde character can be used for.
Initially the barcode will have the barcode type's default properties. To change those properties, such as the scale and color, open the Barcode properties dialog: right-click the barcode (on the Design tab in the Workspace) and select the Barcode... option in the context menu. Note that these barcode types process tilde characters in the data as special characters. See the Java4less Barcodes Guide to learn what the tilde character can be used for.
supplement data will be skipped and the additional barcode will not be rendered. Note When the chosen supplement type doesn't match the data, the supplement data will be skipped and the additional barcode will not be rendered. l l Height Factor: This is the relative height of the supplement's bars compared to the normal bars. Space Before : Defines the space between the main symbol and the supplement, in cm.
GS1 DataMatrix GS1 DataMatrix is one of the types of barcodes that can be added to a template; see "Barcode" on page 634. The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties.
l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height. Add Checksum When checked, PlanetPress Connect will calculate a Checksum character and add that to the result of the Barcode script. If the value to be encoded is longer than 10 digits, a second check character will be calculated. Tilde processing Check this option to process tilde characters in the data as special characters.
w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format.
l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height. Add Checksum When checked, PlanetPress Connect will calculate a Checksum character and add that to the result of the Barcode script. If the value to be encoded is longer than 10 digits, a second check character will be calculated. Tilde processing Check this option to process tilde characters in the data as special characters.
Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, Matrix 2 of 5 Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, and Matrix 2 of 5 are a few of the barcode types that can be added to a template. The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties.
l Proportionally: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Add Checksum When checked, PlanetPress Connect will calculate a Checksum character and add that to the result of the Barcode script. If the value to be encoded is longer than 10 digits, a second check character will be calculated.
Initially the barcode will have the barcode type's default properties. To change those properties, such as the scale and color, open the Barcode properties dialog: right-click the barcode (on the Design tab in the Workspace) and select the Barcode... option in the context menu. Note that barcodes of these types process tilde characters (~) in the data as special characters. See the Java4less Barcodes Guide to learn what the tilde character can be used for.
Human Readable Message When this option is checked, PlanetPress Connect shows a human readable text below or above the barcode, as defined using the Text Position, using the specified font and font size. The font size is given in points (pt). Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker).
Note that barcodes of these types don't process tilde characters (~) in the data as special characters. Barcode properties This topic lists the properties of the barcode types Australia Post, Japan Post, KIX and UPS IMb. For the properties of other barcode types, see "Barcode type and properties" on page 637. Height, width and spacing The height, width and spacing of the barcode are all measured in pixels (38 dpi). l Bar height: The height of the (shorter) bars.
l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format. This has a slightly lower quality than SVG but is usually generated faster and will display properly in Email output. Australia Post, Japan Post, KIX, USPS IMb Australia Post, Japan Post, KIX and USPS IMb are some of the types of barcodes that can be added to a template; see "Barcode" on page 634. In PlanetPress Connect versions prior to 2019.
Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l l None: The barcode is rendered based on the module width. Proportional: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker).
Note that barcodes of these types process tilde characters (~) in the data as special characters. See the Java4less Barcodes Guide to learn what the tilde character can be used for. Barcode properties This topic lists the properties of the following barcode types : l Code 11 l Code 93 l Industrial 2 of 5 l Interleaved 2 of 5 l Matrix 2 of 5 For the properties of other barcode types, see "Barcode type and properties" on page 637. Module width Specifies the width of the narrow bars in centimeters.
The font size is given in points (pt). Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page.
Mode PlanetPress Connect supports several modes; for an explanation of these modes see the MaxiCode page on Wikipedia. Tilde processing Check this option to process tilde characters in the data as special characters. (See the Java4less Barcodes Guide to learn what the tilde character can be used for.) Note that with this option checked, any tilde that needs to be included in the output must be escaped by adding another tilde: ~~.
Module width Specifies the width of the narrow bars in centimeters. Changing this value to a higher value will make the barcode bigger when Scale is set to None. Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height.
Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format. This has a slightly lower quality than SVG but is usually generated faster and will display properly in Email output. PDF417 PDF417 is one of the types of barcodes that can be added to a template; see "Barcode" on page 634.
level 8 (maximum error correction). Recommended error correction levels are between level 2 and 5, but the optimal value depends on the amount of data, printing quality of the PDF417 symbol and decoding capabilities of the scanner. Nr. of Columns The number of data columns can vary from 3 to 30. Nr. of Rows A PDF417 bar code can have anywhere from 3 to 90 rows. Bar height Defines the height of the bars for a single row measured in pixels drawn.
Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format.
Module width Specifies the width of the narrow bars in centimeters. Changing this value to a higher value will make the barcode bigger when Scale is set to None. Bar height You can set the height (in cm) of the short bars and the tall bars in the Postnet barcode. Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height.
l PNG: Binary rasterized format. This has a slightly lower quality than SVG but is usually generated faster and will display properly in Email output. QR Code A QR Code is one of the types of barcodes that can be added to a template; see "Barcode" on page 634. The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties.
l l Numeric: 10 bits per 3 digits, with a maximum of 7089 numerical characters. Alphanumeric: 11 bits per 2 characters, with a maximum of 4296 alphanumerical characters. l Byte: 8 bits per character, with a maximum of 2953 characters. l Kanji: 13 bits per character, with a maximum of 1817 characters. Extended Channel Interpretation (ECI) This setting enables data using character sets other than the default set.
Tilde processing Check this option to process tilde characters in the data as special characters. (See the Java4less Barcodes Guide to learn what the tilde character can be used for.) Note that with this option checked, any tilde that needs to be included in the output must be escaped by adding another tilde: ~~.
The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties. To change those properties, such as the scale and color, open the Barcode properties dialog: right-click the barcode (on the Design tab in the Workspace) and select the Barcode... option in the context menu.
Color The Color group allows you to choose a different Barcode color (instead of black) and Background color (instead of white), by typing a hexadecimal color value (see for example w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format.
Height, width and spacing The height, width and spacing of the barcode are all measured in pixels (38 dpi). l Bar height: the height of the (shorter) bars. l Extended bar height: the total height of the extended bars. l Bar width: the width of the bars. l Spacing: the distance between the bars. Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l None: The barcode is rendered based on the module width.
Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format. This has a slightly lower quality than SVG but is usually generated faster and will display properly in Email output.
l l None: The barcode is rendered based on the module width. Proportional: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Human Readable Message When this option is checked, PlanetPress Connect shows a human readable text below or above the barcode, as defined using the Text Position, using the specified font and font size. The font size is given in points (pt).
Barcode properties This topic lists the properties of the barcode types Royal Mail 4-State Mailmark C and Royal Mail 4-State Mailmark L. For the properties of other barcode types, see "Barcode type and properties" on page 637. Height, width and spacing The height, width and spacing of the barcode are all measured in pixels (38 dpi). l Bar height: The height of the (shorter) bars. l Extended bar height: The total height of the extended bars. l Bar width: The width of the bars.
Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format. This has a slightly lower quality than SVG but is usually generated faster and will display properly in Email output. UPC-A, UPC-E, EAN-8, EAN-13 UPC-A, UPC-E, EAN-8 and EAN-13 are a few of the barcode types that can be added to a template.
Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l None: The barcode is rendered based on the module width. l Fit to box: The barcode is stretched to fit the parent box in both width and height. l Proportionally: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching. Supplement UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional barcode to the right of the main barcode.
w3school's color picker). When black is a composite of CMYK or RGB values, it may incur a color click charge on some printers. Check the Output in Grayscale option to make sure that pure black is used. Output format Defines how the barcode is output on the page. There are two possible formats: l l SVG: Vector format. This is usually of higher quality, but may take longer to generate and is not compatible with Email output. PNG: Binary rasterized format.
l Bar height: The height of the (shorter) bars. l Extended bar height: The total height of the extended bars. l Bar width: The width of the bars. l Spacing: The distance between the bars. Scale Defines if and how the rendered barcode is scaled in relation to the parent element: l l None: The barcode is rendered based on the module width. Proportional: The barcode is stretched up to where it fits either the width or height of the parent box, whichever requires the less stretching.
The barcode can be added either using the Barcode toolbar button or through selecting Insert > Barcode on the menu; see "Adding a Barcode" on page 635. Initially the barcode will have the barcode type's default properties. To change those properties, such as the scale and color, open the Barcode properties dialog: right-click the barcode (on the Design tab in the Workspace) and select the Barcode... option in the context menu.
Tip Wrapping elements in a box (or in a semantic HTML element) makes it easier to target them in a script or in a style sheet. Place the cursor in the element or select multiple elements. Then, on the menu, click Insert > Wrap in Box. You can now use the wrapper element as a script's or style's selector; see "Using the Text Script Wizard" on page 803 and "Styling and formatting" on page 741. Tip With the Copy fit feature, text can automatically be scaled to the available space in a Box or Div.
Dynamically changing the position A Positioned Box has the following attributes: l anchor defines the page number (starting by 0) the box is placed on l offset-x defines the horizontal position of the box relative to its container l offset-y defines the vertical position of the box relative to its container. These attributes can be set in a script. The following script dynamically changes the position of a Positioned Box in a Print context by setting the offset-x and offset-y values. results.
Adding an Inline Box To insert an inline box, use the icon on the toolbar. Inline Boxes can be resized using the handles on the sides and corner. They can be styled using the Format > Box menu item, through the CTRL+M keyboard shortcut or through the CSS files; see "Styling and formatting" on page 741 and "Styling templates with CSS files" on page 743. Positioning an Inline Box Initially an Inline Box will float to the left.
Div The Div is the element used to create both Positioned Boxes and Inline Boxes. By default, a Div element reacts pretty much like a paragraph (
) or an inline box set to 'no float' except that it can be resized directly. Just like Positioned Boxes and Inline Boxes, Div elements can be styled using the Format > Box menu item, through the CTRL+M keyboard shortcut or through the CSS files; see "Styling and formatting" on page 741 and "Styling templates with CSS files" on page 743.
underlying configuration: Programmatically configure a Chart object. For another example see this How-to: Put one slice per detail record in a Pie Chart. Note As of PlanetPress Connectversion 2018.1, the way charts can be compiled and presented has been greatly improved. As a consequence, charts made with a version of Connect prior to 2018.1 may not be converted correctly when opened in a later version.
l l l Before end tag inserts it within the current HTML element, at the end, just before the end tag.* After element inserts it after the element in which the cursor is currently located. For example if the cursor is within a paragraph, the insertion point will be after the end tag of the paragraph (
).* Replace inserts it in place of the currently selected element. (This option is not available when inserting content in a Master Page.
l A Div element. It has a data-amchart attribute, as you can see when you select the chart and open the Source view in the Workspace. The data-amchart attribute contains settings for how the data is displayed. These settings are made via the chart's properties (see "Enhancing a charts' design" on page 702). l A script. The script determines which data are displayed in the chart, with which colors and labels. The script can be edited any time; see "Selecting data for a Business Graphic" below.
1. Use the Input Type drop-down to select the source of the data for the Chart: l l Data Fields: The data originate from data fields in the main record. The chart will have the same number of items for each record. Data Table, the data are taken from a detail table that you select using the Detail Table drop-down. Note In Pie Charts, only data from the first record in the detail table are used.
5. Select a color for each of the selected fields. Click on the color to open the Edit Color dialog (see "Color Picker" on page 931). Note Colors defined in the Chart Properties dialog override the colors set in the script. To open the Chart Properties dialog, right-click the chart after adding it, and select Chart.... See: "Enhancing a charts' design" on the facing page. 6. Use the Move Up and Move Down buttons to change the order of the fields, which is reflected in the chart.
When creating a data mapping configuration (see "Data mapping workflow" on page 248), it is recommended to arrange data in a detail table in such a way that it matches this 'one series per record, one bar/point per data field' approach. Occasionally you may find that data in a detail table does not match this approach, and that it would be a better fit if the chart had one series of bars/points for each selected detail data field instead, and one bar/point for each record.
Start by opening the Chart Properties dialog. Right-click the chart (in the template, or in the Outline pane) and select Chart. Every tab menu in the Chart Properties dialog, except the last one, gives direct access to a number of layout options.
"rotate": true, ... } Properties of the Legend (listed here: https://docs.amcharts.com/3/javascriptcharts/AmLegend) should go in the legend section in the JSON: ... "legend": { "position": "right" }, The Source tab also lets you change properties that are available in either the Script Wizard or other tabs of the Chart Properties dialog.
Using themes The amCharts library supports working with themes. The default themes are: light, dark, black, patterns, and chalk. All except the 'patterns' theme can be used in Connect templates. Here's how to do that. 1. Add the theme to the top of the JSON on the Source tab of the Chart Properties diaog. For example: { "theme": "light", ... This setting overrides any color settings made in the Chart Script wizard and on the other tabs of the Chart Properties dialog. 2.
Barcode Scanner The Barcode Scanner element adds a button to trigger the device to scan a barcode. A very large variety of barcode types are supported. Once the barcode has been scanned, the data from the barcode will be added to the COTG Form and submitted along with it. Note Using the Barcode Scanner element requires the installation of the ZXing Barcode Scanner application on Android devices. The application returns the barcode data after scanning.
To omit the Take now or Library button, edit the Camera element's properties: right-click the Camera element after adding it to the form, select Camera properties and then use the Source drop-down to select which buttons will be available: Take, Pick from library, or both. Annotations Annotations can make a picture much more informative: an arrow, showing in which direction a car was driving; a circle, where the car has been damaged...
Time stamp A time stamp can be added to each picture taken. Right-click the Camera element after adding it to the form, select Camera properties, and then check Add Time Stamp. The time stamp will be added to the bottom left of the picture, with medium font size, and long date format (for example: 6/15/2009 1:45 PM). These settings can only be changed via the Source tab or in code; see "Using the COTG plugin: cotg-2.0.0.js" on page 605 and the Capture OnTheGo API: "Camera" on page 617.
When the form is submitted, the date data is sent as plain text. A Formatted Date element submits the date in two formats: in the format that depends on the device's regional and language settings and in the ISO format mentioned above (using a hidden field). A Date element sends the date in the ISO format only. Device Info The Device Info Element adds a field that contains some information about the device (phone or tablet) that is submitting the COTG Form.
High accuracy By default, devices attempt to retrieve a position using network-based methods. To tell the framework to use more accurate methods, such as satellite positioning, the High Accuracy setting has to be enabled on the Geolocation element. To make this setting, right-click the Geolocation element (or select it on the Outline pane) after adding it to the form, select Geolocation properties and check the High Accuracy option.
Signature The Signature Element adds a signature box to a COTG form. These signatures are filled in via touch input, either with a finger or capacitive pen. Touching the signature box opens up a fullscreen box used to sign (generally more useful in Landscape mode depending on the device); after confirming, the dialog saves the data into the Form. Signature data is transmitted in SVG plain text format.
Date The Date element inserts the current system date, optionally making it dynamic so that it updates whenever the template is viewed or produces output. Adding a date To add a Date element, use the Insert > Date option in the menus. A dialog appears with the following controls: l l l Language: Use the drop-down to select which language the date should be displayed in. Update Automatically: Check to update the date automatically when the template is viewed or produces output.
Formatting an automatically updating date The script added to automatically update the date uses the short date format. To change this: 1. Double-click the date script in the Scripts pane. 2. Delete the first line of the script. 3. On the second line, delete what comes after format and change format to formatter (see "formatter" on page 1331). 4.
the Form's properties, validation method and location, but doesn't allow you to specify fields. If you choose this method, skip step 8 and 9 of this procedure and add fields after inserting the Form (see "Adding elements to a Form" on page 558). 3. Add an ID and/or a class. ID's and classes are particularly useful with regard to variable data (see "Personalizing content" on page 786) and styling (see "Styling templates with CSS files" on page 743). 4.
validation as it is browser independent. The necessary JQuery files will be added to the JavaScript folder on the Resources pane when the form is inserted. 8. Under Fields, click the Add button and click on the desired field type to add a field of that type; see "Form Elements" on page 718. Note A Fieldset is not available in the Form Wizard, because a Fieldset itself can contain multiple different fields. Add the Fieldset after inserting the Form; see "Adding elements to a Form" on page 558. 9.
Note: HTML has some restrictions as to which types of elements are allowed as children of other elements. For example, a paragraph element is not allowed to have children that are block level elements - like a Div or a Table. If inserting content at the selected location would produce invalid HTML the final result may be different than expected. For example, when you insert a Div into a paragraph, the paragraph gets split in two. This means you end up with two paragraphs with the Div in between. 12.
Changing a Form's validation method In Connect PlanetPress Connect, there are two ways in which a Form's input can be validated: l l The Browser validation method leaves it up to the browser to validate the user input. When adding fields to the Form (see the next step) you can only make fields required and set the maximum length as an additional requirement for some fields. JQuery Validation validates input using JQuery scripts.
Validation in Connect 1.0.0 In Connect 1.0.0, the validation method of the template was stored using the names "standard" and "custom". Standard has changed to "browser" and custom is now "jquery-validation". When you open a template made with that version of the software, the template will be migrated to use the new attribute values for the data-validation-method attribute of the
Text The Text element is a simple element with the type text. It accepts any alphanumerical characters, including special characters. The string is HTML-encoded before it is submitted to the server. Email The Email element is a text input field that accepts only email addresses in a valid format. URL The URL element is a text input field that accepts only URLs (a web page address) in a valid format. Password The Password element is a password field that accepts any alphanumerical characters.
element, you can add a label to that element; see "Adding elements to a Form" on page 558. To change a label after inserting the Form, simply click it and start typing. Checkbox A Checkbox element sends information to the server whether it is checked (true) or not (false). When adding a Checkbox you can set its initial state and its value. The contents of the value property do not appear in the user interface.
The submit name of a Radio Button indicates to which Radio Button Group the Radio Button belongs. Select A Select element is a drop-down list with multiple entries from which the user can select only one option. When adding a Select to a Form you can type the options to be given in the dropdown list and the values related to them. Only the value of the selected option will be sent to the server on submitting the form.
Note Hyperlinks - both external and internal - are not preserved when printing multiple pages on the same sheet (see "Imposition options" on page 1181). HTML element: a When you add elements, such as text, images or a table, to the content of a template, you are actually constructing an HTML file. It is possible to edit the source of the HTML file directly in the Designer; see "Editing HTML" on page 629. The HTML tag of a hyperlink or mailto-link is . This is sometimes called an anchor tag.
4. For a URL: l URL: o External hyperlink: Enter a valid, well-formed URL to link to. It must start with the protocol, such as http:// or https://. o Internal hyperlink: Enter an ID, preceded by a hash; for example: #myID. The link will point to an element with that ID. Note An internal hyperlink may point to an element in another section. Just make sure that there is only one element in the document with the specified ID. l Target: use the drop-down or type in the target for the link.
How to add or modify a hyperlink is described in a how-to; see How to dynamically insert a hyperlink. This implies writing a script. For information about scripts, see "Writing your own scripts" on page 853. Adding a personalized link Personalized URLs (pURLs) are links that are tailor-made for a specific purpose, generally for individual clients.
Ways to use images In templates, both imported images and external images can be used (see "Adding images" on the facing page and "Resources" on page 466). Once added to the content of a template, an image can be resized (see "Resizing an image" on page 768) and alternate text can be linked to it (see "Setting an alternate text" on page 730). Tip Using images in an Email template? See "Using images in email campaigns: tips" on page 519.
Filling optional whitespace 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 page 499. HTML tag: img When you add elements, such as text, images or a table, to the content of a template, you are actually constructing an HTML file.
Imported or external images In templates, both imported images and external images can be used. Imported images are images that are saved within the template file. To import images into a template and add them to the content, you can use the drag-and-drop method or the Select Image dialog (both are explained below). External images are either located on a specific website (URL), or in a folder on a hard drive that is accessible from your computer.
1. Position the cursor in the content where you want the image to be inserted. 2. On the Insert menu, click Image. Or, click the Insert Image button on the toolbar. The Select Image dialog appears. l 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.
which the template's output is produced. External images are updated (retrieved) at the time the output is generated. 3. If the image is a PDF file that consists of more than one page, select the desired page. Note The number of pages in a PDF file cannot be determined via the HTTP and HTTPS protocols. If you wish to use a page other than page 1 in a remote PDF, check the option Save with template; then click OK and reopen the dialog. Next, on the Resources tab, select the PDF, and select a page. 4.
Moving an image An image that is added to a section behaves like a character and is part of the text flow. To move it, simply click the image and drag and drop it somewhere else in the text flow. To learn how to wrap text around it, see "Wrapping text around an image" on page 769. How to make an image stay at a certain position (like any image added to a Master Page) is explained here: "Pulling an image out of the text flow" on page 769.
To set an alternative text, click the image and enter the alternate text in the Alternate text field on the Attributes pane at the top right. Using a CSS gradient to create an image CSS gradients are a new type of image added in the CSS3 Image Module. CSS gradients let you display smooth transitions between two or more specified colors, while repeating gradients let you display patterns. This way, using image files for these effects can be avoided, thereby reducing download time and bandwidth usage.
The HTML tag of a Table is
. Tables are divided into table rows with the tag. Table rows are divided into table data with the tag. A table row can also be divided into table headings with the | tag. The tags , |
and can be used to group the header, body, or footer content in a table, respectively. For information about HTML tables and a list of attributes, see https://www.w3schools.com/html/html_tables.asp. Inserting a Table 1.
l l After element inserts it after the element in which the cursor is currently located. For example if the cursor is within a paragraph, the insertion point will be after the end tag of the paragraph (
).* Replace inserts it in place of the currently selected element. (This option is not available when inserting content in a Master Page.) * If the current element is located inside another element, use the Elements drop-down to select which element is used for the insertion location.
Deleting a header or footer To delete a header or footer, simply right-click the header or footer and select Row > Delete on the shortcut menu. If the deleted element was targeted by a script, you will be asked if you want to delete the script as well. Rows and columns Adding a row or column To add a row or column to an existing Table, click in a cell.
for which resizing is allowed. l l If the position of the Table isn't absolute, right-click the Table and on the shortcut menu, select Convert to absolute. (This option isn't available for Tables on a Master Page, as they must always have an absolute position, or be located inside another element with an absolute position.) Select the Table (see "Selecting an element" on page 632) and then, on the Attributes pane, check the option Allow resizing.
l Press Enter to insert a new paragraph. l Press Shift+Enter to insert a line break. Alternatively, use the Insert Lorem Ipsum toolbar button to insert dummy text, or copy-paste text into the template. Select Paste as Plain Text from the Edit menu or the contextual menu to insert the text without any HTML styles or formatting. Text that precedes or follows the value of a data field can be added by the Text Script Wizard; see "Using the Text Script Wizard" on page 803.
HTML element: p, h, li and others When adding elements, such as text, images or a table, to the content of a template, you are actually constructing an HTML file, which you can see and edit on the Source tab (see also: "Editing HTML" on page 629). In HTML, text can be contained in many different elements: paragraphs, span elements, line items and table cells, for example. The HTML tag of a paragraph is
. The paragraph should be followed by a closing tag:
.
Tip It is possible to open and edit any HTML or JSON file in the Designer: select File > Open, select All files (*.*) as the file type and then select a HTML or JSON file. About JSON Snippets JSON Snippets are snippets that contain pieces of JSON data instead of HTML. Just like HTML snippets, JSON snippets are stored in the Snippets folder on the Resources pane, but their file name should end in '.json'.
To add a remote snippet: 1. Right-click the Snippets folder on the Resources pane, and click New Remote Snippet. 2. Enter a name for the file as it appears in the Snippets folder. This name is shown in the Snippets folder with the .rhtml file extension. 3. Enter the URL for the remote resource. This must be a full URL, including the http:// or https:// prefix, domain name, path and file name. Note Remote snippets may contain other resources, such as images.
Creating a snippet To turn a part of a letter, email or web pageinto a snippet for reuse in the content of a template: 1. Open the section and select the part or parts that should be saved to a snippet. 2. Right-click the selection, point to Snippet and click Create to copy the selected part to a new snippet, or Create Shared Content to create the new snippet and replace the selected part with a reference to the new snippet. 3. Give the snippet a name.
Renaming a snippet To rename a snippet, right-click it on the Resources pane in the Snippets folder and select Rename. If you rename a snippet that was inserted into a section as shared content, you need to update the reference to the snippet manually: 1. Open the section in which the snippet is used. 2. Switch to Source view. 3. Look for the element in the HTML and replace the old snippet name with the new name in the source attribute.
Whether applied through style sheets or through local formatting, behind the scenes all layout properties in the Designer are CSS properties. When you format an element locally, an inline style rule is added to the element. Note that where local formatting conflicts with a formatting rule for the same element in one of the style sheets, the local formatting rule gets priority; the rule in the style sheet will be ignored. It is highly recommended to use style sheets in templates right from the start.
The locale setting influences how dates, numbers and amounts of money are displayed; see "Locale" on page 782. Styling templates with CSS files The Layout toolbar and the Format menu offer many possibilities to style every piece of a template. However, styling every single element, one after another, is a lot of work and, more importantly, can result in a template with a messy mix of styles that isn’t easy to maintain and lacks consistent design.
On this tab you can view and edit the content of the template in the form of plain text with HTML tags (note the angle brackets: <>). You may add and edit the text and the HTML tags, classes, ID’s and other attributes. To learn more about HTML, see for example https://developer.mozilla.org/enUS/docs/Web/Guide/HTML/Introduction and http://www.w3schools.com/html/default.asp. Many video courses and hands-on courses about HTML (and CSS) are offered on the Internet as well, some for free.
Adding CSS files To add a CSS file of your own, open an Explorer window, drag the file to the Resources pane and drop it on the Stylesheets folder. In case the CSS file has references to specific images, you can drag/drop or copy/paste those images into the Stylesheets folder as well. To create a new CSS file, right-click the Stylesheet folder on the Resources pane and select New Stylesheet. You can also import one or more CSS file from another template using the "Import Resources dialog" on page 942.
1. Right-click the Stylesheet folder on the Resources pane, and click New Remote Stylesheet. 2. Enter a name for the file as it appears in the Stylesheet resources. For better management, it's best to use the same filename as the remote resource. 3. Enter the URL for the remote resource. If the file is located on an external web server, this must be a full URL, including the http:// or https:// prefix, domain name, path and file name.
Tip To refresh the remote resources in a Designer view, use the Refresh option in the menu (View > Refresh) or the Refresh button at the top of the Workspace. Using a Sass file A CSS preprocessor is a CSS extension language that allows you to enhance CSS with code (variables, for example) and then compile it into plain CSS. CSS Preprocessor Sass is integrated in Connect. For more information about Sass, see: Sass website.
preceded by a dot, e.g. .small. l An ID: #id. An ID is always preceded by #, e.g. #sender. When you create an ID, choose a name that indicates what the ID is used for, e.g. #sender would refer to the HTML element with information about the sender. Note Each ID should be unique and can only be used once in each section. Note Do not give an element the ID 'pages' or the class name 'dynamic'. These are reserved words. Using them as an ID or class name leads to undesirable effects.
Editing plain CSS l l Click the button Advanced in any property sheet to open a CSS property editor. Type CSS properties at the left and values at the right. In the Resources pane at the left, double-click the global stylesheet or the stylesheet for the relevant context. The file opens in the workspace in the middle. A list of all CSS properties and their possible values can be found here: https://www.w3schools.com/cssref/. Note Block comments (/* ...
Adding a class or ID to an HTML element 1. Select the element (see "Selecting an element" on page 632). 2. On the Attributes pane, type the ID and/or class. Type the ID without the preceding # and class names without a dot. Note Note: Elements can have multiple classes. Separate the class names with a space (eg. “red small”). Alternatively, after selecting an element, you can click the Source tab at the bottom of the workspace. The selected element will be highlighted in the source.
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. When style sheets have a conflicting rule for the same element, class or ID, the last style sheet ‘wins’ and overrides the rule found in the previous style sheet. Note Style sheets that are linked to (i.e.
A crossed-out style rule signals that it was overruled by another style rule. This happens when: l l A more specific, and therefore more important rule, is encountered for the same element. See "Using a more specific CSS rule" below to learn more about the specificity of style rules. A rule with the same importance is read after the first rule. Not only is the order of the rules in a CSS file important, but also the order in which the style sheets are read.
Rules for HTML elements (p, table, li etc.) are general rules. Rules for classes, pseudo classes, and elements with a certain attribute (.class, :hover, [target]) are more specific. Rules for elements with a certain ID are even more specific. The most specific are inline styles.
Tip With the Copy fit feature, text can automatically be scaled to the available space in a Box or Div. See "Copy Fit" on page 757. Formatting text and paragraphs locally An intuitive way of formatting text locally is by using the toolbar buttons: select some text, or an element that contains text (see: "Selecting an element" on page 632) and click one of the toolbar buttons to make it bold, center it, create a numbered or bulleted list, etc.
l l The spacing between letters and words and the way the text is wrapped: l l l l Background color: Specify the background color of the text: select a named color (defined in the Colors Editor) from the drop-down, or click the colored square to open the Color Picker dialog ("Color Picker" on page 931). Alternatively you could type a name or value in the Color field directly.
style tag containing the selected setting(s). Click the Advanced button to add CSS properties and values to the inline style tag of the Span directly. For more information about CSS, see "Styling and formatting" on page 741. Formatting a paragraph Through the Paragraph Formatting dialog you can set the line height and first indent of a paragraph, and specify how to handle page breaks before, in and after the paragraph.
styles are applied to that element. The link behind the style will take you to the place (the Source tab, or a CSS file) where that style is defined. Copy Fit Copy Fit is a feature to automatically scale text to the available space: the name of a person on a greeting card for example, or the name of a product on a shelf talker. This feature is only available with Box and Div elements in Print sections.
Tip To give an element a class or ID, select it and add the class or ID on the Attributes pane. An ID is meant to be used once in each section, while a class can be shared between several elements. 7. Click Apply or OK. Note that the effect of the Copy Fit feature can only be seen in Preview mode. If it is impossible to make a text fit within the box with the given minimum and maximum font size, this will be reported as an error during a preflight (see "Testing scripts" on page 862).
In the Web context, Inline Boxes are the preferred way to position elements; see "Boxes" on page 692. Tables should only be used to display data in a tabular format, not to position text and images. Tables used in web pages to position elements (and often, Positioned Boxes) make those pages less accessible to users with disabilities and to viewers using smaller devices.
Guides Guides are horizontal and vertical lines used to help in designing templates, for example when positioning absolute positions boxes over a PDF background. They can only be used in Print sections. l Select View > Guides > Show guides to show or hide the guides and margins. To add a guide, press the Insert Horizontal Guide or Insert Vertical Guide buttons on the Toolbar. To move a guide, click and drag it to a new location.
For an explanation of all values that the position property can possibly have, see https://www.w3schools.com/css/css_positioning.asp. Where to use it In Print sections, setting the position property to absolute can be very useful. It takes the element out of the text flow, so that the element stays where it is on the page. On Master Pages (which are only used in Print sections) elements are always positioned absolutely; if not, they must be located inside an element that has an absolute position.
Rotating elements In any type of template, boxes, images, tables, text and other elements can be rotated. The toolbar buttons Rotate Clockwise and Rotate Counter Clockwise rotate the element in which the cursor is located 90 degrees at a time. To rotate an element into another angle position, use the 'angle' CSS property of the element. In most cases, this can be done in the element's Formatting dialog. In other cases, such as with text, you have to enter the CSS property and value manually.
l l With local formatting. This means styling the table directly, using the Formatting dialog. Via Cascading Style Sheets (CSS). In a style sheet, style rules are declared for elements with different HTML tags, ID's and classes. These two methods are described below. See "Styling and formatting" on page 741 for background information about these two methods. Selecting a table, row or cell There are several ways to select a table or row: l l l Click in the table or row.
To style all cells in a table or row at the same time via the Formatting dialog, you have to select the table or row first; see "Selecting a table, row or cell" on the previous page. Next, to open the Formatting dialog, choose Format > Table Cell. The settings that you make now will be applied to all cells in the selected row or table. For information about specific options in the formatting dialogs, see "Table Formatting dialog" on page 1001 and "Table Cell Formatting dialog" on page 1005.
In CSS, refer to the table, row or cell with #ID (where ID should be replaced with the actual ID) or with .class (where class should be replaced with the actual class). Styling the first, last and nth rows The CSS pseudo-classes :first-child, :last-child and :nth-child() are very useful for styling table rows, especially in Detail Tables. A CSS pseudo-class follows a selector to specify a special state of that selector. It always starts with a colon.
:nth-child(odd) matches child elements 1, 3, 5, 7, etc. The keyword odd substitutes the expression 2n+1, which in other words says: 'take every second element, starting at 1'. :nth-child(even) matches child elements 2, 4, 6, 8, etc. The keyword even substitutes the expression 2n+0, or simply 2n. :nth-child(3n) matches child elements 3, 6, 9, 12 etc. :nth-child(3n+1) matches child elements 1, 4, 7, 10 etc., so every third element, starting at 1.
This script loops over a detail table, evaluating the field Shipped. If the value of that field is 1, it looks up the corresponding row in the results (the object that contains the selected detail table) and colors the text of that row green. (See also: "query()" on page 1349 and "Examples" on page 1309.
Applying local formatting to an image To apply local formatting to an image, either: l right-click the image and select Image... from the contextual menu l click the image and select Format > Image... from the menu. For an explanation of the available options, see "Image Formatting dialog" on page 939. Applying style rules to an image To format an image via a style sheet, first give the image an ID or class: select the image, and enter the ID or class on the Attributes pane.
Positioning an image Wrapping text around an image Initially, when an image is inserted into a paragraph, it behaves as if it were a character. Text isn't wrapped around an image automatically. To make that happen, you have to change the float property of the image to left or right. This anchors the image to the left or right, allowing text to be wrapped around it.
around an image" above), is a relative positioning property, since it specifies the position of the element relative to its container. This means it is incompatible with the position:absolute property. In the Formatting dialog (see "Applying local formatting to an image" on page 768) the position property can be found on the Image tab, under Positioning.
mode: RGB or CMYK. For an explanation of these two modes, see "Background color and/or image" on the previous page; for an explanation of the other options in this dialog, see "Color Picker" on page 931. You could also type a name or value in the Color field directly. It must be a valid color name (see color names on w3schools), a hexadecimal color code (see w3school's color picker), RGB color value, for example rgb(216,255,170) or CMYK color value, for example cmyk(15%, 0%, 33%, 0%).
8. Set the position of the image in the box. 9. Finally, click OK. Note It is also possible to set an element's background in a style sheet; see "Styling templates with CSS files" on page 743. When referring to images or fonts from a CSS file, refer to a path that is relative to the current path, which is css/. For example: #header { background-image: url('../images/image.jpg'); }. Border In any type of template, boxes, tables and table cells, paragraphs, images and other elements can have a border.
Note It is also possible to set an element's border in a style sheet; see "Styling templates with CSS files" on page 743. Rounding corners Any element in a template can have rounded corners. For boxes and images, this option is available in the Formatting dialog. For other elements, you have to create a CSS rule to set the border-radius of the element (or class of elements). Boxes, images and tables To round the corners of a box, image or table: 1.
including the rounded corners. Table cells can have rounded corners as well, just as any other elements; see below. Other elements To round the corners of elements other than boxes and images, or to have different roundings on different corners, you have to make use of the CSS property: border-radius; see https://www.w3schools.com/css/css3_borders.asp. This is, for example, how you could round the corners of a paragraph: 1.
Defining colors, spot colors and tints Color selectors, such as the drop-down list on the toolbar, initially contain a small set of colors. Add your own colors so that they can be used throughout the templates, in all contexts and in color selector dialogs as well as with their names in style rules (see "Styling and formatting" on page 741). Defining colors To define colors: 1. Select Edit > Colors on the menu. 2. Add a color. There are two ways to do this: l l Click the New button (the green plus).
For information about the Spot color and Overprint options see "Defining a spot color" below. 6. Drag the slider bars to set the values for the color and click OK or Apply. Defining a spot color A spot color is any color generated by an ink (pure or mixed). Note that spot colors can only be used on certain printers.
6. Check Use opacity if you want to set the Tint slider to use Opacity instead. 7. Use the slider to set the percentage of the tint or opacity, or type the percentage directly in the input box and finally click OK. Applying a color Colors can be applied to elements in your templates locally or through style sheets. Using colors in style sheets It is highly recommended to use style sheets in templates right from the start.
Coloring text Instead of using a style sheet (see above), you can color text locally: 1. Select text or an HTML element that contains text (see "Selecting an element" on page 632). 2. On the menu, select Format > Color, or click the black triangle on the Text color toolbar button. 3. Select one of the colors in the list, or click Other to set all aspects of the text style, including text color and/or background color.
Fonts In templates for personalized customer communications you can use the operating system's fonts, including imported fonts. When you are using a font that is not installed on your machine (for example, the bold or italic variant of a regular font) Windows tries to simulate the font in the Designer. Likewise, PlanetPress Connect tries to simulate the font in the output. It is however not guaranteed that the output will be exactly as shown in the Designer.
Note The reason for specifying more than one font in a style sheet for web pages andemails is that the font might not be available on the device on which they are viewed. Order the font names by preference. The last one should be the generic font family (either serif or sans-serif). Importing a font To import a font into a template: l Drag the appropriate font files into the Fonts folder on the Resources pane. Note Font software may have specific restrictions for copying and redistribution.
2. Open the Font Manager: from the menu, select Edit > Fonts. 3. Combine each of the styled fonts with a font effect: a. Select the font and click the Edit button. b. Select the appropriate font effect (e.g. Font Weight: Bold, or Font Style: Italic). c. Change the name of the styled font. It should have the same name as the regular font. 4. Close the Font Manager.
body { font-family: 'MyWebFont', Arial, sans-serif; } Using remote fonts In order to use a remote font, you have to add a remote style sheet that points to a web font style sheet, for example https://fonts.googleapis.com/css?family=Roboto+Slab. For instructions see "Using a remote style sheet" on page 745. Remote fonts can be applied to content in a Master page, section, or Snippet. They may be used in a style sheet and they are automatically added to the Fonts drop-down on the toolbar.
Changing the locale By default, the locale is the same as the operating system's locale setting. To change this setting for the currently open template: 1. On the menu, select Edit > Locale. 2. Use the drop-down to select how the locale is to be set for the current template: l l l Select System Locale to use the operating system's locale settings. The operating system's locale is set in the Region settings of the control panel.
Tip Use a negative left margin to create a hanging paragraph or image. To set the spacing: 1. Right-click the element and click the respective element on the shortcut menu. Alternatively, select the element (see "Selecting an element" on page 632) and on the Format menu click the respective element. 2. Click the Spacing tab. Note All settings in the Formatting dialog are in fact CSS style rules. Click the Advanced button to manually add CSS properties (at the left) and values (at the right).
Adding a Sass file To add a Sass file: 1. Right-click the Stylesheet folder on the Resources pane, and click New Stylesheet > SCSS file. 2. Enter a name for the file as it appears in the Stylesheet resources. When the name of Sass file begins with an underscore, it is considered a partial .scss file (e.g. _mySass.scss). Partial files are typically imported in a base .scss file. They may include Sass variables or other directives declared in the base file, and they cannot be compiled.
Personalizing content Variable-data printing is a form of digital printing in which elements such as text and graphics may be changed using information from a database or data file. It prints unique documents with customized messages for each customer. This is exactly what you can do with Connect: using variable data you can personalize your company's communications (including but not limited to printed matter).
field in your data on the basis of which a condition can be set. See "Showing content conditionally" on page 810. Conditional Print sections Entire Print sections can be included in or omitted from the output on the basis of one or more values in variable data. See "Conditional Print sections" on page 813. Dynamic images and Print section backgrounds Dynamic Images are dynamic in the sense that they are replaced by another image when a data field contains a certain value.
The basics of script-writing in the Designer are explained in the following topic: "Writing your own scripts" on page 853. Control Scripts When output is generated from a template, Control Scripts run before all other scripts, when a record is merged with a context. They determine how different sections of the context are handled. They can, for example, make the page numbering continue over all Print sections, split Email attachments, or omit Print sections from the output.
When you open a data file or a database, the Data Model will be derived from it unless there already is an open data mapping configuration; in that case, the current data mapping configuration will try to retrieve data from the file or database, using its own Data Model and extraction logic. After opening a data mapping configuration or opening a data file or database, the Data Model pane at the right hand bottom shows the data fields that occur in the data.
a data mapping configuration you can, among other things: l l l l l Use Workflow to automate the extraction of data from this kind of data file. Load transactional or structured data. If there are detail lines, transactions, or any variable number of items to put into the template, you need a data mapping configuration to extract them. Format, transform, conditionally include/exclude and enhance data from the source file. Use other field types.
Note The ExtraData field that appears as the first field in each record and in each detail table is automatically added to the Data Model by the DataMapper. It offers the possibility to add extra data to existing data records in a Workflow process. The ExtraData field can be used in a template just like any other data field (see "Variable Data" on page 801). When it contains a JSON string, this value can be read with a script using JSON.parse().
Excel (XLS/XLSX) file options l l 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. Sheet: Only one sheet can be selected as the data source. l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the selected column has numbers, it will be sorted as a text.
l Encoding: Use the drop-down to select the encoding with which to read the data in the table. l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the selected column has numbers, it will be sorted as a text. XML File options Select what level of XML elements defines a record. The Trigger is what triggers the creation of a new record.
page.) All metadata fields that belong to the chosen level and higher levels in the tree structure will be listed. The lower the chosen level is in the tree structure, the more records you will get and the more metadata fields will appear in the list. Select metadata fields to add them to your data. Their property names will be used as field names in the Designer's data model.
MySQL 1. Enter the appropriate information to connect to the database: l l l l l Server: Enter the server address for the MySQL database. Port: Enter the port to communicate with the MySQL server. The default port is 3306. 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 MySQL server and specified database. The user only requires Read access to the database.
l Encoding: Use the drop-down to select the encoding with which to read the data in the table. l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the selected column has numbers, it will be sorted as a text. 3. Click Finish to open the database. SQL Server 1. Enter the appropriate information to connect to the database: l Server: Enter the server address for the SQLServer database.
2. Click Next and enter the information for the source table. l l l Connection string: Displays the full path to the database. Table: Use the drop-down to select the appropriate table or stored query to retrieve the appropriate data set. Encoding: Use the drop-down to select the encoding with which to read the data in the table. l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual.
l Encoding: Use the drop-down to select the encoding with which to read the data in the table. l Sort on: Select a field on which to sort the data, in ascending (A-Z) or descending (Z-A) order. Note that sorting is always textual. Even if the selected column has numbers, it will be sorted as a text. 3. Click Finish to open the database. Oracle 1. Enter the appropriate information to connect to the database: l Server: Enter the server address for the Oracle database.
Adding JSON data from a JSON file JSON data can either be added to, or replace the Data Model in a template. Importing JSON data into the Data Model makes it easier to test templates that are meant to be merged with JSON data in a Workflow configuration. Tip Workflow's OL Connect Create Content tasks can use JSON as their data source; see Create Email Content, Create Print Content, and Create Web Content.) To add data from a JSON file: 1. Select File > Add Data > JSON sample data, from the menu.
4. Select the Replace Data Model option if you want the JSON to replace the existing Data Model. Otherwise, the JSON data will be mapped to corresponding fields in the existing Data Model, and data that cannot be mapped to any field will be discarded. 5. Click Finish. Add a counter using the Generate Counter Wizard Generating a counter is useful for numbered tickets or any other template requiring sequential numbers but no variable data.
Tip While the Generate Counter script is really useful for things like raffle tickets, it's unusable in combination with a data file or database, as it cannot complement that data automatically. This can only be done with a script. A script that adds a counter to data, using the current record index to calculate the current counter value, can be found in this how-to: Manual counter in designer. Variable Data Variable data are data from a database or data file that are used to personalize documents.
1. Open the section you want to add the data field to. 2. Drag and drop a data field from the Data Model pane at the bottom right into the content of your template. To select and insert multiple data fields at the same time, press Shift or Ctrl, whilst selecting fields in the Data Model pane. What happens is that: o A placeholder for the value of the data field shows up in the text. It looks as follows: @FIELDNAME@. o A text script appears in the Scripts pane at the bottom left.
Tip Press the Alt key while dragging, to wrap the placeholder in a span, give the span an ID and have that ID used as the script's selector. Press the Ctrl key while dragging, to wrap the placeholder in an absolute positioned box (a div) at the cursor position. A unique ID is assigned to the box and used as the script's selector. This method is particularly useful when the document mainly consists of a PDF used as the background image of a section (see "Using a PDF file as background image" on page 492).
l Select a word in the content. Right-click the selection and on the shortcut menu, choose Text Script. The Text Script Wizard appears. 2. Change the name of the script to make clear what it does. Note Scripts can only have the same name when they are not in the same folder. 3. The selector states the text to be found in the template. The results can be replaced by the script. Tip Hover over the name of a script in the Scripts pane to highlight parts of the template that are affected by the script.
l An HTML/CSS selector: n HTML elements, such as a paragraph. In the Text Script Wizard, click Selector and type the HTML tag without the angle brackets, for example: p. n HTML elements with a specific class. In the Text Script Wizard, click Selector and type the class name, including the preceding dot, for example: p.green for all paragraphs with the class 'green' or .green for all kinds of HTML elements that have the class 'green'.
pointing arrow and select one of the formats. For an explanation of the formats see "Formatting variable data" on page 807. 7. Add as many data fields as you need, following the same procedure. 8. Optionally, you can click Options to specify where and how the script inserts its results: l l l As HTML. HTML elements in the results are processed and displayed as HTML elements. For instance, this is bold will be displayed as this is bold. This is the default setting. As text.
of the content to move up or down. If, in a Print context, you don't want the result of the script to be part of the text flow (for example, when a letter is going to be sent in an envelope with a window), put the placeholder for the script in a positioned box (see "Boxes" on page 692 and "How to position elements" on page 758). Tip l l An example of how to create an address block using the Text Script Wizard is described in a how-to; see How to create an Address Block.
Date Dates in variable data can be displayed as long, medium and short dates with different time displays. There are quite a few presets, but you can also enter a custom format mask. 1. Open the Text Script Wizard: double-click to open an existing script in the Scripts pane or create a new Text Script using the Text Script Wizard; see "Using the Text Script Wizard" on page 803. 2. Click a data field that contains text, or add such a data field to the script with the Add field button on the right. 3.
l l l l Long Time displays a time in hours, minutes and seconds in two digits each, and adds a time zone, for example 00:00:00 EDT. Short Date/Time displays the date as a short date and the time as a short time, for example 01.04.16 00:00. Medium Date/Time displays the date as a medium date and the time as a medium time, for example 01.04.2016 00:00:00 (This is also the value of the Default Date/Time.) Long Date/Time displays the date as a medium date and the time as a medium time, for example 1.
2. Click the data field that contains the numeric value that you want to display differently, or add the data field to the script with the Add field button on the right. 3. Under Format choose one of the following settings: l l l l l l l Custom Pattern: allows you to enter a custom format mask. For example, the pattern 000000 means that the number should count six digits; leading zeros are added to numbers shorter than six digits.
Showing or hiding elements using the Conditional Content Script wizard 1. Right-click the element and click Make Conditional. Alternatively click the black triangle on the New button on the Scripts pane at the bottom left of the window, and click Conditional Content Script. The Conditional Content Script wizard opens. 2. Rename the script so that it reflects what the script does. Note Scripts can only have the same name when they are not in the same folder. 3. Type a Selector.
The selected action will be performed if the condition evaluates to true with one of the given values. If, conversely, the condition evaluates to false, and the option Toggle Visibility is checked, the opposite action will be performed. Note If you need more complex conditions, click Expand and edit the code of the script. See "Writing your own scripts" on page 853. 9. Click Apply or OK. 10.
1. Select the part of the text that you want to make conditional. 2. Right-click the selected text and click Wrap in span. 3. Type an ID and/or a class. An ID is fine if this is the only thing that should be shown or hidden on a given condition. Use a class if there is more that should be shown or hidden on the same condition. 4. Start creating a conditional content script from the Scripts pane. Use the ID or class as the selector of the script.
print or skip a section only for customers living in Québec. With these values: Québec Ontario the section will be printed if the Province field reads Québec OR Ontario. Note More complex conditions can be written in the Script Editor: click Expand and edit the code of the script. See "Control Scripts" on page 885. 8. Click Apply or OK. 9. To see the result, toggle to the Preview tab at the bottom of the workspace (or select View > Preview View on the menu).
1. Add one image to the template. See "Adding images" on page 726. 2. Right-click the image and click Dynamic Image. Or select the image and click Source (not the field, but the label before the field) in the Attributes pane. The Dynamic Image Script Wizard opens. The image's ID is used as the script's selector. If the image did not have an ID, it is automatically generated. 3. Select the location of the files: l l l Select Resources if the images reside in the Images folder on the Resources pane.
this how-to: Dynamic signatures. How to insert dynamic images if there are no data fields with the actual names of the images is described in another how-to: Dynamic image that doesn't contain the data field value. Note An image with an unknown file extension is represented by a red cross in the output, but no error is logged unless the image refers to a local file that does not exist on disk.
l l l One or more data fields contain values on the basis of which the PDFs can be switched. There is an appropriate PDF for each case. It is important that the PDFs are named after the various possible values of the related data field. All PDFs are stored in one folder (the Images folder on the Resources pane, or an external folder). Otherwise, adding a dynamic background requires a self-made script (for help on this, see "Control Script: Setting a Print section's background" on page 893).
Select the data field to be evaluated. If you want the file name to be composed of the value of several data fields, simply click in the next row or click the Add button. This adds a row. Note that the rows will be concatenated to compose one file name. Only the last suffix should contain the file extension (.pdf). 5. Click Apply or OK. The script assigns the resulting file name, including the path and file extension, to the URL of the section's background. 6.
1. Open the Insert Detail Table dialog. There are several ways to do that: l Drag the data field that contains the name of the detail table into the template. l On the menu select Insert > Table > Detail. l On the toolbar, click the Insert detail table button. 2. Enter the table's desired attributes: l l l ID: A unique identifier for the table. IDs are used to access the table from scripts and as CSS selectors for style rules. Class: A class identifier for the table.
content at the selected location would produce invalid HTML the final result may be different than expected. For example, when you insert a Div into a paragraph, the paragraph gets split in two. This means you end up with two paragraphs with the Div in between. 3. Click Next and select which fields should show up in the Detail Table. The order of the fields indicates in which order columns are displayed in the Detail Table, from left to right.
Adding a row to the header or footer of a Detail Table Sometimes you'll want to add one or more rows to the header or footer of a Detail Table: to add taxes and/or the total of the invoice to the table, for example, or to add a custom message. A header or footer row can be added to a Detail Table as follows. 1. In the workspace, open the Design tab. 2. If the table already has a header/footer: a.
Styling a Detail Table The Insert Detail Table wizard lets you select a style, but if you want to apply a different style to the table, choose No Style when creating the table. Then the style of a Detail Table is completely customizable: you can change the font, font size and color, the borders, the cell padding (the distance between the edge of the cell and its content), and the background color or image of the table and its cells. See "Styling a table" on page 762.
output they might end up on a next page without any other visible content, which would still be printed because lines and paragraphs must be treated as content, even when they are empty. Hiding an empty Detail Table The number of rows in a Detail Table is variable, as it depends on a detail table in the data. You might want the Detail Table to be hidden when there are no data to display. There are two ways to achieve that. l l When creating a Detail Table, you can check the option Hide when empty.
l l data-breakable: this attribute is added to every copied row (in preview mode or when creating output), in each of them with a unique ID as its value. This is required by the pagination routines of Connect to split the table across pages. data-column-resize, if present, indicates that the columns may be resized (datacolumn-resize=""). Personalized URL Personalized URLs (pURLs) are links that are tailor-made for a specific purpose, generally for individual clients.
Secondly, the pURL must contain the data that Workflow needs in order to create the personalized response (be it a web page or other file). For instance, creating a personalized page that shows a client's invoice may require the Invoice Number to be present in the pURL, which is then used by Workflow to retrieve the invoice data, generate the invoice in PDF or HTML format using a template, and then return it to the browser. The data needs to be included in the URL. In this URL, for example: http://www.
5. Type the code that wraps the span in a element (a hyperlink). In the link, the host should be followed by the action with which the corresponding Workflow process is triggered and the data with which Workflow will be able to create a personalized response. Sample script Let's assume: l l l A Workflow process is triggered by the HTTP action: MakePDF. The template that outputs the pURL is to be merged with a record that contains a data field invoice_UUID.
General preferences The General Preferences are as follows: l Always run in background: This option correlates with the "Always run in background" option selectable in the "Document Boundaries Refresh" dialog and "Print via Print Server" dialog. When either of these dialogs is used and the option is checked, it will also be checked here. To prevent the refresh boundaries and print via print server dialogs to automatically run as background, uncheck this option.
------------------------------------------------------------------------------------------ Clean-up Service preferences The Clean-up Service defines how the Connect database and the temporary files created during Connect production runs are cleaned up after the production run has finished. As part of the job production process PlanetPress Connect uses a database for intermediate storage and also creates various temporary "managed" files.
l l Run at application start up: Click to start the clean-up service when the Designer module is opened, or the Managing Service is started. Run according to the cron schedule: Enter the interval at which the Clean-up service runs. To understand how to write a cron job schedule, please refer to the Quartz Scheduler tutorial. Note If the Product managing the service is set to Designer, then the Designer must be running at the time that the cron job is scheduled, for the Clean-up to run.
running both clean-up and production jobs simultaneously. If experience suggests that the clean-up is not running efficiently, then upping the number of threads here would be recommended. Conversely, if production appears to be suffering courtesy of the clean-up process, then reduce the number of threads here. In general, higher end machines (those with multiple cores) will allow a higher numbers of threads, whilst low end machines will perform better with a lower number of threads.
all the content items it contains) is retained within the database before being set for deletion. l l l l Minimum time to retain Managed Files: The minimum time file references (to files such as data mapping configurations and templates) are retained within the database before being set for deletion.
DataMapper preferences DataMapper XML l Display New Line Character as ¶ : Check to show line returns as ¶ in the Data Viewer, when XML files are shown. If the option is unchecked, you will not see spaces and line returns after element names in the Data Viewer. Default Format DataMapper stores user preferences for the Date, Number and Currency formats. By default, the user preferences are set to the system preferences.
Database Connection preferences Dialog used to change the PlanetPress Connect back-end Database. This dialog supports the swapping of the back-end database between various vendor databases. Note, however, that the alternate vendor database(s) must already be installed and available in order to swap to them. This is not a migration tool. It is a simple connection tool, that enables shifting to a different back-end database.
l Database Instance Name: Enter an existing Microsoft SQL Server's instance name. This option only applies to existing Microsoft SQL Server instances, and not for MySQL. l Port: Enter Port number. The defaults are those which the vendors use by default. l Schema: The individual database schema, within the vendor database. Note If a previously non-existent schema were chosen here, then a new schema of that name will be created within the database when the back-end database swap is applied.
l Custom database parameters table: These are extra parameters which are appended to the database connection URL. The default values are those which have been determined to be useful in connecting to specific vendor databases. For example, in order to use Integrated Authentication with Windows, specify the property integratedAuthentication with the value true, which adds integratedAuthentication=true to the URL. l Property: These are free field text fields.
Editing preferences These preferences define different editing options in the Designer module. l l Object Resizing for
elements: This defines in which contexts to enable the resizing of
elements (including Positioned and Inline boxes). Resizing
elements may cause layouts to produce undesirable results especially when using Foundation templates. l Enable for Print Context: Check to enable
resizing in the Print contexts.
l l l Expanded: This is the default output style. Each property and rule take up one line. Properties are indented within the rules, but the rules aren't indented in any special way. Nested: Each property has its own line, but the indentation isn't constant. Each rule is indented based on how deeply an element is nested in the HTML and CSS structure. Auto compile on saving .scss files: When this option is checked, a .scss file is compiled into a .
l l l l l l Shared Content: This color highlights shared content, such as shared snippets; see "Snippets" on page 737. Guides: This is the color for rulers that can help position content correctly; see "Guides" on page 760. Margins: This color delineates the content area on a page; see "Pages" on page 497. Bleed box: This color delineates the printable area on a page; see "Page settings: size, margins and bleed" on page 498.
Email preferences Email (General) preferences l Default From Group: l l l Name: Enter the name that is set by default in the "From name" field in the Send Email and Send Test Email dialogs ("Send (Test) Email" on page 991). 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 991).
Service Provider (ESP): Mandrilapp.com, Sendgrid and Mailgun (see "Using an ESP with PlanetPress Connect" on page 1442). l Apply: Apply the new settings without closing the Preferences dialog. The Email preferences also provides you with buttons to : l l Restore Defaults. This option restores the preferences to Defaults. This applies to the current Preferences page only, but not other Preferences.
l l Upgrade web editors: This Emmet option doesn't affect how Emmet works in Connect Designer. 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.
Emmet Output preferences The Output Preferences dialog is used to control how the expanded (output) code behaves when expanding abbreviations and snippets. There are 6 different dialogs to control output and, 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.
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}.
1. Connect user wanting to create digital signatures using a secure device have to configure the DLL for using the secure device, so Connect can find the DLL when a digital signature is necessary. 2. The Connect administrator wanting the configuration of DLLs loaded by Connect Server, Designer, and their engines to happen outside of Presets, Templates, or other resources.
Default Locale The Default Locale preferences are only available in the Designer Preferences. This setting determines the locale for new templates. By default this is the system's locale. Select System Locale to use the operating system's locale settings.Select Explicit Locale to choose a specific locale from the drop-down Explicit Locale list.The Locale can be changed on a per template basis. See "Locale" on page 782.
Warning Higher logging settings will have an impact upon Connect production speeds, as well as leading to substantially larger log files. We recommended leaving the logging level to Info and only using the higher levels of logging in conjunction with advice from OL support. l Rollover policy selection: Chose whether to retain Connect log files for a certain number of days (Daily logs) or based upon some predetermined hard disk usage limitations (Size-based logs).
Warning We recommend leaving the Logging pattern to the default value. If you do need to change the Logging pattern, please see the Pattern Formatting guide for help in doing so. l Log message preview display: This displays a real time example of the format and content of individual log file entries, based upon the Logging pattern setting. Advanced settings The Advanced settings over-ride the Overall logging settings, and provide a greater level of logging granularity.
Parallel Processing preferences See "Parallel Processing preferences" on page 133. ------------------------------------------------------------------------------------------ Print preferences Available Printers preferences The Available Printers preferences control which printer definitions are available when generating print output or creating Output Presets.
l l l Username: Enter the username to authenticate to the Print Server. Default is ol-admin. This is set on the server's "Security Settings" on page 141. Password: Enter the password to authenticate to the Print Server. Default is secret. Confirm Password: Re-enter the password above. Print Measurements preferences l l Units: Use the drop-down to specify the default measurements system used for dimensions of the template and boxes. In addition it defines the coordinates/position of box elements.
page, Workflow may be unable to correctly interpret all the characters that are used in the configuration file (in path or file names, for example). To prevent this, you may select an encoding from the list.
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. ------------------------------------------------------------------------------------------ Scripting preferences The Scripting preferences define different options related to scripting within PlanetPress Connect.
Web preferences Web Form preferences These preferences define the default behavior of some form elements.
l Workflow URL: The default URL is: http://127.0.0.1:8080/_ getSampleFormData_ The Web preferences also provides you with buttons to : 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.
Control Scripts When output is generated from a template, Control Scripts run before all other scripts, when a record is merged with a context. They determine how different sections of the context are handled. They can, for example, make the page numbering continue over all Print sections, split Email attachments, or omit Print sections from the output.
Tip Content added by a script isn't visible in Design mode, but is visible and can be inspected in Preview mode. Post Pagination Scripts Post Pagination Scripts are run in a Print context after the content has been paginated. Because they can search through the output of all Print sections, and modify Print sections (one at a time), they may be used to create a Table Of Contents (TOC), as explained in the topic: "Creating a Table Of Contents" on page 902.
l l A selector (HTML/CSS): n HTML elements of a certain type, such as a paragraph:
. In the Script Wizard, click Selector and type the HTML tag in the Selector field without the angle brackets: p. n HTML elements with a specific CSS class (eg. green). In the Script Wizard, click Selector and type the class name in the Selector field , preceded by a dot: .green. n An HTML element with a specific ID (eg. intro).
Writing a script 1. Create a new script (see: "Creating a new Standard Script" on page 855, " Adding a Control Script" on page 886 or "Adding a Post Pagination Script" on page 901), or double-click an existing script in the Scripts pane on the bottom left. If the script was made with a Script Wizard, you have to click the Expand button before you can start writing code. This will change the Script Wizard into an editor window.
Two basic code examples Writing a script generally comes down to modifying the piece(s) of content collected from the template with the script's selector, using values, or depending on values of the record that is being merged to the template at the moment the script runs. Modifying the template To access and change the results of the query that is carried out with the selector (in other words: to modify the output), use the object results.
Tip For more examples of using conditions, see this how-to: Combining record-based conditions. If an expanded script contains errors or if there are warnings, icons appear in the overview ruler on the right hand side of the editing area. These icons are shown relative to their position in the script and do not move as you scroll down. You can click on an icon to quickly jump to the error or warning. Script errors are highlighted by a red icon, and warnings in yellow.
They can not be excluded from execution for a specific context or section, using the execution scope of a folder; see "Execution scope" on the next page. What you can do is disable the script or the containing folder; see "Enable/disable scripts" on the next page. Script folders Scripts can be organized in folders. Why would you do that? For three reasons: l l l Folders have an execution scope. You can specify for which contexts and sections the scripts in a folder have to run.
execution scope of a folder; see "Execution scope" below. What you can do is disable the script or the containing folder; see "Enable/disable scripts" below. Execution scope A particular script may be used in one context or section, but not in other contexts or sections.
To enable or disable a script or a folder: l On the Scripts pane, right-click the script or the folder and click Disable (if the script or folder was enabled) or Enable (if the script or folder was disabled). Tip For more ways to optimize scripts, see "Optimizing scripts" on page 867. Import/export scripts The easiest way to import scripts into another template is to open the template and use the Import Resources dialog; see "Import Resources dialog" on page 942.
You can even do this while creating a new script, either with a Script Wizard or in the expanded script editor. Click Apply at the bottom of the script editor to see the effect of the script on the Preview tab of the Designer. Note that scripts that use values of data fields can only be effective when a data file or data mapping configuration is open. See "Loading data" on page 788. Note Post Pagination Scripts run only when a Print section is previewed or outputted.
executed, assuming the script is enabled. l l The warning icon (!) appears, for example, when a script refers to an unknown field in the record set, or when ; is missing after a statement. The error icon (x) displays when the script results in an error, for example, when it uses an undeclared variable. If an expanded script contains errors or if there are warnings, icons appear in the overview ruler on the right hand side of the editing area.
Note An image with an unknown file extension is represented by a red cross in the output, but no error is logged unless the image refers to a local file that does not exist on disk. Image file extensions that the software recognizes are: AFP, BMP, EPS, GIF, JPG/JPEG, PCL, PDF, PNG, PS, SVG, and TIF/TIFF. Using the Script Debugger The Designer's Script Debugger allows you to set breakpoints in scripts and step through them.
After running the Script Profiler you can see in which sections the script has run: l Hover the mouse over a value in the column Count to see the number of times that the script has run, per section. You can also see the breakdown of the execution time across different execution stages: l l Hover the mouse over a value in the column Elapsed to see the time elapsed (in milliseconds) since the start of the session.
Script Profiler settings Number of runs By default, the Script Profiler runs on 1000 instances of all the scripts. To test on a higher or lower number of instances: 1. On the menu, select Window > Preferences. 2. Click Scripting. 3. Set a number of iterations (maximum one billion) and click OK. Sorting In the Scripts Profiler, the scripts are by default sorted based on the values in the Elapsed column, from high to low. Click any of the columns to sort the scripts according to the values in that column.
This topic presents a number of other ways to speed up script execution by optimizing the scripts. Use an ID as selector Scripts (except Control Scripts) start with a query. The selector in the second column in the Scripts pane is what a script looks for in the template. If you've used the drag-and-drop method (without pressing the Alt or Ctrl key) to insert a data field in a template, the selector is a small text: the name of the data field surrounded by @ signs, @firstname@ for example.
Try avoiding DOM modifications, especially within loops. Storing the content in a variable and appending the information after the loop is more efficient: this way, the template will be touched only once. Example The following example loads a snippet into a variable and uses the find() and text() commands of the Designer scripting API. var labelElm = loadhtml('snippets/label.html'); for(var i = 0; i < record.tables.products.length; i++) { var label = labelElm.clone(); label.find('@ProductLabel@').
A QueryResult allows you to perform DOM manipulations like adding and removing elements, adding and removing CSS classes etc. When the required manipulations are limited to find/replace actions, you could change the QueryResult into a string. This allows you to replace text using the replace() method. For this, you could use toString(): var labelSnippet = loadhtml('snippets/label.html').toString(); Or you could copy the HTML of the QueryResults to a variable: var block = results.
In this example, @product@ is a pattern (to be used in a search) and g is a modifier (to find all matches rather than stopping after the first match). For more information about possible regular expressions, see https://www.w3schools.com/js/js_regexp.asp. The script in this how-to: Translate and replace script uses the replace() method with a regular expression.
block = block.replace('@customercode@', data.customercode); … results.html(block); The first line retrieves the HTML of the promo block and stores it in a variable called block. To make the code more readible, the fields from the record are stored in a variable named data. After replacing the placeholders by values, the script replaces the HTML of the promoblock with the personalized string. Other resources There are also many resources online to help learn about JavaScript performance and coding mistakes.
l l Drag a snippet into the script window. The function that loads the script loadhtml() or loadjson(), depending on the file type - will automatically be added, including the file name. Right-click a snippet and select Copy Resource Location to copy the relative path of the snippet to the clipboard. It may then be pasted into a script. Remote snippets are retrieved in the same way, except that the file extension should be .rhtml instead of .html. If it is a remote JSON snippet, the file extension is .
Loading part of a snippet, based on the value of a data field When a snippet contains a part that can be identified by a selector, that selector can be used to load that part of the snippet into a template. It is possible to do this, based on the value of the data field. This is easiest when the selector matches the value of a data field. Example The following script reads the value of the LANGUAGE field in the record and uses that value as the selector in the function loadhtml().
Loading content using a server's API Content in a template is usually static (apart from being personalized) and part of the main text flow. It can also be located in a snippet (see "Snippets" on page 737). It is also possible to include content that is served by another server. Many servers provide an API to fetch publicly available content from their site. That content may even be dynamic: the most recent blog posts on a Wordpress website, for example, or the current weather forecast for a certain city.
Note that interactive content, such as an interactive map, can only be used in Web templates, and cannot be output on Print or Email contexts (even though they will show up in Preview mode!). Step 3: Writing a script The final step is to write a script that retrieves the content and inserts it into the template (see "Writing your own scripts" on page 853). Use the element or the ID of the element that you added in Step 2 as the script's selector.
Inserting content in the template To insert the content after the selected element, use results.after(). To replace the element with the new content, use results.html() or results.replaceWith(). Example: recent posts The following script loads five posts from Mozilla's blog and inserts their titles as links in a template. Mozilla's blog is a WordPress website.
First all Control Scripts are executed, in the order in which they appear in the Scripts pane. Control scripts don't touch the content of the sections themselves, but they change the way a template is outputted, for example by selecting or omitting sections from the output (see "Control Scripts" on page 885). Then the Standard scripts are executed, once for each section, in the order in which they appear in the Scripts pane. Standard scripts can change the contents of the current section in a template.
"Personalizing content" on page 786 and "Writing your own scripts" on page 853). Using selectors for scripting can increase the speed with which a template and data are merged; see "Use an ID as selector" on page 868. Standard CSS selectors l l l l l l Selectors are made up of one or more of the following components: An HTML element. Type the HTML tag without the angle brackets (e.g. p) to select all elements of that type (pselects all paragraphs). A class. Type the class name, preceded by a dot, e.g.
Warning Avoid using classes with the __ol prefix in your selectors. These dynamically added class names may change in future releases of the software. Section selector The Designer writes the name of each section to the section attribute of the element. This attribute can be used in selectors.
Master Page selector The Designer writes the name of each Master Page to the masterpage attribute of the element. This attribute can be used in selectors. Example This rule adds a box to the body of every Master Page. [masterpage] body results.html('
Hello World
'); The following rule adds the box only to the Master Page called "Master Page 1". [masterpage="Master page 1"] body results.
.frontside h1 { color: green; } The next style rule is a bit more specific: it colors
elements on a Master Page when that Master Page is applied to the front of a sheet in Section 1: [section='Section 1'] .frontside h1 { color: green; } The following rule hides elements on the back of a sheet on which no content (from the main text) is allowed. .backside.nocontentpage .
3. Master Page elements Using the .page_mediabox selector, you could change this stacking order and place the section background on top of the elements on the Master Page. Set the z-index property to a value larger than 0 (zero) and add !important to make this style rule override the inline style declaration that normally puts the section background behind the Master Page elements: .page_mediabox img.
document. .DESIGN .address-block { outline: 1px dashed purple; } Adding a background pattern The Postcard template wizard (in the Basic Print templates group) uses the .DESIGN class to mark areas that are reserved for postal use and should not contain text or images. These areas were added to the Master Page as absolute positioned boxes that have been given the class clearzone. The following style rule assigns a background pattern to elements with that class in the Design view: .DESIGN .
Control Scripts When output is generated from a template, Control Scripts run before all other scripts, when a record is merged with a context. They determine how different sections of the context are handled. They can, for example, make the page numbering continue over all Print sections, split Email attachments, or omit Print sections from the output. Some knowledge of JavaScript is needed to edit Control Scripts, just as for any other self-made scripts; see "Writing your own scripts" on page 853.
Adding a Control Script To add a Control Script: 1. On the Scripts pane at the bottom left, click the black triangle on the New button and click Control Script. A new script appears in the list. 2. Double-click the new script to open it. The script editor appears. 3. Change the name of the script so that it reflects what the script does. Note Scripts can only have the same name when they are not in the same folder. 4. Write the script; see the "Control Script API" on page 1351.
Task See topic Field/function of section object Change the page numbering of Print sections "Control Script: Page numbering" on the facing page restartPageNumbering Set the background image of a Print section "Control Script: Setting a Print section's background" on page 893 background.source, background.url, background.
Task See topic Field/function of section object Set the margins of a Print section or Master Page "Setting the margins of a Print section" on page 1403 margins Set a Master Page, Media, or Duplex printing for a Print section "sheetConfig" on page 1373 sheetConfig Control Script: Page numbering This topic explains how to write a Control Script that changes the page numbering in Print sections.
Tip If you are looking to create a short, simple table of contents in one section, you could add a Standard Script that uses the pageRef() function. For an example, see "Creating a table of contents" on page 1317. For a multi-page, cross-section table of contents you must use a Post Pagination Script; see "Creating a Table Of Contents" on page 902.
Disabled section When a section is disabled, it will not be outputted, but its restartPageNumber flag will still be taken into account for composing the page number sequences. So, if the restartPageNumber flags are set as follows: 1. Section A (1 page) restartPageNumber = true 2. Section B (2 pages) restartPageNumber = false 3. Section C (3 pages) restartPageNumber = true, enabled = false 4. Section D (4 pages) restartPageNumber = false In code: if (merge.context.type == ContextType.PRINT) { merge.context.
Defining parts Defining parts is done by setting the part field on a section, for example: merge.template.contexts.PRINT.sections['Section 2'].part = "PDF_Attachment2";. (Also see "section" on page 1395 and "Control Script API" on page 1351.) l l If a part name is given, then that delimits the start of a new part (even if the part name is the same as the previous one). Following sections that don't define a part name, will be added to the previous part.
Note For Web sections, a part always consists of only the given section. Web pages cannot be appended to form a single part. It is however possible to attach multiple Web pages to one email; see the following example. Controlling multiple Email attachments The following script attaches the following sections to an email: l Print section 3 + 4 as attachment with continued page numbers l Print section 6 as separate attachment l Web sections A and B as separate attachments if (channel == Channel.
Control Script: Setting a Print section's background In the Print context, a PDF file can be used as a Print section's background; see "Using a PDF file as background image" on page 492. If you want the section background to be switched automatically, depending on the value of a data field, you need a Control Script. There is a Script Wizard that can generate that script for you, provided that certain conditions are met; see: "Dynamic Print section backgrounds" on page 816.
var resourceUrl = 'images/policy-' + record.fields.policy + '.pdf'; merge.template.contexts.PRINT.sections['Policy'].background.url = resourceUrl; Note An image with an unknown file extension is represented by a red cross in the output, but no error is logged unless the image refers to a local file that does not exist on disk. Image file extensions that the software recognizes are: AFP, BMP, EPS, GIF, JPG/JPEG, PCL, PDF, PNG, PS, SVG, and TIF/TIFF.
Tip You could use the resource() function to check the number of pages or for example the page height and width before setting it as a background (see "resource()" on page 1360). Example This scripts sets a background on a Print section using absolute positioning. var activeSection = merge.template.contexts.PRINT.sections['Section 1']; activeSection.background.source = BackgroundResource.RESOURCE_PDF; activeSection.background.url = "images/somepage.pdf"; activeSection.background.position = MediaPosition.
var printSections = merge.template.contexts.PRINT.sections; var clone = printSections["Section 1"].clone(); printSections["Section 1"].addAfter(clone); Cloned sections have the same properties as normal sections, but they cannot call section functions. Note that with multiple clones, the next clone is always added after the previous clone. With addBefore(), the code original.addBeforeclone1); original.addBefore(clone2); will result in "clone1, clone2, original". With addAfter() the code original.
[section="my_section_clone_0"] h1 { color: red; } [section="my_section_clone_1"] h1 { color: green; } [section="my_section_clone_2"] h1 { color: blue; } The same selector could be used in personalization scripts: Selector: [section="my_section_clone_0"] h1 Script: results.css('color','red'); Inside a Standard Script, cloned sections can be found using merge.section: if (merge.section == "my_section_clone_0") { results.html("Clone!"); } else { results.html("Original.
if(record.fields.policy_a == 1) { addPolicy('a'); } if(record.fields.policy_b == 1) { addPolicy('b'); } function addPolicy(policy){ var resourceUrl = 'images/policy-' + policy + '.pdf'; var clone = printSections["Policy"].clone(); clone.name = "policy_" + policy; clone.background.url = resourceUrl; clone.enabled = true; printSections["Policy"].addAfter(clone); } Control Script: Securing PDF attachments The Print context can be attached to an email in the form of a PDF file and secured with a password.
When producing a single attachment, the password(s) should be set on the first Print section. When producing multiple attachments, it should be set on the first section of each part. Password types PDF allows for two types of passwords to be set on a secured PDF file: a user password and owner password. The user password allows a limited access to the file (e.g. printing or copying text from the PDF is not allowed). The owner password allows normal access to the file.
} } Post Pagination Scripts Post Pagination Scripts are run in a Print context after the content has been paginated. Because they can search through the output of all Print sections, and modify Print sections (one at a time), they may be used to create a Table Of Contents (TOC), as explained in the topic: "Creating a Table Of Contents" on page 902. This topic explains what a Post Pagination Script is and how to add it to a template.
What to use a Post Pagination Script for After all Print sections have been paginated, Post Pagination Scripts may search through the rendered document and collect information about elements (for instance, which page they reside on) and sections (for instance, whether they are enabled). With this information, a Post Pagination Script can do two things: l l Modify the output. The script may modify the output of a section.
Note Post Pagination Scripts run only when a Print section is previewed or outputted. To verify the results of Post Pagination Scripts on a certain Master Page, preview the Print section to which that Master Page is applied. Creating a Table Of Contents This topic explains how to create a multi-page, cross-section Table Of Contents (TOC) using a Post Pagination Script. For information about Post Pagination Scripts in general, see "Post Pagination Scripts" on page 900.
// Build the TOC var toc = ''; merge.context.query("h1, h2").each(function() { var pageNo = this.info().pageNo; var text = this.text(); var level = this.tagName(); toc toc toc toc += += += += '
'; '' + text + ''; ''; '' + pageNo + '
'; }); results.html( toc ); // Repaginate the result merge.section.paginate(); // Update the page numbers var $numbers = query('.number'); merge.context.
Note that the info() function can also be used to get an element's sheet number, the section it is located in, and the total page count and sheet count of that section (see "PaginationInfo" on page 1388 and "info()" on page 1393). In this case only the page number is used. Then the callback function adds an entry to the variable that holds the table of contents, using the retrieved info.
merge.context.query("h1, h2"). The callback function in each() retrieves the heading's new page number. It then uses the index number of the heading in the result set to get the corresponding entry in the TOC: var entry = $numbers.get( index ); (see "get(index)" on page 1313), and replaces it with the new page number. Excluding headings Often there are certain headings that you don't want to appear in the table of contents. The title of the table of contents itself, for example.
This code takes the element's ID. If an element doesn't have an ID, the script generates a new, unique ID for it. 3. Replace the line: toc += '' + text + ''; with this line: toc += '' + text + ''; The new line adds a hyperlink: with the element's ID to the table of contents.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . "; } p.toc-entry .number { flex-shrink: 1; text-align: right; font-weight: bold; } These styles make use of the CSS Flexbox Layout Module. For more information about that, see W3schools: CSS Flexbox. Translating templates OL Connect has a built-in feature to automatically generate output and previews from one template in different languages, and to pluralize certain words in the output.
These file types are widely used in translation software, so you can team up with a professional translator or translation agency to translate your templates, or you can do it yourself using a free online tool, such as the Poedit software. Other ways to translate a template The built-in translation feature is easy to use for labels and short texts in for instance invoices, web forms, transaction email messages, and pack lists.
Translating content that is inserted by a script Personalization scripts may add content to the output. OL Connect will apply translations to that content at the moment it is added to the template, for example with the html() or replaceWith() function. Translations are applied if that content is marked for translation, and if there is a matching translation entry (see "Tagging text that is inserted by a script" on page 911).
Note Changing the text in a tagged element will break the relationship with the translation entry. This means that the text will not be translated. Edit the entry in the Translations pane or use the Sync button on the "Translations pane" on page 1048 to restore the connection. Same text, different translation Should the same text be translated differently in different locations? Then you need to add a 'context' to the translation entry: 1.
Tagging text that is inserted by a script OL Connect will also apply translations to content that is inserted by personalization scripts, but only if that content is marked for translation, and if there is a matching translation entry. 1. On the Translations pane, click on the New Empty String button to create the translation entry. 2. Make sure that any element in which the text is inserted, are tagged for translation.
One way to avoid this is to split the text around and inside HTML tags into separate chunks, no matter how short. Select the respective text in the template and select Wrap in Span from the contextual menu. Subsequently tag the new element for translation. Alternatively you could also add a comment explaining that the HTML tag should not be changed. To add a comment, simply double-click the entry in the Translations pane and enter your comment in the Comments field.
1. Double-click the respective entry on the Translations pane. 2. Check the Pluralization option. 3. Select the data field that holds the number. Note Pluralization cannot be based on a data field in a detail table. 4. Now there are two possibilities: l l Click OK. Proceed with the translation process after you've created all translation entries and enabled pluralization as needed. For further instructions see "Translating templates" on page 907. Enter the singular and plural and click OK.
Tip Translation tools are capable of combining .pot files. Combining .pot files may also result in .po files that contain translations for entries in multiple templates. This can be an interesting feature, especially when there are multiple templates in a project, as this eliminates the need to maintain individual .po files for each template. For information about the translation process, see "Translating templates" on page 907. Exporting a file for translation (.pot) A .
Updating an imported .po file OL Connect Designer monitors the .po file on disk (in the folder from which it was last imported) for changes. When a .po file on disk has changed, the respective .po file in the template gets a small asterisk behind its name. Right-click the file in the Translations folder and select Update from the contextual menu to import the latest changes. Using a remote .po file In order to use a remote .po file, you must add the URL to the Translations folder on the Resources pane. 1.
l "Styles pane" on page 1047 l "Translations pane" on page 1048 l "Workspace" on page 1049 (Source, Design and Preview tabs) l "Data Model pane" on page 1031 l "Scripts pane" on page 1044 l "Preflight Results and Messages" on page 1034 Dialogs Dialogs can allow you to perform a command or make settings. They can also ask you a question or provide you with information or progress feedback.
Attachments dialog The Attachments dialog lets you add and remove static Email attachments. For more information about email attachments, see: "Email attachments" on page 537. l l l Add: Click this button to open the Select File dialog (see below). Delete: Deletes the file from the list of attachments. It doesn't remove any files from the template's resources.
and their location should be accessible from the machine on which the template's output is produced. External files are updated (retrieved) at the time the output is generated. Bar Chart Properties dialog The Bar Chart dialog appears when a Bar Chart object is right-clicked and the Chart... option is clicked. It determines how the Bar Chart is displayed in output and in Preview mode (see "Business graphics" on page 696).
property; see: fontFamily.) l l l Size: Enter the size of the font. Defaults to 11. (Equivalent to the fontSize property; see: fontSize.) Color: Select the color in which to display text: click the colored square to open the Color Picker dialog ("Color Picker" on page 931), or enter a valid hexademical color (HTML Hex Color) or a predefined CSS color (CSS color names). (Equivalent to the color property; see: color.) 3D Group: Creates a 3D effect if both settings in this group are higher than 0.
property; see: titleFontSize.) l Grid group: l l l Opacity: Enter the opacity percentage of the grid. Default is 15%. 100 is fully opaque, 0 is transparent. (Equivalent to the gridAlpha property; see: gridAlpha.) l Thickness: Enter a thickness for the grid lines. Default is 1. (Equivalent to the gridThickness property; see: gridThickness.) l Tick Length: Length of the tick marks. (Equivalent to the tickLength property; see: tickLength.
in rotated charts. (Equivalent to the labelsEnabled property of the ValueAxis ; see: labelsEnabled.) l Frequency: Defines per how many grid lines a label will be placed. (Equivalent to the labelFrequency property of the ValueAxis ; see: labelFrequency.) Category Axis tab Settings on the Category Axis tab correspond to properties of the CategoryAxis class in the amCharts library; see: CategoryAxis.
names). (Equivalent to the gridColor property; see: gridColor.) l l l Opacity: Enter the opacity percentage of the grid. Default is 15%. 100 is fully opaque, 0 is transparent. (Equivalent to the gridAlpha property; see: gridAlpha.) Thickness: Enter a thickness for the grid lines. Default is 1. (Equivalent to the gridThickness property; see: gridThickness.) Position: Specifies if a grid line is placed on the centre of a cell or on the beginning of a cell.
section on the Source tab: "labelFrequency": "2" (replace 2 by the desired number of grid lines). l Axis group: l l l l Color: Select a color for the value axis: click the colored square to open the Color Picker dialog ("Color Picker" on page 931), or enter a valid hexademical color (HTML Hex Color) or a predefined CSS color (CSS color names). (Equivalent to the axisColor property; see: axisColor.) Opacity: Enter the opacity in percentage for the axis. 100 is fully opaque, 0 is transparent.
l l l l Rotation: Rotation of the data labels. Supported notations: 0.0 , 0.0° or 0.0 deg . (Equivalent to the labelRotation property; see: labelRotation.) Offset: Vertical offset of the data labels. A positive offset moves the data labels up. A negative value moves them down. (Equivalent to the labelOffset property; see: labelOffset.) Anchor: Select whether the start, middle or end of a data label should be anchored to the bar. This setting moves the labels horizontally.
l l l l l l l Position: Use the drop-down to select where the legend is shown: at the Right, Left, Top or Bottom. (Equivalent to the position property; see: position.) Align: Use the drop-down to select how to align the text in the labels: Left, Middle or Right. (Equivalent to the align property; see: align.) Horizontal Space: Horizontal space between legend items, in pixels. (Equivalent to the spacing property; see: spacing.
property; see: markerType.) l l l l l Size: Enter the size (in pixels) for the Markers to be displayed. (Equivalent to the markerSize property; see: markerSize.) Label Gap: Enter the distance (in pixels) between the legend marker and legend text. (Equivalent to the markerLabelGap property; see: markerLabelGap.) Border Width: Use the drop-down to define the thickness of the border added to the Markers. The default value (0) means the line will be a "hairline" (1 px).
files, they are styled with CSS. To learn how to use CSS in the Designer, see "Styling and formatting" on page 741 and "Styling templates with CSS files" on page 743. For information about specific properties and their options, see W3Schools CSS Reference. Note When no unit is added to a geometry value, such as the width, height, top or margin, the default unit will be added to the value; see "Print preferences" on page 848.
l Text wrap group: l l l Float: Use the drop-down or type in the value for how to float the box, if the box is not in an absolute position (see Position, below). Equivalent to the CSS float property. Clear: Use the drop-down or type in the value for clearing pre-existing alignments. Equivalent to the CSS clear property. Positioning: Note that it depends on both the Context and the type of Box, which settings are available. For information about the different types of Boxes, see "Boxes" on page 692.
l General group: l l Color: Specify the color of the box background: select a named color (defined in the Colors Editor) from the drop-down, or click the colored square to open the Color Picker dialog ("Color Picker" on page 931). Alternatively you could type a name or value in the Color field directly.
Border tab For information about borders see "Border" on page 772. l l Same for all sides: Defines the border properties for all sides using the Top properties. Equivalent to the CSS border property. Top, Left, Bottom, Right: Each group defines the following properties: l l l Width: Specify the thickness of the border. Equivalent to the CSS borderwidthproperty. Style: Specify the style of the border such as solid, dashed or dotted. Equivalent to the CSS border-style property.
l Child (optional): When specified, the Copy Fit feature will only be applied to the given child element (an element inside the Box or Div). Specify the element by giving its ID, for example: #product, or class, for example: .product - note the dot. Color Picker The Color Picker dialog appears when creating a color in the formatting dialogs of certain elements, for example border colors in boxes and paragraphs.
Colors Properties The Colors Properties defines and sets named colors used in the template; see "Colors" on page 774. Named colors can be used throughout the templates, in all contexts. They are visible in color selector dialogs and useable with their names in style sheets; see "Styling and formatting" on page 741. l l l l Color Type Selector: Click and use the drop-down to display which color types to show in the list: All, RGB, CMYK or Spot colors.
l l l Red/Green/Blue (RGB): Each slider sets the values of 0-255 for the color. Set the value using the sliders or type in the value directly in the input boxes. Color Preview: Box displaying the preview of the color (converted to RGB when relevant). Tint: l l l Source: Select an existing Color in the template. The tint or opacity will be applied to this color. Tint/Opacity: The slider sets the percentage of tint or opacity.
l Options Group: l Rendering intent: Use the drop-down to specify how colors are converted that are out of range of a profile. For example, you may use tricks like reducing the saturation of the entire print so that a color that is out of range still appears a bit more vibrant than ones that are in range. Rendering intents use different methods to trick the eye into believing that the print can reproduce irreproducible colors.
Includes Tab The Includes tab defines which style sheets and JavaScript files should be included in the Web context when generating output, and in which order; see "Includes dialog" on page 943. For more information about stylesheets, see "Styling templates with CSS files" on page 743. For more information about using JavaScript, see "Using JavaScript" on page 564. Edit Label Properties The Edit Label Properties defines how a Pie Chart Label displays its title and data.
standard layout. l Custom: To create a custom PDF report, you need two files: l l Template: A template design with the desired layout and variable data. This .OL-TEMPLATE file has to be made in the Designer. DataMapper: A data mapping configuration that provides the variable data. This .OL-datamapper file has to be made in the DataMapper module, using the standard XML template report as data sample.
Custom tab On this tab custom properties can be defined. Click the Add icon and enter a name for the property and a value. Use the arrow icons to reorder the list of custom properties. Custom property lists can be exported to, and imported from, a .CSV file, using the Import and Export buttons. Find/Replace Dialog The Find/Replace dialog can replace text within the current template. The scope of the replacement depends on the currently selected tab in the Workspace.
l Options l l l l l Case sensitive: Use a case sensitive search, which differentiates TEXT from text or TexT. Wrap search: Loop back from the end of the template or selection to its beginning, when the Search is at the end of the template or the selection. Whole word: Searches for the source string as a whole word. Incremental: With this option selected, each letter you type in the Find field causes the editor focus to move to the first complete occurrence of the text you are typing.
The following buttons appear to the right of the list of fonts: l New: Click to open the Edit Font dialog to add a new font. l Edit: Click to open the Edit Font dialog to edit the currently selected font. l Remove: Click to delete the currently selected font entry. l Duplicate: Click to create a copy of the currently selected font entry. Edit Font The Edit Font dialog appears when clicking New or Edit from the Fonts Dialog. l l l Name: Enter the name that should be used to refer to the font.
All settings in this dialog are in fact CSS properties. Cascading Style Sheets (CSS) were originally designed for use with web pages: HTML files. Since Designer templates are HTML files, they are styled with CSS. To learn how to use CSS in the Designer, see "Styling and formatting" on page 741 and "Styling templates with CSS files" on page 743. For information about specific properties and their options, see W3Schools CSS Reference.
l l Clear: Use the drop-down or type the value to clear pre-existing alignments. Equivalent to the CSS clear property. Positioning: l l l l l l Position: Use the drop-down or type in the value for the type of positioning for the image. Equivalent to the CSS position property (see "Using the CSS position property" on page 760). Top: Set the vertical offset between this image and its parent's top position. Equivalent to the CSS top property.
l Top, Left, Bottom, Right: Each group defines the following properties: l l l Width: Specify the thickness of the border. Equivalent to the CSS border-width property. Style: Specify the style of the border such as solid, dashed or dotted. Equivalent to the CSS border-styleproperty. Color: Specify the color of the border: select a named color (defined in the Colors Editor) from the drop-down, or click the colored square to open the Color Picker dialog ("Color Picker" on page 931).
Names that represent files or folders on disk are case-insensitive, while all other names are case-sensitive. l l l Rename: Import the resource, giving its name a suffix to make it unique in the target folder. Note that when a section is renamed, the properties of its context are not copied over, except for Includes (Web contexts only; see "Includes" on page 546). Includes are transferred to the imported section. Overwrite: Replace the existing resource.
Email clients do not read CSS files and some even remove a