2022.1

Table Of Contents
l Use a fast network and internet connection or avoid loading external or internet
resources. Using images, JavaScript or CSS resources located on a slow network or on a
slow internet connection will obviously lead to a loss of speed. While we do our best for
caching, a document with 5,000 records which queries a page that takes 1 second to
return a different image each time will, naturally, slow output generation down by up to 83
minutes.
l Make sure to use optimized graphic resources. For instance, avoid using images with
transparency where no transparency is needed.
Images
l Make sure to use optimized graphic resources. For instance, avoid using images with
transparency where no transparency is needed.
l 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. One solution is to combine
the images into a single image file (an 'image sprite') and display the part that holds the
image. This reduces the number of file requests and can improve the output speed
significantly.
Creating and using image sprites
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 PDFfile, 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 1575