Print sections

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).
The Print context can also be added to Email output as a PDF attachment; see Generating Email output.
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.

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.
The minimum number of pages can be set via the Print section properties; see Print section properties.

Although generally the same content elements can be used in all three contexts (see Content elements), the specific characteristics of pages make it possible to use special elements, such as page numbers; see Page numbers .

See Pages for an overview of settings and elements that are specific for pages.

Using headers, footers, tear-offs and repeated elements

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 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. This ensures that elements added to the Print context will correspond to their correct location on the preprinted media.

When both Media and a Master Page are used on a certain page, they will both be displayed on the Preview tab of the workspace, the Master Page being 'in front' of the Media and the Print section on top. To open the Preview tab, click it at the bottom of the Workspace or select View > Preview View on the menu.

See Media for a further explanation about how to add Media and how to apply them to different pages.

Note: The Media will not be printed, unless this is specifically requested through the printer settings; see Generating Print output.

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.

Adding a Print section

The Print context can contain multiple sections: a covering letter and a policy, for example, or one section that is meant to be attached to an email as a PDF file and another one that is meant to be printed out on paper. When a Print template is created (see Creating a Print template with a Wizard and Print context), 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:

  • 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.

The first Master Page (see Master Pages) and Media (see Media) will automatically be applied to all pages in the new section, but this can be changed, see Applying a Master Page to a page in a Print section and Applying Media to a page in a Print section.

Editing PDF files in the Designer is not possible, but when they're used as a section's background, you can add text and other elements, such as a barcode, to them.
The quickest way to create a Print template based on a PDF file is to right-click the PDF file in the Windows Explorer and select Enhance with Connect. Alternatively, start creating a new Print template with a Wizard, using the PDF-based Print template (see Creating a Print template with a Wizard).
To use a PDF file as background image for an existing section, see Using a PDF file as background image.

Via a Control Script, sections can be added to a Print context dynamically; see Dynamically adding sections (cloning).
If you need a Print section to be visible in the output only under certain conditions, consider using the Conditional Print Section script wizard; see Conditional Print sections.

Deleting a Print section

To delete a Print section:

  • On the Resources pane, expand the Contexts folder, expand the Print context, right-click the name of the section, and then click Delete.

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 Saving Preferences.

Arranging Print sections

When generating output from the Print context, each of the Print sections is added to the output document, one after the other in sequence, for each record. The sections are added to the output in the order in which they appear on the Resources pane, so changing the order of the sections in the Print context changes the order in which they are outputted to the final document.

To rearrange sections in a context:

  • 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. In the Arrange Sections dialog you can change the order of the sections by clicking the name of a section and moving it using the Up and Down buttons.

Styling and formatting a Print section

The contents of a Print section can be formatted directly, or styled with Cascading Style Sheets (CSS). See Styling and formatting.

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. From the File types dropdown, select Stylesheets.
  3. Choose which CSS files should be applied to this section. The available files are listed at the left. Use the arrow buttons to move the files that should be included to the list at the right.
  4. You can also change the order in which the CSS files are read: click one of the included CSS files and use the Up and Down buttons. Note that moving a style sheet up in the list gives it less weight. In case of conflicting rules, style sheets read later will override previous ones.
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.
Style sheets that are linked to (i.e. included in) a section show a chain icon in the Resources pane (see Resources pane).

Using a PDF file as background image

In the Print context, a PDF file can be used as a section's background. It is different from the Media in that the section considers the PDF to be content, so the number of pages in the section will be the same as the number of pages taken from the PDF file.

With this feature it is possible to create a Print template from an arbitrary PDF file or from a PDF file provided by the DataMapper. Of course, the PDF file itself can't be edited in a Designer template, but when it is used as a section's background, text and other elements, such as a barcode, can be added to it.

Encrypted PDF files are not supported in PDF pass-through mode.

