Multi-page PDF Output in AE Workflow

nora

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")

destDoc.Create
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
Next

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

Thanks,
Nora
 
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.
 
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.
 
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.
 

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top