Dynamically add aditional pages in a document

I am not sure if this applies to designer, workflow, or both. I hope I can explain this clearly.

We have a need to pull additional documents into a design document dynamically from an imaging system to create a packet in addition to the document we are creating with the data. Some of these documents have multiple pages. These imaging resources can be PDF, TIFF, or JPEG.

In Planet Press Suite Designer we set forms to have pages as placeholders. A dynamic image would represent the page content and would take up the whole page.

To list the high level picture:

  1. Data would come to create an invoice. This invoice is created in design
  2. Additional backup documentation would need to be produced with the invoice
    1. This backup documentation would come from an imaging repository and would contain many or all of the following:
      1. Shipping Confirmation
      2. original order
      3. manufacturing order
      4. delivery confirmation
      5. Etc

How would this be accomplished in Connect?

BTW - the pointers to the documents in the imaging repository would be in the data

You could try in a Designer control script with cloning a section and add a pdf resource as a background afterwards.

I assume that if it works with a PDF it would work with a TIFF or JPEG.

If the image contained multiple pages would that accommodate?

Are there any examples of that kind of control script that I could find?

Thanks!

for plain images or single sided PDF: just create an image frame and set its contents via script:

results.attr(‘src’,‘images/’+myvar+‘.tif’);
results.show();

works with tif,pdf,jpeg…

for multi-page PDF use the background of the section, multi-paged PDFs will render as expected. For multi-page tiffs I don’t know.

control script for multi-paged PDFs:

if (record.fields[“addcontent”]== ‘true’) {
printSections[‘Section1’].enabled=true;
printSections[‘Section1’].background.source=BackgroundResource.RESOURCE_PDF;
myURL = ‘images/’ + record.fields [“BackupDoc”] + ‘.pdf’; //Image stored in template, can be external path
printSections[‘Section1’].background.url = myURL;
}

you might test for the extension and add the background only if it’s a pdf and for the image box do the same…