1 person found this helpful
I use default.def for this. Determine the job based on a search string in the first few lines of the file.
Will that still use the jobcard defined in the xml, or will I have to define all the job parameters in the default.def file. I need to create PDF files with a unique name for each file processed
1 person found this helpful
I don't think you can put variable data into the default.def file, just the "^job myjob". It means you have to get creative. If you need a unique PDF file name, one option is to ensure that the transaction file is uniquely named and use that. Your merge task would reference the @DataFile. variable when constructing the -z option.
If you want to construct the name of your PDF using other data in the data file, that's a bit trickier. One technique that I've used is to use XMLImport to convert your XML to a field nominated file, then use transformation agent to create a new job file from that one.
Below is a TDF that does that. In my data file, ^field Address is always the first field. I only have one instance of ^field Address, otherwise this would split my file (which can be handy). I'm pulling out the value of the field CustomerNumber to put it in the job card line. In my case, I'm using the value by way of @OtherJobTokens., but you could put it in after a -z.
==== Transformation Definition File
==== Created by the Visual Transformation Editor Version 126.96.36.1998
==== Mar 24, 2006
==== Option Table :
==== O [quote] [discard formfeed] [lines per page] [carriage control] [strip newlines]
==== [page script] [sections per page] [file type] [delimiter]
O î N 0 N N Y Y O
==== File Table :
==== F [search string] [start column] [end column] [offset]
F î^field Addressî 1 14 0
==== Section Table :
==== S [previous section] [next section] [search string]
==== [start line] [end line] [start column] [end column] [operator]
S * NewRecord î^field Addressî 1 * 1 14
==== Extraction Table :
==== E [extract name] [section name] [search string] [occurence]
==== [start line] [end line] [from column] [to column] [from row] [to row] [terminator]
E Data NewRecord îî 1 0 * 1 99 0 0 îî
E CustomerNumber NewRecord î^field CustomerNumberî 1 +1 * 0 99 1 1 îî
==== Visual Transformation Editor
==== Warning : Do not change or move the text enclosed within "----"
==== Script Table :
^job CRDB_MERGE "CE_ADD_CHG;CE_ADD_CHG;@CustomerNumber." "docname;doctype;custnum"
#comment ---- Data ----
Thanks for your help and suggestions, we have gone down the path of developing a biztalk adapter to send the XML
data to the collector directory in the format that Adobe wants it
You might have solved this in BizTalk by now, but here is another helpful hint:
What version of Central are you using? If you are using 5.6 or above, you can use <?adobecentral ^job JOBNAME -zprt?>, without having to:
- 1) put the processing instruction on the first "physical" line
- 2) insert a newline within the <?jetform?> processing instruction, before the end ?>
You might consider changing your BizTalk output, even if you got it working. The <?adobecentral?> instruction is alot more xml friendly, and doesn't break if you open and save the file from an "intelligent" xml editor.
The only requirement is that the whole of the <?adobecental?> instruction is contained within the first 4096 bytes of the file. (Normally easily achivable... : )