2018.1

Table Of Contents
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" on page1134.
Optimizing a template
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
context that you're generating output from; see "Managing scripts" on page694.
Other ways to speed up script execution are described in another topic: "Optimizing scripts" on
page701.
Images
When 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:
convert C:/myimages/*.jpg C:/myimages/image-collection.pdf
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.
Page 1103