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:
Str1 = Watch.GetVariable("paper")
IF Str1 = "ABB" THEN
Watch.SetVariable "Doc", "BR_ABB"
ELSE IF Str1 = "ESO" THEN
Watch.SetVariable "Doc", "BR_ESC"
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.