Overlaying PDFs

Is it possible to overlay PDFS?

For some of our work we want to load a Basestock PDF and then overlay a customer specific PDF. Both of these are Dynamic.

For instance we would have

Basestock-A
Basestock-B
Basestock-C

CustomerPDF-1
CustomerPDF-2
CustomerPDF-3

and we could have any combination of Basestock & customer PDF driven by fields in the Datamapper.

Thanks

Hi timj, could you provide a bit more context regarding the type of documents? For example are the Basestock images multipage or singe page? Can I consider the CustomerPDF something like virtual stationery background (repeated for each page)?

A possible approach is to:

  1. Apply the dynamic ‘basestock’ PDF document as a pre-printed media*
  2. Apply the dynamic ‘customer specific’ PDF document as a dynamic background to the print section
  3. Enable the option Print virtual stationary on the output preset side

*For this you can use a Control script like this, for example:

Control script

Name: Example

var field = record.fields["field_name"];

if (field !== "") {
	var stationery = merge.template.media["media_name"].stationery;
	
	stationery.front.enabled = true;
	stationery.front.url = "file:///C:/PPWorkDir/Resources/Images/" + field + ".pdf";
	stationery.front.page = 1;
	stationery.front.position = MediaPosition.CENTERED;
}

Hi Erik

The 1st PDF would be a Customer PDF for i.e Customer 1, Customer 2, Customer 3 with that customers logo and Footer on it.
The 2nd PDF would then be a Product PDF. Product A, Product B, Product C. With specific info for the Products.

Customer PDF is single page, Product PDF Duplex. We have looked at setting 1 as virtual stationary but couldn’t see a way to change this dynamically although it looks like Marten may now have given us the answer with the Control Script provided so we will try this.