Multi-page PDF Output in AE Workflow


New member
I'm relatively new to Automation Engine. I'm trying to create a report in a workflow that will be multi-page PDF. Each individual page is generated by steps within the workflow and I am trying to concatenate them together.

I have tried multiple ways of doing this, all with the same result of a one page PDF that is very tall. Then I started experimenting with doing it via a VB script and executing it via the 'Run Script' ticket within the workflow.

I have created and tested a VB script that works well when NOT executed from an Esko workflow. When executed from an Esko workflow it is failing at the point of opening the first input file (and subsequent input files) as a PDDoc object.

My 'Run Script' ticket indicates to run on my local PC where I have Acrobat Pro installed. This is also where I have tested the VB script and it executes correctly.

Can someone please help me with determining why the open of the input file continues to fail when executed via the workflow?

Below is my VB script:

Function Main(inputs, outputFolder, params)

dim app
dim srcDoc, destDoc
dim blnReturnValue

set app = CreateObject("AcroExch.App")
set srcDoc = CreateObject("AcroExch.PDDoc")
set destDoc = CreateObject("AcroExch.PDDoc")

For Each input In inputs
'This open is not working.
blnReturnValue = srcDoc.Open(input)
if blnReturnValue = 0 then
wscript.echo "input=" & input
wscript.echo "input open failed"
end if
blnReturnValue = destDoc.InsertPages (destDoc.GetNumPages() - 1, srcDoc, 0, srcDoc.GetNumPages(), 0)
blnReturnValue = srcDoc.Close

blnReturnValue = destDoc.Save (1, outputFolder & "/" & "NorasTest.pdf")
blnReturnValue = destDoc.Close
blnReturnValue = app.CloseAllDocs()
set srcDoc = nothing
set destDoc = nothing
blnReturnValue = app.Exit
set app = nothing

Main = blnReturnValue

End Function



Well-known member
Rather then scripting Acrobat, why not have your VB Script create a JDF runlist based on the files that hit the "run script" task. Then you can use the "create PDF from JDF" task to take that runlist and create the multipage PDF for you. I do this with an Applescript.

There is also the application "Automation Engine Runlist Editor". This will create a runlist for you manually that you can use for the format.


New member
I did try the runlist approach. I had a 'Create Runlist' ticket, followed by a 'Convert Selection' ticket with the output format set to 'imposition', followed that with an 'Export Imposition to JDF Layout' ticket and the the 'Create PDF File from RunList' ticket. This also gave me the same output... a one-page PDF with one very tall page.


Well-known member
Don't get confused with the "Create Runlist" ticket. This is only used to create a runlist from JDF via a 3rd party imposition program like Preps or Dynagram. It is not to join pages into a multipage document. I would just create a VB script to write out a XML/JDF file.

What About Profitability?

What about Profitability?
Offset yields new advantages

Read All About It