Media
When the output of a Print 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 , in the form of a PDF file, to the Media folder.
Media can be applied to pages in a Print , to make them appear as a background to those pages. This ensures that elements added to the Print context will correspond to their correct location on the preprinted media.
For further explanation about how to apply Media to different pages, see Applying Media to a page in a Print section.
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 Adding Media.
Adding Media
To add a Media, right-click the Media folder on the Resources pane and select New Media.
The new Media is of course empty. You can specify two PDF files for the Media: one for the front, and, optionally, another for the back.
Specifying and positioning Media
Specifying a PDF for the front: the fast way
To quickly select a PDF file for the front of a Media, import the PDF file by dragging it from the Windows Explorer to the Images folder on the Resources pane. Then drag that the PDF file from the Images folder and drop it on one of the Media in the Media folder. With this method you can not set any options.
To be able to specify a PDF file for both the front and the back of the Media, and to specify a position for the Media's PDF files, you have edit the properties of the Media.
Setting Media properties
Media have a number of properties that you can set, as described below. What you cannot set are a Media's page size and margins. The page size and margins are derived from the section to which the Media is applied.
You can, however, specify a PDF file (or any other type of image file) for both the front and the back of the Media, and specify how the virtual stationery should be positioned on the page. This is done as follows:
- On the Resources pane, expand the Contexts folder, expand the Media folder, right-click the Media and click Virtual Stationery.
- Click the Select Image button to select a PDF image file.
- Click Resources, Disk or Url, depending on where the image is located.
- Resources lists the PDF files that are present in the Images folder on the Resources pane.
- Disk lets you choose an image file that resides in a folder on a hard drive that is accessible from your computer. Click the Browse button to select an image.
As an alternative it is possible to enter the path manually. The complete syntax 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. Check the option Save with template to insert the image into the Images folder on the Resources pane.
- Url allows you to choose an image from a specific web address. Select the protocol (http or https), and then enter the web address (for example, http://www.mysite.com/images/image.jpg).
It is not possible to use a remotely stored PDF file as virtual stationery, because the number of pages in a PDF file can not be determined via the http and http protocols. Therefor, with an external image, the option Save with template is always checked.
- Select a PDF file.
- If the PDF file consists of more than one page, select the desired page.
- Click Finish.
- For each of the PDF files, select a 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.
- Finally, click OK.
Setting the paper's characteristics
To set a Media's paper characteristics:
- On the Resources pane, expand the Contexts folder, expand the Media folder, and right-click the Media. Click Characteristics.
- Specify the paper's characteristics:
- 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).
- Front Coating: The pre-process coating applied to the front surface of the media, such as Glossy, High Gloss, Matte, Satin, etc.
- Back Coating: The pre-process coating applied to the back surface of the media.
- Texture: The intended texture of the media, such as Antique, Calenared, Linen, Stipple or Vellum.
- Grade: The intended grade of the media, such as Gloss-coated paper, Uncoated white paper, etc.
- Hole Name: A predefined hole pattern that specifies the pre-punched holes in the media, such as R2-generic, R2m-MIB, R4i-US, etc.
- Click OK.
Rename Media
To rename Media:
- On the Resources pane, expand the Contexts folder, expand the Media folder, right-click the Media and click Rename. Type the new name and click OK.
- Alternatively, on the Resources pane, expand the Contexts folder, expand the Media folder, right-click the Media and click Properties. Type the new name in the Name field and click OK.
Applying Media to a page in a Print section
Every page in a print section has a natural position: it can be the first page, the last page, one of the pages in between (a 'middle page'), or a single page. For each of those positions, you can set different Media.
To apply Media to specific page positions in a Print section:
- On the Resources pane, expand the Print context; right-click the Print section, and click Sheet configuration.
- 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. If Duplex is enabled, you can also 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.
- If the option Same for all positions is checked, the same Media will be applied to every page in the print section. Uncheck this option.
- Decide which Media should be linked to each sheet position: click the downward pointing arrow after Media and select a Media.
- Optionally, decide which should be linked to each sheet; see Master Pages.
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.
Dynamically switching the Media
In addition to applying Media to sheets via the settings, it is possible to change Media dynamically, based on a value in a data field, in a script. The script has already been made; you only have to change the name of the Media and the section in the script, and write the condition on which the Media has to be replaced.
- On the Resources pane, expand the Contexts folder, expand the Print context, right-click the print section and click Sheet configuration.
- 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.)
- In the area for the respective sheet position, click the Edit script button next to Media. The Script Wizard appears with a standard script:
results.attr("content","Media 1"); Media 1 will have been replaced with the name of the media selected for the chosen sheet position. The field in the Script Wizard contains the name of the section and the sheet position that you have chosen.
- Change the script so that on a certain condition, another media will be selected for the content. For instance:
if(record.fields.GENDER === 'M') { results.attr("content","Media 2"); } This script changes the media to Media 2 for male customers. See Writing your own scripts if you are not familiar with how scripts are written.
- Click Apply, open the tab Preview and browse through the records to see if the script functions as expected.
- When you click OK, the script will be added to the Scripts pane.
Printing virtual stationery
Media are not printed, unless you want them to. Printing the virtual stationery is one of the settings in a Job Creation Preset. To have the virtual stationery printed as part of the Print output:
- Create a job creation preset that indicates that Media has to be printed: select File > Presets and see Job Creation Presets for more details.
- Select that job creation preset in the Print Wizard; see Generating Print output.
|
|