|
Generating outputWhen merged with a record set, the templates made in the Designer can generate Print outputPrint templates, also called Print sections, are part of the Print context. They are meant to be printed to a printer or printer stream, or to a PDF file (see Generating Print output). To dynamically select a section for output, use a Control Script; see Control Scripts. There is a number of settings in the Print context and Print sections that have an impact on how the Print context is printed; see Print settings in the Print context and sections. To split the Print output into several files, see Splitting printing into more than one file. Email outputThe Email context outputs HTML email with embedded formatting to an email client through the use of an email server. The HTML generated by this context is meant to be compatible with as many clients and as many devices as possible. Although the Email context can contain multiple Email templates, only one of them can be merged with each record. Which one is used, depends on a setting; see Email output settings in the Email context and sections. Email To test a template, you can test the scripts (see Testing scripts) and send a test email first (see Send Test Email), before actually sending the email (see Generating Email output). AttachmentsOutput, generated from an Email template, can have the following attachments:
To learn how to attach other files, see Email attachments. Web outputThe Web context outputs an HTML web page that contains the HTML text and all the resources necessary to display it. Web output can be generated in two different ways: it can be attached to an Email template when generating Email output (see above), or it can be generated using Workflow; see Generating Web output. Although the Web context can contain multiple Web pages, only one of them can be merged with each record. Which one is used, depends on a setting; see Web output settings in the Web context and sections. Optimizing a templateScriptsIn 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 context that you're generating output from; see Managing scripts. Other ways to speed up script execution are described in another topic: Optimizing scripts. ImagesWhen a template that contains lots of images is merged with a large record set, the many file requests may slow down the process of output generation. The solution is simple: combine the images into a single image file and display the part that holds the image. This reduces the number of file requests and can improve the output speed significantly. Step 1. Create a file that contains a collection of images.Static images may go in any type of image file. Store images that need be added dynamically to the template, in one PDF file, one image per page. There are several tools to combine image files into a singe PDF. ImageMagick is one of them. You could use the convert command of the ImageMagick library:
You could also use Connect Designer itself: create a print template with the size of your images and set the page margins to 0. Create a script that loops over your images and adds them to the text flow of the template. Subsequently generate PDF output and use the resulting file as your collection file. Step 2. Add the file that contains the collection of images to the template's Resources (see Adding images).Step 3. Display part of the collection file as an image in the template.
|
|