5 Replies Latest reply on Feb 26, 2010 12:24 AM by Vegard Bakke

    Problem with generating XML for Adobe Central


      I have a BizTalk application to generate xml files for

      processing through Adobe Central.  the top line of the XMl file is generated in a class library using




      string temp = @"<?xml version=""1.0"" encoding=""utf-8""?><?jetform ^JOB " + OutFormArr[2] + " -z" + Destination + " -afxON" + Environment.NewLine + "?>" + origDoc;


      the string temp is loaded into an XML document and saved into the collector directory using




      The file errors because a carriage return/line feed appears before the '<?jetform' tag.  I can save it using a text writer as it needs to be an XML message inside Biztalk.  Does anyone have any ideas on how to generate the XML using .net xml methods and not having to use something like StreamWriter

        • 1. Re: Problem with generating XML for Adobe Central
          Jared Langdon Level 1

          I use default.def for this.  Determine the job based on a search string in the first few lines of the file.

          1 person found this helpful
          • 2. Re: Problem with generating XML for Adobe Central
            Mebekew Level 1

            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

            • 3. Re: Problem with generating XML for Adobe Central
              Jared Langdon Level 1

              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.


              Jared Langdon




              ==== Transformation Definition File

              ==== Created by the Visual Transformation Editor Version

              ==== 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 :

              #startscript NewRecord

              ^job CRDB_MERGE "CE_ADD_CHG;CE_ADD_CHG;@CustomerNumber." "docname;doctype;custnum"

              ^form AddressConfirmationLetter

              #comment ---- Data ----

              #for Data




              1 person found this helpful
              • 4. Re: Problem with generating XML for Adobe Central
                Mebekew Level 1

                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

                • 5. Re: Problem with generating XML for Adobe Central
                  Vegard Bakke

                  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...  : )