Please enable JavaScript to view this site.

Overview

Dynamic Images are images that are created at the time of running your Cobwebb Design, which can be useful if you have images that change on a regular basis and you don't want to have to keep updating your Cobwebb Design to import the latest changes. In order to use Dynamic Images in your Cobwebb Design the PPD has to:

1.Include a call to the IMG2CRG Cobwebb Exit Program. This will import the selected image into the Cobwebb Image Library.

2.Use the return value from PARM4 of the IMG2CRG as the Image Name.

Limitations

Whilst this can be extremely useful there are some limitations that you may wish to consider before using Dynamic Images.

If you do specify a CPPD Image Library Entry Name in PARM4 then, if you are outputting to Fax or Email and the message is waiting on the Cobwebb Queue to be sent, potentially the next time that the same Cobwebb Design is run a different image could be imported (if you had changed the original image passed in PARM1) and when the Fax or Email is eventually sent it may go with a different image. Also if the same Cobwebb Design was archiving the document the image in the Fax/EMail could potentially be different to the one stored in the Archive if it is waiting on the Cobwebb Queue for a while.

If you don't specify a CPPD Image Library Entry Name in PARM4 then a unique name is generated each time the Cobwebb Design is run and you could end up with hundreds of images for that PPD left in the Cobwebb Image Library. The way to remove them all in one go is to re-upload your Cobwebb Design to the Server.

Dynamic versus Global Images

Before using Dynamic Images you may wish to consider using Global Images which are images that are to exported to the server for use by any PPD file. Global Images can be used in multiple PPD files such as Header or Footer images which are the same for all your documents. These can be added to one single Global PPD which is exported to the Server and then referenced in all of your other PPDs. In this way if your Header or Footer images need to change you only need to change them once in your Global PPD and export that one PPD to the Server for the changes to take effect.

Designing your Cobwebb PPD

Step 1 - Add the call to IMG2CRG

The first step is to add the call to the IMG2CRG Exit Program where you specify the location of the image you wish to import together with other configuration options. Please see the topic on IMG2CRG for a definition of all of the parameters.

IMG2CRG

Step 2 - Add the return parameter PARM4 to a Variable

Next it is a good idea to store the value returned in PARM4 as a Variable in case you need to call another Exit Program before you define the Image.

Store PARM4 as a Variable

Step 3 - Use the Variable as the Image Name

Lastly, when you add the Image to the page, you need to specify the File Name as the CPPD Image Library Entry Name you have stored in your variable.

Use Variable as Image File Name