To use a PDF file as background image:

  1. On the Resources pane, expand the Print context, right-click the print section and click Background.
  2. Click the downward pointing arrow after Image and select either From Datamapper input or From PDF resource.
    From Datamapper input uses the active data mapping configuration to retrieve the PDF 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).
    • Click Resources, Disk or Url, depending on where the image is located.

      • Resources lists the images that are present in the Images folder on the Resources pane.

      • Disk lists image files that reside in a folder on a hard drive that is accessible from your computer. Click the Browse button to select a folder (or an image in a folder).
        As an alternative it is possible to enter the path manually. You can give a local path (e.g. C:\Images\Test.jpg) or use the "file" protocol. The complete syntax of a fully qualified URL with the "file" protocol is: 

        file://<host>/<path>

        . Note: if the host is "localhost", it can be omitted, resulting in 

        file:///<path>

        , for example:

        file:///c:/resources/images/image.jpg

        .

      • Url lists image files from a specific web address. Select the protocol (http or https), and then enter a web address (for example, http://www.mysite.com/images/image.jpg).

      If a URL doesn't have a file extension, and the option Save with template is 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

      &amp;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.

    • With an external image, you can check the option Save with template. If this option is checked, the file will be inserted in the Images folder on the Resources pane at the top left.
      If it isn't saved with the template, the image remains external. Note that external 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.

  4. Select the PDF's position:
    • Fit to page stretches the PDF to fit the page size.
    • Centered centers the PDF on the page, vertically and horizontally.
    • Absolute places the PDF at a specific location on the page. Use the Top field to specify the distance between the top side of the page and the top side of the PDF, and the Left field to specify the distance between the left side of the page and the left side of the PDF.
      The Top and Left offset can be specified in the usual units of measurement or as a percentage of the page (for example: a Left value of 25% means it will be placed at 25% of the page width).
  5. Set the scale of the image as a percentage of the original image.
  6. Click one of the options next to Rotation to rotate the image.
  7. Optionally, if the PDF has more than one page, you can set the range of pages that should be used.
    The number of pages in the Print section is automatically adjusted to the number of pages in the PDF file that are being used as the section's background image.
  8. Finally, click OK.
To set the background of a section in script, you need a Control Script; see Control Scripts and Control Script API.
An alternative to using a PDF as background inside the template is to layer the template (i.e. the PDF output of a Print section) over the background PDF via a Script task in a Workflow process. This is called 'stamping'. In the unusual case where extracting text from the PDF that is the output of a Print section with a PDF background doesn't work, it is recommended to use this method.

Setting the binding style for a Print section

In printing, Finishing is the binding style, or the way pages are bound together. Each Print section can have its own Finishing settings, as well as the Print context as a whole; see Setting the binding style for the Print context.

To set the binding style of a Print section:

  1. On the Resources pane, expand the Contexts folder, expand the Print context and right-click the Print section.
  2. Click Finishing.
  3. Choose a Binding style and, if applicable, the number of holes.
Overriding binding styles in a job creation preset

A Job Creation Preset can override the binding styles set for the Print sections and for the Print context as a whole. To bind output in another way than defined in the template’s settings:

  1. Create a Job Creation Preset that overrides the settings of one or more sections: select File > Presets and see Job Creation Presets for more details.
  2. Select that Job Creation Preset in the Print wizard, or send it to Workflow and select it in the task that creates Print content; see Generating Print output.

Enabling double-sided printing (Duplex, Mixplex)

To print a Print section on both sides of the paper, that Print section needs to have the Duplex printing option to be enabled. This is an option in the Sheet Configuration dialog. (See Sheet Configuration dialog.)

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.
    • Check Omit empty back side for Last or Single sheet to reset a page to Simplex if it has an empty back side. Thus changing a Duplex job into a Mixplex job may reduce volume printing costs as omitted back sides aren't included in the number of printed pages.
      Empty means that there is no content and no master page on that side. To suppress the master page on emtpy back sides and single sheets, check the option Omit Master Page Back in case of an empty back page.
    • Check Tumble to duplex pages as in a calendar.
    • Check Facing pages to have the side margins switched alternately, so that after printing and binding the pages, they look like in a magazine or book. See Pages to find out how to set a left and right margin on a page.
Master Pages, Media and Duplex printing options can also be set in a Control Script (see Control Scripts and Control Script API). This is especially useful when you need identical sections with different settings.