resizing in the Web contexts. l Enable for Email Context: Check to enable
resizing in the Email contexts.
l Auto compile on saving .scss files: When this option is checked, a .scss file is compiled into a .css file whenever you save it, overwriting any previously compiled version of the .css file. Also, when a partial .scss file is saved all .scss files are recompiled. (A partial .scss file is meant to be imported in another .scss file. Its name starts with an underscore.) By default this option is enabled. Note l Re-compiling a .scss file overwrites any manual changes made to the .css file. l Partial .
l Margin and guides: These settings only apply to Print sections. l l l l Margins: This color delineates the content area on a page; see "Pages" on page 510. Bleed box: This color delineates the printable area on a page; see "Page settings: size, margins and bleed" on page 511. Master pages: These edges are only visible on Master pages; see "Master Pages" on page 518. l l l Guides: This is the color for rulers that can help position content correctly; see "Guides" on page 772.
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 1003). 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 1003).
Service Provider (ESP): Mandrilapp.com, Sendgrid and Mailgun (see "Using an ESP with PReS Connect" on page 1462). 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 794.
Logging Levels below it. The default logging Info Level contains all Error and Warning entries plus informational log entries. 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.
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 137. ------------------------------------------------------------------------------------------ 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 148. 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 PReS 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.
The following pages are available: l "Clean-up Service preferences" on page 840 l Connection l "Security Settings" on page 148 (not available in Server Extension (Slave) installations) l "Database Connection preferences" on page 845 l Engines l Automatic Restart (not available in Server Extension (Slave) installations) Note Automatic Restarts are controlled by the main server. Slaves are treated the same as local engines in regards to restart timing.
In PReS Connect, the Connections choices available to you will be dependent upon whether the PReS Connect installation is a Master (or standalone) installation or a Slave installation. For standalone and Master installations, see "Connection settings (standalone/Master)" below. Fro Slave installation see "Connection settings (Slave)" on the next page. Connection settings (standalone/Master) l Primary Connection group. Use this to adjust the HTTP communication settings for Connect.
l l Maximum threads: Sets the maximum number of HTTP threads for processing requests. This entry should only be changed in consultation with OL. Maximum queues: Sets the maximum number of requests can remain in the queue. This entry should only be changed in consultation with OL. ------------------Connection settings (Slave) l Master Server group. Use this to set connection to PReS Connect Master server. l Hostname: Set the device name for the PReS Connect Master server.
Set logs for further information. 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. Engine configuration The Connect Server cooperates with different engines to handle specific tasks. A DataMapper engine extracts data from a data file.
Connect categorizes print jobs on the number of pages they will produce. What constitutes a Small, Medium or Large job can be configured per server (see below, in "Allocating processing power to jobs" on page 133). There is no distinction between small, medium and large jobs for Email and Web output. This topic explains all of these settings and the principles behind them, and it provides guidelines for letting the Server manage the workload in such a way as to achieve the highest possible output speeds.
which means the total maximum output speed is 10,000 PPM per output type (Print, Email, and Web). One engine needs at least one free speed unit to be able to create output. It is important to note that only output operations are limited by this quota. l l l Weaver engines always require a Licensed task to run. Merge engines only require a Licensed task when creating Email or Web output. Merge engines involved in a Print process don't need a Licensed task in order to run.
As a rule of thumb, you will want to run one less engine in total on a machine than the system has cores, leaving one CPU core free for the Connect Server and the operating system to use. Modern hardware typically has both full cores and hyper-threading or logical cores. The logical cores should not be counted as a full core when determining how many engines to use. As a guide, count logical cores for only 25%-50% of a full core.
DataMapper engine Adding DataMapper engines might be useful in the following circumstances: l l l When large data mapping operations have to be run simultaneously for many jobs. When frequently using PDF or XML based input. Particularly in the case of XML input with large individual records. When the All In One plugin is used often in Workflow configurations and there are more than two Merge engines running.
Also keep in mind that the Connect Server and the operating system itself will need memory to keep running. Allocating processing power to jobs Which engine configuration is most efficient in your case depends on how Connect is used.
Medium jobs will be those that fall between the maximum pages of a small job, and the minimum pages of a large job. The number of engines used for small, medium and large jobs is configurable (see below). Running a job as fast as possible Number of parallel engines per Print job Two or more engines of a kind can be combined to work on the same Print job. Generally jobs will run faster with more than one engine, because sharing the workload saves time.
3. Set the Target speed when running simultaneous jobs for small, medium and large Print jobs. 4. Click OK or Apply. Dividing processing power over jobs There is a number of ways in which you can divide processing power over output operations of a certain kind and/or size. l l l By reserving engines for jobs of a certain kind (and size, in the case of a Print job). Note that reserved engines cannot be used by any other type of job. This means there will be fewer engines to handle other jobs.
l If no, or not enough, Merge engines are available then the job will have to wait until the required number of appropriate Merge engines becomes available. The following limitations apply at all times: l l The maximum number of concurrent Merge engines working on jobs of the same kind or size may not be exceeded. If no - or not enough - speed units are available for that type of output, the job must wait.
Automatically restart engines to safeguard system availability l l l l l l Time Limit checkbox: This enables engine restarts to be scheduled to occur either after a specified period of time, or within a daily time window. This means daily Engine restarts can be scheduled to run outside of production hours. Rolling restart checkbox: This sets the engines restarts to occur in a "rolling" fashion, whereby each engine is stopped and restarted individually, one after the other.
l l For the Designer specific preferences, see the "Parallel Processing properties (Designer Preferences)" below section on this page. For the Server Configuration specific preferences, see the "Parallel Processing properties (Server Configuration)" on the next page section on this page. For additional information on how these preferences can enhance performance, see "Engine configuration" on page 128 and "Performance considerations" on page 35.
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. As each task finishes, any freed up Merge engines get re-assigned back to still running tasks, if no new tasks were waiting. This option is better for on demand (ad hoc) and simultaneous job processing.
Whether options are available for selection on this page or not is entirely dependent upon the Number of engines selection made in the Engines preferences page. If either of the Merge Engines or Weaver Engines were set to a value beyond one, then options will become available in this Parallel Processing properties page. Preset selection (Server Configuration) Choose from some common usage scenarios.
Content Creation Tab (Server Configuration) 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 On demand task size limit (records): An on demand task is a task that has someone (or something) waiting for it to finish, so these typically need to finish “as soon as possible”. Often these are single documents but not necessarily always. This option allows you to designate what a Content Creation on demand task is, based upon the number of records. ------------------Output Creation Tab (Server Configuration) A Tab with data that relates solely to job Output Creation.
Note The terms "job" and "task" can be used interchangeably. l l Small job max (pages): Enter the maximum number of pages a job can have and still be considered Small. Large job max (pages): Enter the minimum number of pages a job must have before it is considered to be a Large job. Reserved engines group: These settings allow you to reserve some Weaver (Output) engines for small and medium Output Creation tasks.
job. This allows you to prioritize one or more type of job above the others. For example, if your production process normally handles lots of small jobs, you might want to provide the smaller jobs greater speed (throughput) than the less frequent Medium and Large jobs. But if there are so many small jobs that they start limiting the throughput of larger jobs? If there is always at least one small job running, then the maximum speed for the larger job will stay at half of the licensed limit.
The Parallel Processing 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.
MySQL modules, the MySQL instance configured (steps 2-4 above) then the master and other slaves can be installed. The remainder of the instructions remain the same. It is also possible to setup clustering with MySQL being installed completely separately from PReS Connect, such as using an existing MySQL instance. In this case, the instructions for the bind address must be followed, but the user does not have to be root.
GRANT ALL PRIVILEGES ON objectiflune.* TO 'root'@'192.168.0.0/255.255.0.0' IDENTIFIED BY 'password';, where password is the one provided during installation. ( ref: http://dev.mysql.com/doc/mysql-security-excerpt/5.5/en/adding-users.html) Technical IP Subnets understanding is beyond the scope of this documentation. If you want to learn more, please see the Subnetwork article on Wikipedia.
entered in any remote Connect Designer that links to this Server. The Designer username and password entries can be found under the "Print preferences" on page 860 subsection of the Designer Preferences dialog. - When disabled, a username and password is not required to make REST request, and tasks in PReS Workflow do not require them in the Proxy tab. Nor would a username and password be required on 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 25).
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 35).
Printing and emailing from the Designer To print or send email from within the Designer, the PReS 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 PReS 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.
The Update Client OL for Connect 2019.1 does not cater for standalone Connect Print Manager installations The Connect Print Manager is a standalone Connect tool that is used in production sites to manage print jobs. It can be installed and run on standalone machines without a Connect license. The Update Client for Connect 2019.1 looks for a Connect license as part of the update process, but it will not find one on standalone Connect Print Manager installations.
As "Scale to Fit" is now switched on by default in all standard Connect 2019.1 AFP and IPDS Printer Definitions, none of those should encounter the issue. This issue will be fixed in a subsequent patch release.
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, AFP and IPDS 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, AFP and IPDS 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.
appear at the end of the installer. The workaround for the moment is to use the default installation path. The problem will be addressed in a later release. Switching languages Changing the language using the Window > Preferences > Language Setting menu option does not currently change all of the strings in the application to the selected language. This is a known issue and will be fixed in a later release. In the meantime we offer the following workaround for anyone who needs to change the language: 1.
PostScript print presets The print presets for PostScript were changed from Version 1.1 onwards meaning that some presets created in Version 1.0 or 1.0.1 may no longer work. Any PostScript print preset from Version 1.0 that contains the following will not work in Version 2019.2: *.all[0].* Any preset containing this code will need to be recreated in Version 2019.2. Available Printer Models Note that only the single Printer Model (Generic PDF) will appear on the Advanced page of the Print Wizard by default.
services and they may find local files with non-UNC paths which can lead to the false impression that the resources are correct. Using Capture after installing Workflow 8 If PReS Connect Workflow 8 is installed alongside PlanetPress Suite Workflow 7, Capture can no longer be used within Workflow 7. The plugins are now registered uniquely to Workflow 8 and the Messenger for Workflow 7 is taken offline. It is only possible to use Capture from PReS Connect Workflow 8 thereafter.
l If the server is offline and you are not using Proof Print. l On some occasions before the Print Wizard opens. REST Calls for Remote Services The Server will accept REST calls for all remote services and will make commands wait indefinitely until the required engines become available. The Server will log when it is waiting for an engine and when it becomes available. Note that there is no way to cancel any commands other than stopping the Server.
Magic Number changes when installing Docker Installing Docker on a system where Connect has already been installed may impact Connect's licensing mechanism and require reactivation. Note Installing Connect after Docker has already been installed will not cause issues. Uninstalling This topic provides some important information about uninstalling (removing) PReS Connect2019.2. To uninstall PReS Connect select the application from within the Add/Remove programs option under the Control Panel.
1. PReS Connect 2. Connect products on remote systems which refer to this MySQL database. 3. Any Connect Workflow using PReS Connect plugins which connect to this server. 4. PReS Connect Server Extensions on remote systems which connect to this machine as the Master Server. Uninstallation Wizard The uninstallation is done by running the PReS Connect Setup Wizard in uninstall mode. The Wizard consists of the following pages: 1.
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 174. For a list of all file types used in Connect, see: "Connect file types" on page 176.
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 25).
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 35).
Printing and emailing from the Designer To print or send email from within the Designer, the PReS 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 PReS 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 857. The Connect Server's settings are maintained by the Connect Server Configuration utility tool; see "Server Configuration Settings" on page 124. 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 1046).
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 972.) .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 798) or selfwritten (see "Writing your own scripts" on page 865).
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 169). Typically, an OL Connect project aims at automating (part of) a company's communication with its customers, suppliers, or other parties.
Wizards" on page 985 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 221 and "OL Connect tasks" on page 223.
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 178. 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 188.) 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 470). 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 539). Styling is done via style sheets (see "Local formatting versus style sheets" on page 753). 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 891.
"Variable Data" on page 813.) 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 543. 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 238: 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 810. 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 987. 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 862) 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 606 and "Using Form elements" on page 571). You could also add text, images and other elements (see "Content elements" on page 641) and change the layout of the page (see "Styling and formatting" on page 753). 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 798). 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 194). 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 884.) 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 862) 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 518 l Add sections (see "Print context" on page 495) In order to further personalize the letter, you need to open your data mapping configuration. (See: "Personalizing content" on page 798.) 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 815). 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 707).
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 238). 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 275.
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 862) 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 518 l Add sections (see "Print context" on page 495) In order to further personalize the invoice, you need to open your data mapping configuration. (See: "Personalizing content" on page 798.) 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 213). 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 470).
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 560). Styling is done via style sheets (see "Local formatting versus style sheets" on page 753). 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 227). 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 862) 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 641) and change the layout of the web pages (see "Styling and formatting" on page 753). Once the template is ready, send it to Workflow (see "Sending files to Workflow" on page 470). 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 560). Styling is done via style sheets (see "Local formatting versus style sheets" on page 753). 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 891.) 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 217). 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 240.) 3.
same in both. Once the template is ready, send it to Workflow (see "Sending files to Workflow" on page 470). 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 237. 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 the next page. 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 227. 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.
the files that it needs, is to use a Project Wizard. See "Project wizard: Basic Email" on page 181. The structure of an OL Connect email process In an OL Connect Email process only one plugin is essential: the Create Email Content plugin. The Create Email Content task creates a set of emails, using the Email context in a Connect template, and sends them to the email server. You have to select the Connect template in the task's properties.
l l A template with an Email context. (See "Creating a template" on page 464.) If the email should contain variable data, you might need to make a data mapping configuration (see "Creating a new data mapping configuration" on page 240). If the input is going to be JSON data, you could add them to the design using a JSON file (see "Adding JSON data from a JSON file" on page 810).
receives a request for a resource called hello. (You could, for example, trigger the process by typing the following URL in the address bar of your browser: http://localhost:9090/hello, if the browser runs on the same machine as the Workflow server and the Input task is a NodeJS Server Input task. The protocol could be HTTPS, depending on the settings of the Input task.) To trigger the process from a Web Form, set the Action of the Form to the HTTP Action of the Input task. (See "Forms" on page 725.
is going to be JSON data, you could add them to the design using a JSON file (see "Adding JSON data from a JSON file" on page 810). Templates and data mapping configurations need to be sent from the Designer to PReS Workflow before they can be used in the Workflow process; see "Sending files to Workflow" on page 470. The next step is to create a process in PReS Workflow that generates Web output, using these files.
made with the DataMapper (see "Data mapping configurations" on page 239). The Retrieve Items task retrieves records from the OL Connect database. l l l The Create Print Content task. This task merges data with a template, resulting in Print Content Items. Templates are made with the Designer (see "Templates" on page 464). The Create Job task. This task turns a set of Print Content Items into a print job. Any settings are passed on to Workflow via a Job Creation Preset. The Create Output task.
l l l A data mapping configuration, or a data model at the very least, if the documents should contain variable data. (See "Creating a new data mapping configuration" on page 240.) A Job Creation Preset. (See "Job Creation Presets Wizard" on page 1175.) A Job Creation Preset defines where the output goes and makes it possible to filter and sort records, group documents, and add metadata. An Output Creation Preset. (See "Output Creation Presets Wizard" on page 1189.
Batching Batching refers to creating print jobs from print content items that were created earlier. A batching print process is split up in 2 phases: l l Phase 1: Content is created by merging a print template with data. Newly created print content items are always automatically saved in the Connect database1. Information about the set of items (the "content set"), including the Content Set ID, gets stored in the database as well.
l If you decide to retrieve content sets, you may still have to do preparatory work on the content item level to enable a Job Creation preset to sort the output (see "Sorting and grouping items in print batches" on the facing page). How to retrieve: selection methods The Retrieve Items task can retrieve items/sets by ID or based upon conditions. Retrieving items/sets by ID New print content items are automatically saved in the Connect database when the Create Content task creates them.
In order to retrieve (sets of) items by data values, you may have to adjust the data mapping configuration (see "Data mapping configurations" on page 239). Note that a property can only be used to retrieve entities on the level on which the property was explicitly set. For example, when you set a property on a content set, you can only use that property to retrieve the content set in its entirety (i.e.
l Properties are key/value pairs that can be set on entities in the Connect database. There are two ways to do that: l l Using the Set Properties task. Ideally, the Set Properties task directly follows the Create Print Content task in a Workflow process. The Create Print Content task returns the IDs of the content items as well as the ID of the content set to the process via the Metadata.
A Job Creation Preset can only work with content sets as input. So, if you want to use a Job Creation Preset, the Retrieve Items task must retrieve content sets from the Connect database, not content items. This also means that if you want to use properties in conditions to retrieve the correct items, those properties must be set on the content set level. However, any properties that you want to be used for filtering, grouping or sorting must be set on the content items.
Capture OnTheGo Workflow processes A Capture OnTheGo solution requires no less than three basic processes in a Workflow configuration: l l l One process that generates a document (most often, a form), stores it and notifies the COTG app of the document's existence. Note that this process doesn't send the actual document.
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 261 and "The Data Model" on page 299. 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 462.
Note AFP input is dependent on a third party library (CDP), which only allows PReS Connect to run up to 4 AFP input processes on a given machine at a given time. Creating a new data mapping configuration A new data mapping configuration can be made with or without a wizard. When you open a data file with a DataMapper wizard, the wizard automatically detects a number of settings. You can adjust these settings.
3. Click the Browse button and open the file you want to work with (for a database, you may have to enter a password). 4. Click Finish. l From the File menu 1. Click the File menu and select New. 2. 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.
PostScript code is usually optimized to print and not to keep text searchable, by maintaining character identities for example. The rule of thumb is: if copy-paste from Acrobat works, so will data mapping; if not, 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 steps to take with the wizard depend on the file type. See: l "Using the wizard for CSV and Excel files" on page 245 l "Using the wizard for databases" on page 247 l "Using the wizard for PDF/VT or AFP files" on page 250 l "Using the wizard for XML files" on page 252 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 296, allows to process only a group of items without having to examine all records. (See also: "Text and PDF Files" on page 382.) 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 265.
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 412 and "extractMeta()" on page 434). 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 PReS Workflow. Requirements To be able to import PCL input files, you will need the PCL Input license, in addition to PReS 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 297). 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 267.
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 355. Settings for a database Databases all return the same type of information.
See also: "XML File Input Data settings" on page 358. 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 844). 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 287. 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 292 or "Multiple Conditions step" on page 295. 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. (See "Selecting data" on the next page.
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 348. 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 268). 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 344).
Note In a PDF or Text file, pieces of data often have a variable size: a product description, for example, may be short and fit on one line, or be long and cover two lines. To learn how to handle this, see "Extracting data of variable length" on the next page. 6. Extract the sum or totals. If the record contains sums or totals at the end of the line items list, the end of the Repeat step is a good place to add an Extract step for these data.
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 292) or a Multiple Conditions step ("Multiple Conditions step" on page 295) 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 285
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 267. To add a field without extracting data, see "JavaScript-based field" on page 305. 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 261). 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 370. 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 267. 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 398. The settings for a Case are the same as for a Condition step; see "Condition step properties" on page 394.
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 287. 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.
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 412 and "DataMapper Scripts API" on page 409). Configuring the Postprocessor step For an explanation of the settings for post-processors, see "JavaScript" on page 405.
In order to test post-processors you must execute them manually by clicking the Apply button in the Post-processor step properties (see "JavaScript" on page 405). Note that in the DataMapper and Designer, only one data record is active at any given time. Therefore, the changes made by the post-processes are only visible on the current data record (i.e. the one currently displayed). If you change data records, you must press the Apply button on the Postprocessor step once more.
About records A record is a block of information that may be merged with a template to generate a single document (invoice, email, web page...) for a single recipient. It is part of the record set that is generated by a data mapping configuration. In each record, data from the data source can be combined with data coming from other sources. Records can be duplicated by setting the number of copies in a script (see "record" on page 440). Duplicates are not shown in the Data Model.
Note l l Imported Data Model fields always overwrite existing field properties when the field name is the same (although they will still be part of the same Extract step). Nonexistent fields are created automatically with the appropriate field settings. The import is case-insensitive. All imported data model fields are marked as required in the Data Model (indicated with an asterisk (*) next to their names).
To change the order in which data are extracted, see "Renaming and reordering fields in an extraction step" on page 307. Moving fields To move a field, a group of fields or a detail table, you can simply drag and drop it to some other place in the Data Model. 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.
In Workflow, when a data mapping configuration is used to extract data from a data source (see "Data mapping configurations" on page 239), the extracted data is stored in a record set in the OL Connect database. 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.
l Select Metadata as the data source in the Create Preview PDF plugin. Note Many of these actions can also be performed using REST calls. Please refer to PReS 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 299). Fields can be present on different levels: on the record level or in a detail table (see "Example " on page 348).
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 409.) Custom properties can be added via the Preprocessor step; see "Preprocessor step" on page 287. 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 317 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 273. 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 273).
Page 312
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 324 l "Integer" on page 324 l "Float" on page 323 l "Currency" on the next page l "Date" on page 320 l "Object" on page 325 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 263). 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 1021. Although some of the keyboard shortcuts are the same, this isn't a complete list of Windows keyboard shortcuts. Please refer to Windows documentation for a complete list of Windows keyboard shortcuts.
Key combination Function Alt Put the focus on the menu. (Alt + the underlined letter in a menu name displays the corresponding menu.) The menu can then be browsed using the Enter key, arrow up and arrow down buttons.
Key combination Function Z Ctrl + Shift + S Save all Ctrl + Shift + W or Ctrl + Shift + F4 Close all Ctrl + F5 Revert Ctrl + F7 Next view Ctrl + Shift + F7 Previous view Ctrl + F8 Next perspective Ctrl + Shift + F8 Previous perspective Ctrl + F10 Save as Ctrl + F12 Send to Workflow / Package files F4 Ignore step/Reactivate step F6 Add an Extract step F7 Add a Goto step F8 Add a Condition step Page 332
Key combination Function F9 Add a Repeat step F10 Add an Extract field F11 Add an Action step F12 Add a Multiple Conditions step Alt + F12 Add a Case step (under a Multiple Conditions step) Home Go to the first step in the workflow End Go to the last step in the workflow Alt + V Validate records Shift + F10 or Ctrl + Shift + F10 Open context menu Viewer pane The following key combinations activate a function in the Viewer.
Key combination Function Ctrl button to gradually zoom in or out.
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 240. 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 PReS 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 306 and "Renaming a detail table" on page 344. 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 267). The icon to the left of the name indicates the data type of the field (see "Data types" on page 317). 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 344).
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 266).
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 263.
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 414. 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 287). 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 304) or change the expected data format (see "Data Format" on page 379), 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 PReS Workflow. These properties are equivalent to data available within the PReS Workflow process.
In scripts, fixed automation properties are retrieved via the automation object (see "Objects" on page 419), for example automation.jobInfo.JobInfo9 or automation.properties.OriginalFilename. Note Other variables used in a Workflow configuration are made available to the data mapping configuration via the Properties subsection of the Preprocessor step (see below). Properties The Properties subsection is used to create specific properties that are used throughout the 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 317. Default Value: The initial value of the property. This is a JavaScript expression. See "DataMapper Scripts API" on page 409.
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 289 and "Extracting data" on page 267. 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.
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. See "Fields" on page 304 for more information.
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 287. For an explanation of the objects to which the properties belong, see "DataMapper Scripts API" on page 409. Choose a property button: Click this button to open a filter dialog that lets you find a property based on the first few letters that you type.
l Trim: Select to trim empty characters at the beginning or the end of the field. l Concatenation string: l Split: Separate the selection into individual fields based on the Concatenation string defined above. Settings for location-based fields in a PDF File These are the settings for location-based fields in a PDF file. l l l l l Left: Defines the start of the data selection to extract, counting the number of characters from the left. E.g. 1 means: start with the first character from the left.
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. Settings for location-based fields in CSV and Database files These are the settings for location-based fields in CSV and Database files. l l Column: Drop-down listing all fields in the Data Sample, of which the value will be used.
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 301. Action step properties The Action step can run multiple specific actions one after the other in order; see "Action step" on page 296 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 409. 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 412 and "DataMapper Scripts API" on page 409).
CSV and Database Files l Property: Displays a list of record properties set in the Preprocessor step (see "Preprocessor step" on page 287). 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 409. 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 287). 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 287).
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 287). 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 409. Use JavaScript Editor: Click to display the Edit Script dialog (see "Using scripts in the DataMapper" on page 412). 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 409.
Toolbar In the DataMapper module, the following buttons are available in the top toolbar. File manipulation l New: Displays the New wizard where a new data mapping configuration or a new template can be created. 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.
l l l l l l l l Add Extract Field: Adds the data selection to the selected Extract step, if an extract step is currently selected. If multiple lines, nodes or fields are selected, multiple extract fields are added simultaneously. Add Multiple Conditions: Adds a condition that splits into multiple case conditions. Add Action Step: Adds a step to create a custom JavaScript snippet. See "DataMapper Scripts API" on page 409 for more details.
If you are new to PReS Connect and you don't know where to start, see "Welcome to PReS Connect 2019.2" on page 21. The Welcome Screen can be reopened in two ways: l The Welcome Screen button in the "Toolbars" on page 1064. l From the Menus in Help, Welcome Screen. 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.
l Create/Open: l l l l l Open File: Lets you open an existing template or data mapping configuration. New template: Lets you choose a Context to create a new template without a Wizard. Template Wizards: Displays a list of available Template Wizards, producing premade templates with existing demo content; see "Creating a template" on page 464. Project Wizards: Displays a list of available Project Wizards, producing a complete Connect project; see "Project Wizards" on page 985.
Name Description Available in scripts of type "db" on page 439 An object that allows to connect to a database. Boundaries, all steps except Goto "logger" on page 440 An object that allows to log error, warning or informational messages. Boundaries, all steps except Goto "record" on page 440 The current record in the main data set. Extract, Condition, Repeat and Multiple Conditions steps "region" on page 441 An object that defines a subsection of the input data.
Name Description copyFile() Copies a file to the target file path, replacing it if it already exists. "createGUID()" on page 451 Returns a unique 36-character string consisting of 32 alphanumeric, lower case characters and four hyphens (format: 84-4-4-12). Example: 123e4567-e89b-12d3-a456-426655440000. "createHTTPRequest ()" on page 451 Creates a new HTTP Request Object. createTmpFile() Creates a file with a unique name in the temporary work folder and returns a file object.
Name Description openTextReader() Opens a file as a text file for reading purposes. openTextWriter() Opens a file as a text file for writing purposes. Using scripts in the DataMapper In the DataMapper every part of the extraction process can be customized using scripts. A script can be used to set boundaries for a data source (see "Setting boundaries using JavaScript" on page 414). The script determines where a new record starts. Scripts can also be used in different steps in the extraction workflow.
Tip In the Edit script dialog, press Ctrl + Space to bring up the list of available JavaScript objects and functions (see Datamapper API). Use the arrow keys to select a function or object and press enter to insert it. Type a dot after the name of the function or object to see which features are subsequently available. Keyboard shortcuts for the script editor are listed in the following topic: "Keyboard shortcuts" on page 1021.
}; If this is saved as myFunction.js and imported, then the following would work anywhere in the configuration: var result = myAddFunction(25, 12); // returns 37! Setting boundaries using JavaScript As soon as you select the On Script option as the trigger for establishing record boundaries (see "Record boundaries" on page 266), you are instructing the DataMapper to read the source file sequentially and to trigger an event each and every time it hits a delimiter.
access to the first page only, and for a CSV or for tabular data, that would be the first row or record. This means that you can: l Examine the data found in between delimiters for specific conditions. l Examine specific regions of that data, or the available data as a whole. l Compare the contents of one region with another. l Etc. To access this data in the script, use the get() function of the boundaries object.
"Rolling Stones","Let it bleed",1969 "Led Zeppelin","Led Zeppelin 3",1970 "Led Zeppelin","Led Zeppelin 4",1971 "Rolling Stones","Sticky Fingers",1971 Note The first line is just the header with the names of the CSV columns. The data is already sorted per year, per artist, and per album. Your goal is to examine two values in each CSV record and to act when either changes. The DataMapper GUI allows you to specify a On Change trigger, but you can only specify a single field.
boundaries.setVariable("lastBand",zeBand[0]); boundaries.setVariable("lastYear",zeYear[0]); l l l l The script first reads the two values from the input data, using the createRegion() method (see: "Example" on page 443). For a CSV/database data type, the parameter it expects is simply the column name. The region is passed as a parameter to the get() method, which reads its contents and converts it into an array of strings (because any region, even a CSV field, may contain several lines).
Led Zeppelin Led Zeppelin Rolling Stones Led Zeppelin 3 Led Zeppelin 4 Sticky Fingers 1970 1971 1971 The purpose of the script, again, is to set the record boundary when EITHER the year OR the artist changes. The script would look like this: /* Read the values of both columns we want to check */ var zeBand = boundaries.get(region.createRegion(1,1,30,1)); var zeYear = boundaries.get(region.
Note The PDF context also expects physical coordinates, just like the Text context does, but since PDF pages do not have a grid concept of lines and columns, the above parameters would instead be specified in millimeters relative to the upper left corner of each page. So for instance, to create a region for the Year, the code might look like this: region.createRegion(190,20,210,25) which would create a region located near the upper right corner of the page.
Property Description PReS Workflow (see Job Info variables in the Workflow Online Help). properties Returns a ScriptableAutomation object containing additional information (file name, process name and task ID) from PReS Workflow. variables Returns a ScriptableAutomation object containing the list of local and global variables defined by the user in PReS Workflow. Note that there is no way to distinguish local variables from global ones (local variables take precedence over global variables).
To access ProcessName, OriginalFilename or TaskIndex from Workflow: automation.properties.OriginalFilename; To access Workflow variables (declared in the "Preprocessor step" on page 287 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.
Method Description Script type get() Retrieves an array of strings. Boundaries getVariable () Retrieves a value of a variable stored in the boundaries object. Boundaries set() Sets a new record boundary. (See: "Record boundaries" on page 266.) Boundaries setVariable () Sets a boundaries variable to the specified value, automatically creating the variable if it doesn't exist yet. Boundaries find() Method of the boundaries object that finds a string in a region of the data source file.
in_Region The in_Region region can be created prior to the call to find() with the region.createRegion() method. It depends on the type of data source how a region is defined; see "Example" on page 443. When used to search through a Text file, the find() method returns a different region object (see "region" on page 441) whose range property is adjusted to point to the exact physical location where the match was found. This will always be a subset of the in_Region.range property.
boundaries.get(region.createRegion("Email_Address")); getVariable() Method that retrieves the value currently stored in a variable. Note Boundary variables are carried over from one iteration of the Boundaries script to the next, while native JavaScript variables are not. getVariable(varName) varName String name of the variable from which the value is to be retrieved. If the variable does not exist, the value null is returned.
skip some pages/records when you know they do not need to be examined. Negative (or 0) values simply set the boundary without changing the current location. Example This script sets a boundary when the text TOTAL is found on the current page in a PDF file. The number of delimiters is set to 1, so the boundary is set on the next delimiter, which is the start of the next page. if (boundaries.find("TOTAL", region.createRegion (10,10,215,279)).found) { boundaries.
setVariable() This method sets a variable in the boundaries to the specified value, automatically creating the variable if it doesn't exist yet. Note Boundary variables are carried over from one iteration of the Boundaries script to the next, while native JavaScript variables are not. setVariable(varName, varValue) Sets variable varName to value varValue. varName String name of the variable of which the value is to be set. varValue Object; value to which the variable has to be set.
Property Description Return type filename The path of the input file. Returns the fully qualified file name of the temporary work file being processed. properties Contains properties declared in the preprocessor step (see Preprocessor Step Properties for details). Returns an array of properties defined in the Preprocessor step with the data scope (i.e. statically set at the start of the job). Methods The following table lists the methods of the data object.
Method Description Script type File type on page 439 expression pattern starting from the current position. Multiple Conditions and Action steps PDF extract() Extracts the text value from selected data: a node path, column, or rectangular region, depending on the type of data source. This method always returns a String. extract(left, right, verticalOffset, regionHeight, separator) Extracts a value from a position in a text file.
Tip l l "
" is a very handy string to use as a separator. When the extracted data is inserted in a Designer template, "
" will be interpreted as a line break, because
is a line break in HTML and Designer templates are actually HTML files. Setting the regionHeight to 0 makes it possible to extract a variable number of lines at the end of a record. Examples Example 1: The script command data.
Example 2: The script command data.extract(1,22,9,6,"
"); means that the left position of the extracted information is located at 1, the right position at 22, the offset position is 9 (since the first line number is 10) and the regionHeight is 6 (6 lines are selected). Finally, the "
" string is used for concatenation. extract(xPath) Extracts the text value of the specified node in an XML file. xPath String that can be relative to the current location or absolute from the start of the record.
Example The script command data.extract('./CUSTOMER/FirstName'); means that the extraction is made on the FirstName node under Customer. extract(columnName, rowOffset) Extracts the text value from the specified column and row. columnName String that represents the column name. rowOffset Number that represents the row index (zero-based), relative to the current position. To extract the current row, specify 0 as the rowOffset.
Example The script command data.extract('ID',0); means that the extraction is made on the ID column in the first row. extract(left, right, verticalOffset, lineHeight, separator) Extracts the text value from a rectangular region in a PDF file. All coordinates are expressed in millimeters. left Double that represents the distance from the left edge of the page to the left edge of the rectangular region.
Double that represents the distance from the left edge of the page to the right edge of the rectangular region. verticalOffset Double that represents the distance from the current vertical position. lineHeight Double that represents the total height of the region. separator String inserted between all lines returned from the region. If you don't want anything to be inserted between the lines, specify an empty string (""). Tip "
" is a very handy string to use as a separator.
extractMeta() Method that extracts the value of a metadata field on a certain level in a PDF/VT. This method always return a String. extractMeta(levelName String, propertyName String) levelName String, specifying the PDF/VT's level. Case sensitive. propertyName String, specifying the metadata field. fieldExists() Method of the data object that returns true if a certain metadata field, column or node exists. (See "data" on page 426.
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 445).
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).
the 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 464. 2. Fill the template Add text, images and other elements to the template and style them. See "Content elements" on page 641 and "Styling and formatting" on page 753. 3. Personalize the content Personalize the content using variable data. See "Personalizing content" on page 798. 4. Generate output Adjust the settings, test the template and generate output: letters, emails, and/or web pages. See "Generating output" on page 1427.
l "Print" on page 487. This topic helps you design and fill sections in the Print context. l "Email" on page 528. This topics helps you design an email template. l "Web" on page 553. This topic helps you design a web page. "Sections" on page 483. Sections in one context are designed for the same output channel. "Content elements" on page 641. Elements make up the biggest part of the content of each design. "Snippets" on page 749.
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 533 l "Creating a Print template with a Wizard" on page 490 l "Creating a Web template with a Wizard" on page 554 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 470). 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 948. The file properties can also be used in scripts; see "template" on page 1398.
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 facing page. The package file has the extension .OL-package and can be opened in the Designer (see "Opening a package file" on page 466). 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 875). 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 592. 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 474 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 facing 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 588. 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 717. To learn how to use them, see "Using COTG Elements" on page 606.
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 533. Outputting and combining contexts All contexts can be present in any template and they can all be used to output documents; see "Generating Email output" on page 1457, "Generating Print output" on page 1429 and "Generating Web output" on page 1467. 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 862. 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 641), including variable data and other dynamic elements (see "Personalizing content" on page 798). To preview a section, open the Preview tab in the Workspace (see "Workspace" on page 1061). 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 954. 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 500, "Email templates" on page 539 and "Web pages" on page 560. 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 l AFP IPDS (spool file created by Connect, with printer control available through the "Print Manager" on page 1474) 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.
Although generally the same content elements can be used in all three contexts (see "Content elements" on page 641), the specific characteristics of pages make it possible to use special elements, such as page numbers; see "Page numbers " on page 512. See "Pages" on page 510 for an overview of settings and elements that are specific for pages.
See "Media" on page 521 for further explanation about how to add Media and how to apply them to different pages. Copy Fit Copy Fit is a feature to automatically adjust the font size of text to make it fit the available space. It could be used for the name of a person on a greeting card, for instance, or for the name of a product on a shelf 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 769.
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. Basic Print template wizards There are two 'basic' Print Template wizards: one for a formal letter, and one for a postcard.
See "Print context" on page 495 and "Print sections" on page 500 for more information about Print templates. Formal letter The Formal Letter Wizard first lets you select the page settings, see "Page settings: size, margins and bleed" on page 511. 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.
expand the Contexts folder on the Resources pane; expand the Print folder and rightclick "Section 1"; then select Sheet Configuration.) See "Media" on page 521. 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 813. The Wizard opens the Print section. You can add text and other elements; see "Content elements" on page 641. The formal letter template already has an address on it.
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. 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 next page and "Print sections" on page 500.
l Choose the desired type of business document from the General drop-down. l Select a color for the colored parts of the document; see "Color Picker" on page 943. l Enter your contact details. l l 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 521. Tip Nice to know: your info and preferences are saved and will be reused the next time you create an ERP template.
Print templates (also called Print sections), are part of the Print context. They are meant to be printed directly to a printer or a printer stream/spool file, or to a PDF file (see "Generating Print output" on page 1429). The Print context can also be added to Email output as a PDF attachment; see "Generating Email output" on page 1457. 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.
In Print sections, there are often elements that need to be repeated across pages, like headers, footers and logos. In addition, some elements should appear on each first page, or only on pages in between the first and the last page, or only on the last page. Examples are a different header on the first page, and a tear-off slip that should show up on the last page. This is what Master Pages are used for. Master Pages can only be used in the Print context. See "Master Pages" on page 518.
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 508. 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 511. 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 518 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 490 and "Print context" on page 495), 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 825. You can use the Conditional Content script wizard to hide parts of the content of a section; see "Showing content conditionally" on page 822. Importing a Print section To import a section from another template, click File > Import Resources... in the menu. See: "Import Resources dialog" on page 954.
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 1005). 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 828. Alternatively you could write your own Control Script to set the background; see "Control Script: Setting a Print section's background" on page 905. 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 897 and "Control Script API" on page 1370). 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 next 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 830. 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 641. When it comes to positioning elements on a page, Guides can be useful, as well as Tables. See "How to position elements" on page 770.
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 798) 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 518. 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 1336. For a multi-page, cross-section table of contents you must use a Post Pagination Script; see "Creating a Table Of Contents" on page 914.
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 765): 1. Select the element (see "Selecting an element" on page 645). 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 759. 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 facing 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 525. 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 522). Section backgrounds are rotated separately (see "Using a PDF file as background image" on page 505). 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 533. 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 852.
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 641, "Email context" on page 537, and "Email templates" on page 539. 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 786. 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 1457. 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 1457. For information about attachments see "Email attachments" on page 550.
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 538.) 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 800. 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 PReS Connect" on page 1462). 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 910, "Control Scripts" on page 897 and "Control Script API" on page 1370. 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 999). 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 902. 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 582). 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 577.
Capture On The Go templates are a special kind of Web templates; see "Capture OnTheGo template wizards" on page 592. 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 749 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 facing 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 955. 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 558) 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 822), or Snippets and a script (see the Help topics "Snippets" on page 749 and "Loading a snippet via a script" on page 884, 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 862. 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 641. 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 725 and "Form Elements" on page 730.
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 571). 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 798) and styling (see "Styling templates with CSS files" on page 755). 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 730. 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 571. 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 PReS 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 798) and styling (see "Styling templates with CSS files" on page 755). 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 facing 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 954. 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 592. 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 588.
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 717. To learn how to use them, see "Using COTG Elements" on page 606. 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 618.
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 239). 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 588. 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 PReS 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.com/ (search for Foundation).
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 749. For more information about template wizards, see "Creating a Web template with a Wizard" on page 554 and "Capture OnTheGo template wizards" on page 592.
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 582. For information about how to add and use COTG Elements, see "Using COTG Elements" on page 606.
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 582). 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 629. Settings for a dynamically added element can be made in code; see "Dynamically adding COTG widgets" on page 621.
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 721) 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 PReS 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 729 and "How to make COTG elements required" on page 608). 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 239), and insert the data in a template, using the data mapping configuration (see "Personalizing content" on page 798). 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 582). 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 592), 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 644. 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 815 and "Styling and formatting" on page 753. l "Hyperlink and mailto link" on page 733 l "Barcode" on page 647 l Web "Forms" on page 725 and Web "Form Elements" on page 730 l l l l "Whitespace elements: using optional space at the end of the last page" on page 512 (Print context only) "Page numbers " on page 512 (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 919 and "Tagging elements for translation" on page 921. 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 1211) 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 683 l "Code 39" on page 659 l "Code 39 extended" on page 660 l Code 93, see "Code 11, Code 93, Industrial 2 of 5, Interleaved 2 of 5, Matrix 2 of 5" on page 683 l "Code 93 extended" on page 664 l "Code 128" on page 666 l "Data Matrix" on page 668 l EAN-8, EAN-13, see "UPC-A, UPC-E, EAN-8, EAN-13" on page 700 l "GS1 DataMatrix" on page 672 l "GS1-128" on page 674 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 647. In PReS 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 648. 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 650. 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.
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.
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 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 is one 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 648. Initially the barcode will have the barcode type's default properties.
Add Checksum When checked, PReS 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. Human Readable Message When this option is checked, PReS 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 Code 39 extended barcode type. For the properties of other barcode types, see "Barcode type and properties" on page 650. 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. Inter Character Gap Two adjacent characters are separated by an inter-character gap.
Human Readable Message When this option is checked, PReS 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).
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 650. 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.
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. Add Checksum When checked, PReS 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.
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 128 Code 128 is one of the types of barcodes that can be added to a template; see "Barcode" on page 647.
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. 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.
Data Matrix Data Matrix is one of the types of barcodes that can be added to a template; see "Barcode" on page 647. 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 648. Initially the barcode will have the barcode type's default properties.
Encoding The data represented in the symbol can be compressed using of the following algorithms. l ASCII is used to encode data that mainly contains ascii characters (0-127) l C40 is used to encode data that mainly contains numbers and uppercase characters. l Text is used to encode data that mainly contains numbers and lowercase l Base256 is used to encode 8 bit values l l Auto Detect automatically detects the data content and encodes using the most appropriate method.
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.
Show guardbars Checking this option adds guardbars to the barcode. Guardbars are bars at the start, in the middle and at the end that help the barcode scanner to scan the barcode correctly. 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.
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.
Barcode properties This topic lists the properties of the barcode type GS1 DataMatrix. For the properties of other barcode types, see "Barcode type and properties" on page 650. 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. Preferred format Use the drop-down to select the size of the Data Matrix.
l ~1 = FNC1 character (for GS1 DataMatrix barcodes) l ~2 = Structure Append l ~3 = Reader programming l ~5 = Macro5 l ~6 = Macro6 l ~7 = ECI expressions Human Readable Message When this option is checked, PReS 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).
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 648. 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 barcode type GS1-128.
Human Readable Message When this option is checked, PReS 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).
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 650. 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.
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 650. 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.
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.
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 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 650. 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. 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.
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, PReS 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 MaxiCode barcode. For the properties of other barcode types, see "Barcode type and properties" on page 650.
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 648. 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.
Human Readable Message When this option is checked, PReS 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).
Mode Use the drop-down to set the compaction mode: l l l Binary: allows any byte value to be encoded Text: allows all printable ASCII characters to be encoded (values from 32 to 126 and some additional control characters) Numeric: a more efficient mode for encoding numeric data Error Correction Level Use the drop-down to select the built-in error correction method based on Reed-Solomon algorithms.
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.) Note that with this option checked, any tilde that needs to be included in the output must be escaped by adding another tilde: ~~.
Note that this type of barcode processes 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 barcode type POSTNET. For the properties of other barcode types, see "Barcode type and properties" on page 650. 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.
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. QR Code A QR Code is one of the types of barcodes that can be added to a template; see "Barcode" on page 647.
Encoding This option defines the encoding of the barcode. When Auto is selected, the barcode generator determines the encoding based on the supplied string. The other options are: 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.
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. 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.
Royal Mail 2D Mailmark Royal Mail 2D Mailmark is one of the types of barcodes that can be added to a template; see "Barcode" on page 647. 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 648. Initially the barcode will have the barcode type's default properties.
Note that with this option checked, any tilde that needs to be included in the output must be escaped by adding another tilde: ~~. 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.
Barcode properties This topic lists the properties of the barcode type Royal Mail 4-State (CBC). For the properties of other barcode types, see "Barcode type and properties" on page 650. 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.
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.
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. Human Readable Message When this option is checked, PReS Connect shows a human readable text below or above the barcode, as defined using the Text Position, using the specified font and font size.
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 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 650.
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.
Show guardbars Checking this option adds guardbars to the barcode. Guardbars are bars at the start, in the middle and at the end that help the barcode scanner to scan the barcode correctly. 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.
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 l None: The barcode is rendered based on the module width.
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 648. 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 815 and "Styling and formatting" on page 753. 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 753 and "Styling templates with CSS files" on page 755. 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 753 and "Styling templates with CSS files" on page 755.
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 PReS 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 714). 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 943). 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 261), 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 618 and the Capture OnTheGo API: "Camera" on page 630.
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 1350). 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 571). 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 798) and styling (see "Styling templates with CSS files" on page 755). 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 730. 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 571. 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 PReS 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 571. 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 1197). 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 642. 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 865. 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 479). Once added to the content of a template, an image can be resized (see "Resizing an image" on page 780) and alternate text can be linked to it (see "Setting an alternate text" on page 742). Tip Using images in an Email template? See "Using images in email campaigns: tips" on page 532.
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 512. 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 781. 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 781.
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 645) 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 815.
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 642). 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 794. 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 954.
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 645). 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 769. 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 645) 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 943). 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 753. 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 875).
In the Web context, Inline Boxes are the preferred way to position elements; see "Boxes" on page 704. 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 753 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 1013 and "Table Cell Formatting dialog" on page 1017.
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 1368 and "Examples" on page 1328.
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 951. 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 780) 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 943. 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 755. 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 755. 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 753). 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 645). 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, PReS 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 757. 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 645) 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 822. 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 825. 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 865. 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 813). 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 505).
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 819. 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 704 and "How to position elements" on page 770). 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 815. 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 865. 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 897. 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 738. 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 905).
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 774.
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 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=""). data-show-row="all": Shows a row in a (nested) detail table on subsequent pages, as long as there are data for that level on a page.
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 PReS 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.
l l l Run Now: This will run the clean-up service immediately. 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.
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. ------------------------------------------------------------------------------------------ Database Connection preferences Dialog used to change the PReS Connect back-end Database.
Tip If the Test Connection button shows that the database cannot be successfully connected to using the selected settings, then the contents of this field could be used to try to connect to the database outside of PReS Connect. This should help in determining and refining the acceptable connection options. l l Hostname: Enter the IP Address or alias of the server where database resides. Database Instance Name: Enter an existing Microsoft SQL Server's instance name.
Connect is installed upon (CPU speed and the amount of cores being the major determinants). Tip Leaving this value set to the default maximum should be the best option in most circumstances. We recommended this entry be left at the default value. 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.
l l l Test Connection: This will run a test on the current Database Connection settings. 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.
l l l l l Compact: Each CSS rule takes up only one line, with every property defined on that line. Nested rules are placed next to each other with no new line, while separate groups of rules have new lines between them. Compressed: This output style minifies the output. It has no whitespace except that necessary to separate selectors and a new line at the end of the file. It also includes some other minor compressions, such as choosing the smallest representation for colors.
l Edges: The edges around elements in a section in the Workspace. Click the Show Edges icon l l l l l l l l Table: This color highlights tables, and the rows and columns in tables; see "Table" on page 743. Resizable Table: This color highlights tables for which the option Allow resizing has been checked when adding the table; see "Table" on page 743. Forms: This color highlights forms; see "Forms" on page 725.
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.
l l l l l Use authentication: Check if a user name and password are needed to send emails through the host. Start TLS: Enabled if authentication is checked. Sends emails through Transport Layer Security (TLS), which is sometimes referred to as SSL. User: Enter the user name used to connect to the SMTP server. Restore Defaults: There are three default presets, each for working with a different Email Service Provider (ESP): Mandrilapp.
Common Emmet preferences l l l l Expand abbreviations by Tab key: Check to enable the Expand Abbreviation function. ... in files with extension: Enter a comma-separated list of all file extensions in which expand abbreviation will work. 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.
l l Restore Defaults: clear all custom abbreviations. To temporarily disable an abbreviation, uncheck the checkbox next to the name of the abbreviation in the list. Emmet Output preferences The Output Preferences dialog is used to control how the expanded (output) code behaves when expanding abbreviations and snippets.
Emmet Variables preferences Variables are placeholders used in Emmet snippets to output predefined data. For example, the html:5 snippet of HTML syntax has the following definition: \n...\n 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.
Hardware for Digital Signing preferences Connect can access secure hardware devices (USB Tokens, Smart Cards, and Hardware Security Modules) through PKCS#11, for use in creating PDF digital signatures. This Preferences page allows for the configuration of these secure hardware devices. It caters for the two conflicting needs of Connect users. 1.
Language preferences l l Display language: Select a language from the drop-down list to be used as the language of the User Interface (after the software is restarted). Default Locale: The default locale sets the locale for new templates. By default this is the system's locale. The locale can be changed per template; see "Locale" on page 794. l Select System Locale to use the operating system's locale settings. l Select Explicit Locale to choose a static locale from the drop-down list.
The settings are: l Overall Logging Level selection: Select the overall Connect Logging level. This controls how much logging Connect will do. By default the logging level is set at the midpoint of Info, but it can be set higher to include more logging (All, Trace, Debug), or lower to reduce the amount of logging (Warning, Error). The logging is hierarchical, with each Logging Level selection containing all of the Logging Levels below it.
l l Number of files to keep:This sets the maximum number of log files kept in the log folder. The default value is set to 50 for a new Connect installation and 99, 999 for an existing installation (to preserve backward compatibility). Logging pattern edit box: This edit box determines the formatting of the individual log entries. By default it is set to a date/time value which allows for simple searching within log files. Warning We recommend leaving the Logging pattern to the default value.
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. ------------------------------------------------------------------------------------------ Parallel Processing preferences See "Parallel Processing preferences" on page 137.
l Print Server Settings group: l l l l l l Protocol: Use the drop-down to select whether to use the HTTP or the secure HTTPS protocol to connect to the Print Server. Hostname: Enter the IP, machine name or URL of the Print Server. Default is localhost. Port: Enter the port through which to communicate with the Print Server. Default is 9340. 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 148.
Project Wizards preferences Project Wizard deployment settings l Workflow Configurations l Encoding: By default, "Project Wizards" on page 985 set the encoding of the Workflow configuration that they create to the encoding of the system on which the Designer runs (system default).
reached, Auto Backup will overwrite the oldest file. l Destination: Select the directory in which the backups should be stored. l Original: the directory in which the original file is stored. l Other directory: use the Browse button to select another directory. Backup files have the same name as the original file with two underscores and a progressive number (without leading zeros) at the end: originalname__1.OL-template, originalname__ 2.OL-template, etc.
l Designer scripting profiling group: l Number of iterations: Enter the number of times to run scripts when running the Profile Scripts dialog. The default is 1000. Accepted values are 1 to 1000000000. Yes, that's 1 billion - which would take a long time to run! The Scripting 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 l l l Before element: The element is inserted before the current element where the cursor is located. For example if the cursor is within a paragraph, insertion occurs before the
tag. After start tag: The element is inserted within the current element, at the beginning, just after the start tag. Before end tag: The element is inserted within the current element, at the end, just before the end tag. After element: The element is inserted after the current element where the cursor is located.
This topic explains how scripts work and how you can create and write a script. Most scripts can be made using one of the Script Wizards. For a block of variable data, such as an address, the Text Script Wizard is a perfect fit. Paragraphs can be made conditional with a Conditional Script Wizard. For dynamic images, you can use the Dynamic Image Script Wizard. In an Email context, you are provided with a number of Script Wizards to set the sender, the recipients and the subject of the email.
Tip Hover over the name of a script in the Scripts pane to highlight parts of the template that are affected by the script. Next, the script can modify the selected pieces of content, using values from the record that is merged to the template at the time the script runs. It can, for example, hide, replace or add text or change the style of those pieces of content. This is how scripts personalize documents.
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 which kind of selector you want to use. Running a Standard Script starts with searching the template for pieces of content that match the script's selector. The collected pieces of content are passed on to the script, so that the script can modify them. The selector can be: l l l Text, for example: @lastname@, or {sender}.
Tip When output speed matters, choose selector or selector and text. Searching text is a rather lengthy operation, compared to searching for HTML elements and/or CSS selectors. See also: "Testing scripts" on page 875. There is a shorter route to create a script for an element with a specific ID: 1. In the template, click the element for which you want to create a script. 2. On the Attributes pane at the top right, type an ID.
https://www.w3schools.com/js/js_syntax.asp and https://www.w3schools.com/js/js_if_else.asp. A few examples can be found in a How-to: Combining record based conditions. Tip In the editor window, press Ctrl + Space to see the available features and their descriptions. Use the arrow keys to select a function or object and press Enter to insert it in the script. Type a dot after the name of the function or object and press Ctrl + space again to see which features are subsequently available.
var amount = record.fields.AMOUNT; if (amount >= 0) {results.css('color', 'green');} else if (amount < 0) { results.css('color', 'red'); } When this script executes, it stores the value of the AMOUNT field from the current record in a variable and evaluates it. If the value is zero or higher, the color of text in the results - the table cells in this case - will be set to green; if the value is below zero, the text color will be set to red.
it will not run again automatically. So, scripts that produce content that contains one or more selectors for other scripts, need to come first. To change the order in which scripts are executed: l Click a script or a folder in the Scripts pane at the bottom. Drag it up or down and drop it. Note Control scripts are always executed first, regardless of where they are in the Scripts pane.
Tip It may be helpful to put scripts that have an effect on the same context or section in one folder, because you can set the execution scope of scripts per folder (see: "Execution scope" below). Note Control scripts are always executed first, regardless of where they are in the Scripts pane. They can not be excluded from execution for a specific context or section, using the execution scope of a folder; see "Execution scope" below.
Tip For more ways to optimize scripts, see "Optimizing scripts" on page 880. Enable/disable scripts A disabled script will not run at all when the template is merged with a record set to generate output. Disabling script execution in certain contexts or sections helps with performance, since scripts normally run, whether or not their placeholder or selector is present in your template. It is highly recommended to disable any script that is not relevant to specific sections or contexts.
Files that a script may refer to, such as images, snippets and fonts, are not exported or imported together with a script. Test the script to make sure that all files are present in the template and that the script's selector matches something in the content of the template; see "Testing scripts" below. Testing scripts The quickest way to test that scripts work as expected, is to click the Preview tab at the bottom of the workspace.
l l l The information icon (i) shows that the selector of the script does not produce a result in the current section. Note that standard scripts and post pagination scripts are not executed if their selector does not match any elements. A control script is always executed, assuming the script is enabled. 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.
Tip Be aware that scripts run in a specific order (see "The script flow: when scripts run" on page 890). When one script unintentionally influences the results of another script, changing the order of the scripts in the Scripts pane may help (see "Changing the order of execution" on page 871). 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.
Testing for speed issues To measure the time that the execution of scripts will take: l On the Context menu, click Profile scripts. Profiling means running the scripts in the template, with the current record, to see how fast scripts in the Scripts pane execute. It helps greatly in troubleshooting performance issues caused by scripts.
Tip Functions that actually change the content of the template (for example,append()) are comparatively time consuming. Avoid using such functions in a loop. For more tips, see "Optimizing scripts" on the facing page. Note that the times vary slightly per run of the Script Profiler. Run the Script Profiler a number of times and calculate an average from the results, before trying to speed up the execution of a script.
Note The script timeout is not active when generating output. Optimizing scripts In the process of output generation, the execution of scripts may take up more time than necessary. To optimize a template, it helps to disable scripts that don't have an effect on the output; see "Managing scripts" on page 871. 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.
l 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. Avoid DOM manipulations The Scripting API of the Designer is a very powerful tool to manipulate and personalize your document. But keep in mind that DOM manipulation commands like append(), prepend(), before() and after() are resource intensive. Try avoiding DOM modifications, especially within loops.
} results.after(labelStr); Use replace() When personalizing HTML fragments retrieved from a snippet or from the template itself, JavaScript's replace() method shows the best performance. Replace() can only be used on Strings, while the commands loadhtml() and query() return or a QueryResult, which is a set of strings, like the results object. A QueryResult allows you to perform DOM manipulations like adding and removing elements, adding and removing CSS classes etc.
Tip The replace() method as used in the above example replaces only the first occurrence of the search string. To replace every occurrence of a search string in a given string, use a regular expression. In the following line of code, the regular expression /@product@/g makes replace() search for all occurrences of the string @product@ in the label string: label = label.replace(/@product@/g, record.tables.detail [i].
var block = results.html(); var data = record.fields; block = block.replace('@name@',data.first + ' ' + data.last); block = block.replace('@address@',data.address); block = block.replace('@zip@',data.zip); block = block.replace('@city@',data.city); block = block.replace('@country@',data.country); block = block.replace('@saldo@',data.saldo); block = block.replace('@promo@',data.promo); block = block.replace('@customercode@', data.customercode); … results.
To load a JSON snippet in script, use: loadjson(‘snippets/nameofthesnippet.json’). Tip To insert the code to load a snippet even quicker, you can: 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.
if (record.fields.LANGUAGE == ‘En’) { results.loadhtml(‘snippets/nameofthesnippet.html’); } Another example is given in a how-to; see Load a snippet based on a data field value. 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.
var promoTxt = loadhtml('snippets/promo-en.html', '#' + record.fields['YOGA']); promoTxt.find('@first@').text(record.fields['FIRSTNAME']); results.html(promoTxt); 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 749). It is also possible to include content that is served by another server.
remote content: an empty paragraph, for example, or a heading. If the element isn't unique in the template, give the element an ID. 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 865).
Tip To load a JavaScript file (.js) or a style sheet (.css) you can use loadtext(). See "loadtext()" on page 1362. 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.
The script flow: when scripts run When Connect generates the actual output – letters, web pages or emails -, it opens a record set and merges it with the template. It takes each record, one by one, and runs all scripts for it, in a specific order, as explained below. First all Control Scripts are executed, in the order in which they appear in the Scripts pane.
Selectors in Connect Selectors are patterns used to select one or more HTML elements. They were originally developed to be able to define the layout of web pages without touching their content, through Cascading Style Sheets (CSS).
their behaviour. Connect classes and attributes can be used in selectors, as will be explained and demonstrated below. Connect-specific classes usually are invisible in the Designer. By opening the currently selected section in your default web browser (click the Preview HTML toolbar button) and using the browser's code or source inspector you can see most of the dynamically added classes. Warning Avoid using classes with the __ol prefix in your selectors.
Pages. As of version 2019.2 this is no longer the case. The section selector now only selects sections. To target sections as well as Master Pages, use the body selector without the masterpage or section selector. For example: body results.html('
Hello World
'); 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.
The MediaBox contains the Master Page objects and section backgrounds. This means that these classes can only be used to format a Master Page and section background. They do not let you change the formatting of elements residing in the main text flow (e.g. a
element on page 3). Formatting Master Page objects depending on the sheet position The following CSS rule sets the color of elements on a Master Page when that Master Page is present on the front of a sheet. .
You can use the ol_pdf_datamapper_input class as a selector to target the section background in a style rule or script. Placing the section background in front of the Master Page The stacking order of elements inside each MediaBox, from bottom to top, is: 1. Media 2. Section background 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.
.OUTPUT is used when viewing the current section on the Live tab or in an external browser, and when generating output. View selectors allow you to apply formatting to elements in a certain view, for example to highlight or show elements. The Designer itself does this, for example, to highlight all boxes in the Design view, when the Show Edges icon is clicked. Adding an outline The following style rule wraps every element that has the class address-block with a purple dashed outline in Design mode.
Showing hidden Foundation elements In Capture OnTheGo templates based on the Foundation framework the .DESIGN selector can be used to show elements that would otherwise be hidden in the Design view. For example, to expand accordion elements and show validation errors in Design view, you could add the following style rules to your template: .DESIGN .accordion .accordion-navigation > .content { display: block; } .DESIGN small.
Control Scripts differ from Standard scripts in two ways: l l Control Scripts run before all other scripts. When a template consists of several contexts, and these contexts are combined in the output - for example, when an Email is generated with the Print context as attachment - all scripts run once for each context, but Control Scripts always go first. Control Scripts do not touch the content - meaning, the text flow - of the sections. They don't have a selector, like the other scripts do.
What to use a Control Script for Control Scripts let you change the way a template is merged, by giving access to the template with all its contexts and sections in a script. A Control Script may, for example, omit, group and clone sections; add a background to a Print section; or add a header to an email. A number of the things that you can do with them is listed in the table below, with a link to a topic that explains how to do it and that shows what the script should look like.
Task See topic Field/function of section object Add sections dynamically "Dynamically adding sections (cloning)" on page 907. clone() Add a header to an email "section" on page 1414, example: "Adding custom ESP handling instructions" on page 1464.
Page numbering starts with page 1 for each section. If for a section restartPageNumber is set to false, that section will start with the page number following the last page of the previous section. Note that even if a section is not enabled (so it will not be outputted), its restartPageNumber flag is still taken into account for composing the page number sequences. By default, each section has restartPageNumber = false when the first control script runs.
1. Section A page 1 2. Section B page 1 3. Section C page 2 4. Section D page 1 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.
attachments. This topic shows how to do that. For information about Control Scripts in general, see "Control Scripts" on page 897 and "Control Script API" on page 1370. If you don't know how to write scripts, see "Writing your own scripts" on page 865. 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 1414 and "Control Script API" on page 1370.
When generating Email output with the Print context as attachment, the email will have two attachments: l l attachment 1: Section A, Section B attachment 2: "Part2", which is Section C. The file name of this attachment is the part name. 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.
} } Note For another example, see this how-to: Output sections conditionally. 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 505. If you want the section background to be switched automatically, depending on the value of a data field, you need a Control Script.
A DataMapper PDF is, as you would expect, a PDF generated by the DataMapper. A Resource PDF is a PDF from another source. For a DataMapper PDF, nothing else has to be done to set the background.For a Resource PDF, the Control Script should specify a path, for example: var resourceUrl = 'images/policy-' + record.fields.policy + '.pdf'; merge.template.contexts.PRINT.sections['Policy'].background.
merge.template.contexts.PRINT.sections['Policy'].background.end = 5; Setting a page range automatically sets background.allPages to false (see "background" on page 1389). On the other hand, when you first define a page range and then set background.allPages to true, this disables the page range. 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 1379).
For information about Control Scripts in general, see "Control Scripts" on page 897 and "Control Script API" on page 1370. If you don't know how to write scripts, see "Writing your own scripts" on page 865. Cloning a section To clone a section, first use the clone() function and then add the clone to the Print context before or after a specific section, using addAfter() or addBefore(): var printSections = merge.template.contexts.PRINT.sections; var clone = printSections["Section 1"].
Targeting elements in a cloned section Clones that have a unique name can be further personalized with the use of CSS style sheets (see "Styling and formatting" on page 753) and personalization scripts (see "Variable Data" on page 813 and "Writing your own scripts" on page 865). The selector to use is: [section="name of the clone"].
printSections["Section 1"].addAfter(clone); } Cloning a section based on data and assigning a background PDF This script clones a section based on data fields. It disables the source section first and then calls the addPolicy function. addPolicy clones the section, renames it and sets a PDF from the resources as its background. It explicitly enables the clone and then adds it to the Print context. var printSections = merge.template.contexts.PRINT.sections; merge.template.contexts.PRINT.sections["Policy"].
Setting passwords in script To set a password on a Print section in a Control Script, the script should first retrieve the Print section/s using merge.template.contexts.PRINT.sections or merge.context.sections (also see the example below). Next, the script can split the attachments, if needed (see "Parts: splitting and renaming email attachments" on page 902), and it can set a password on each section. For example: l merge.template.contexts.PRINT.sections['Section 2'].password = 'secret'; l merge.
Example This scripts splits the Print output into two PDF attachments and sets a password for the second attachment. var printSections; if (channel == Channel.EMAIL) { // only when generating Email output if (merge.context.type == ContextType.PRINT) { printSections = merge.template.contexts.PRINT.sections; printSections['Section 1'].part = 'PDFAttach1'; printSections['Section 2'].part = 'PDFAttach2' printSections['Section 2'].
Pagination Script can re-paginate a section. l Post Pagination Scripts only apply to the Print context. The output of other contexts is not paginated. Just like Standard Scripts, Post Pagination Scripts have a selector (see: "Selectors in Connect" on page 891). A selector selects parts of the content of a section and stores them in the results object, so that they can be modified in the script (see "results" on page 1408).
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. If you are not familiar with scripting, see "Writing your own scripts" on page 865. 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.
Step 2: Creating a placeholder for the TOC Create one extra Print section to put the Table Of Contents in. Inside the extra section, insert an Article element (see "Inserting an element" on page 644). Give the element an ID, for example: toc-content. This element is the placeholder for the TOC. Step 3: Inserting the Post Pagination script Insert a Post Pagination script (see "Adding a Post Pagination Script" on page 913). Double-click on the new script to open it.
What the script does First the script creates a variable to hold the table of contents: toc. Then it collects all
and elements - in other words, level 1 and 2 headings. The merge.context.query(selector) function searches across all Print sections (see "query (selector)" on page 1407). The query returns a result set. Each of the elements in the result set goes through the callback function defined in each() (see "each()" on page 1346).
Note Whether page numbering restarts in each section, depends on the settings for page numbering; see "Configuring page numbers" on page 514. By default, page numbering starts with page 1 for each section. If the pagination process has changed the page numbers, the TOC needs to be updated as well. To do that, the script first has to collect the page numbers from the table of contents. This is where the number class comes in handy: var $numbers = query('.number');.
1. Add the following variable: var linknumber = 1;. This variable is used to generate unique IDs for elements that don't have an ID. 2. Before the first line that starts with 'toc ', add the following: var anchorId = ''; if (this.attr("id")) { anchorId = this.attr("id"); } else { anchorId = 'generatedID-' + linknumber; linknumber++; this.attr("id", anchorId); } 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.
p.toc-entry .dots { flex-shrink: 1; white-space: nowrap; overflow: hidden; text-overflow: clip; } p.toc-entry .dots::after { font-weight: normal; content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "; } p.toc-entry .number { flex-shrink: 1; text-align: right; font-weight: bold; } These styles make use of the CSS Flexbox Layout Module.
The files that hold the actual translations are not made in the Designer. They can be made in any translation tool that accepts a .pot file as input, and outputs .po files. l l The .pot file is exported from the "Translations pane" on page 1060 in the Designer. The file contains a list of texts in the base language. In OL Connect this is the language in which the template was originally written. A .po file holds translated texts for one language. Each .
The result is a .po file (one per language). 5. Import the .po file or files. See "Importing translations (.po)" on page 926. 6. Set the template's Locale, or select the field that contains a Locale value, in order to get output in the correct language. See "Changing the locale" on page 795. Translating snippets "Snippets" on page 749 get translated when they are inserted in the output, if the text is tagged for translation (see "Tagging text in snippets" on page 923).
One translation entry works for all HTML elements that are tagged for translation and have exactly the same text. Note Remember, only text in HTML elements that are tagged for translation get translated in the output. 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 1060 to restore the connection.
Tagging text in snippets If the text that you want to tag for translation is located in a snippet, do not tag it in the section where the snippet is used. Instead, open the snippet (see "Snippets" on page 749) and tag the elements inside the snippet as described above. 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.
HTML tags in translation entries A translation entry may contain HTML tags, for example when part of the text is styled or when there is a hyperlink in the text. HTML tags must not be translated or removed. Normally, translators will recognize a simple bold or italic tag (... or ... respectively), but more complex elements like hyperlinks could cause problems. The translator may accidentally modify the tag, and break the hyperlink for example.
Note that it isn't required to translate the template effectively. You may also create a translation file for the original language of a template and use it just for pluralization by entering plurals only. To enable pluralization on a translation entry: 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.
This topic explains how to export the .pot file and how to import a .po file. 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 919.
agency, remember to send them a copy of the modified .po file to keep the .po files in sync. 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 .
l "Attributes pane" on page 1040 l "Styles pane" on page 1059 l "Translations pane" on page 1060 l "Workspace" on page 1061 (Source, Design and Preview tabs) l "Data Model pane" on page 1043 l "Scripts pane" on page 1056 l "Preflight Results and Messages" on page 1046 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 550. 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 708).
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 943), 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 943), 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 753 and "Styling templates with CSS files" on page 755. 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 860.
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 704.
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 943). Alternatively you could type a name or value in the Color field directly.
Border tab For information about borders see "Border" on page 784. 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 786. 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 753. 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 955. For more information about stylesheets, see "Styling templates with CSS files" on page 755. For more information about using JavaScript, see "Using JavaScript" on page 577. 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 753 and "Styling templates with CSS files" on page 755. 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 772). 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 943).
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 559). Includes are transferred to the imported section. Overwrite: Replace the existing resource.
Email clients do not read CSS files and some even remove a