Topic Options
#39719 - 05/31/12 12:45 PM Create PDF Dynamically
Scott Jones Offline
OL Newbie

Registered: 12/12/11
Posts: 17
HI All,

I have a workflow that needs to print a different document depending on a what a variable contains, i have created a script that populates the variable with the following sample code:

Code:
DIM Str1
Str1 = Watch.GetVariable("paper")

IF Str1 = "ABB" THEN
Watch.SetVariable "Doc", "BR_ABB"
ELSE IF Str1 = "ESO" THEN
Watch.SetVariable "Doc", "BR_ESC"
END IF


I want to be able to do a "create PDF" using the variable 'Doc' however i cannot do this (it wont let me use a variable i have to select the document)

This is not very good as i have 20 docs that could be printed out (i cant put these into one big doc as all the conditions slow the file down so that it prints 1 doc every 30 seconds - already tried). I dont want to have to create 20 different text conditions all with send to file and print on the yes branch as this is duplicating everything (and as a programmer duplication is bad)

So my question is this -> can i create a PDF dynamically via a script? if so does anyone have any examples? or is there another module that will allow this?

I really don't wanna have to go down the branch route, which i think is plain stupid, i personally think that the ability to create a PDF dynamically should be a core function.

Top
#39720 - 05/31/12 01:21 PM Re: Create PDF Dynamically [Re: Scott Jones]
Mike R. Offline
OL Newbie

Registered: 05/31/12
Posts: 3
Loc: OL Germany
Hi Scott,

Sure you can use dynamic documents.
1. Set the variable to "BR_ESC.ptk"
2. Select in the PDF Plug-In "%o | *Dynamic name | ..."
3. Click on the %o and you will be able to write your variable name "%{Doc}" in this field or use the right-click menu and select your variable from the list.

That's it! The Plug-In will now use the document in your variable.

Regards,
mike


Edited by Mike R. (05/31/12 01:25 PM)

Top
#39728 - 06/01/12 05:23 AM Re: Create PDF Dynamically [Re: Mike R.]
Scott Jones Offline
OL Newbie

Registered: 12/12/11
Posts: 17
Hey thanks for the instructions!

That worked a treat - no idea how that got passed me smile

Top
#39729 - 06/01/12 05:59 AM Re: Create PDF Dynamically [Re: Scott Jones]
Mike R. Offline
OL Newbie

Registered: 05/31/12
Posts: 3
Loc: OL Germany
I am glad I could help you ;-)

Top