9 Replies Latest reply on Mar 22, 2017 10:06 AM by PriyankP

    Create one PCL from multiple forms?

    BjornEricsson

      I need to create a process that takes one XML file as input and generates one PCL as an output. The input XML will have a fixed top-level hierarchy and then include multiple (1..*) "form level XML". It is this "form level XML" that contain all the data for a form (referenced in the BIND-tag of the XDP). The easies approach would be to first create PDF of each form, combine them and the convert to PCL. That will not work because then all the printer related data will be lost. I have also researched how to combine multiple PCL to one, but failed to find any stable solution. What I'm left with is to combine all the XDPs to one and then rewrite all the BIND-tags to match the structure of the current input XML file.  How would you do this? XSLT within the process? Are there other strategies that will generate one PCL with printer specific command intact?

        • 1. Re: Create one PCL from multiple forms?
          PriyankP

          You should be able to use Assembler to combine XDPs to get a master XDP and then merge this master XDP with XML file using GeneratePrintedOutput service (an Output Service) to generate PCL directly. 

          I don't see a reason why you would have to re-write all the binding expressions. 

          For printer specific settings (like duplex/simple printing or tray selection etc), you could create an XDC file and pass it as an input to the GeneratePrintedOutput Service. 

          • 2. Re: Create one PCL from multiple forms?
            BjornEricsson Level 1

            I followed your outline and made a small Proof-of-Concept with two XDPs, an XML for each XDP (used for data mapping), a DDX,  the process and a combined XML container that holds both XMLs. It runs, combines the XDPs, and creates one PDF from the two forms (I will move to PCL once PDF works). The problem is that the fields are not populated.  What did I miss?

            • 3. Re: Create one PCL from multiple forms?
              PriyankP Level 1

              BjornEricsson wrote...

              I followed your outline and made a small Proof-of-Concept with two XDPs, an XML for each XDP (used for data mapping), a DDX,  the process and a combined XML container that holds both XMLs. It runs, combines the XDPs, and creates one PDF from the two forms (I will move to PCL once PDF works). The problem is that the fields are not populated.  What did I miss?

               

               

              Does all your XDP follow the same XML Schema (XSD)? The structure of XML must remain the same. My guess is that your XML structure is changing when you are combining 2 XMLs. 

              Try this - 

              1) Create 1 XML Schema with 20 elements. Create a sample XML with values for all 20 fields. 

              2) Create XDP 1 with data connection to this schema. Bind first 10 fields to this XDP.

              3) Create XDP 2 with data connection to the same schema. Bind the remaining 10 fields to this XDP.

              On the process side -

              4) Combine XDPs first to get a master XDP

              5) Pass the Master XDP and the XML (created in Step 1) to the GeneratePDFOutput service. 

              It should give you the correct results and populate all the fields on respective XDPs. 

              Thanks & Regards,

              Priyank Pardiwala 

              • 4. Re: Create one PCL from multiple forms?
                BjornEricsson Level 1

                No, each form is designed with its own schema. Our business systems then take these separate schemas, populates some of the data ond puts them in the container schema. The container schema has a fixed top level hierachy and then allow any number of <Document> nodes with the form specific data in the <FormSpecifics> node. It is impossible to move all of this in to one schema.

                • 5. Re: Create one PCL from multiple forms?
                  BjornEricsson Level 1

                  No, each form is designed with its own schema. Our business systems then take these separate schemas, populates some of the data ond puts them in the container schema. The container schema has a fixed top level hierachy and then allow any number of <Document> nodes with the form specific data in the <FormSpecifics> node. It is impossible to move all of this in to one schema.

                  • 6. Re: Create one PCL from multiple forms?
                    BjornEricsson Level 1

                    Apart from missing data mapping I see that the combined XDP nests the forms. The second form is a subform within the first form. This doesn't feel right. Is it the correct way of merging XDPs? If not, how can I fix it?

                    • 7. Re: Create one PCL from multiple forms?
                      PriyankP Level 1

                      BjornEricsson wrote...

                      No, each form is designed with its own schema. Our business systems then take these separate schemas, populates some of the data ond puts them in the container schema. The container schema has a fixed top level hierachy and then allow any number of <Document> nodes with the form specific data in the <FormSpecifics> node. It is impossible to move all of this in to one schema.

                       

                      In that case - all the data bindings on all the individual XDPs have to be as per the 'container schema' not as per individual schema. 

                      • 8. Re: Create one PCL from multiple forms?
                        PriyankP Level 1

                        BjornEricsson wrote...

                        Apart from missing data mapping I see that the combined XDP nests the forms. The second form is a subform within the first form. This doesn't feel right. Is it the correct way of merging XDPs? If not, how can I fix it?

                         

                        Please see this link - http://help.adobe.com/en_US/livecycle/11.0/ddxRef.pdf

                        It should have examples of how to merge XDPs correctly. 

                        • 9. Re: Create one PCL from multiple forms?
                          etienneadobe

                          Hi there!

                          Have you thought about using Pattern Matching:

                          http://help.adobe.com/en_US/livecycle/11.0/WorkbenchHelp/WS92d06802c76abadb-1cc35bda128261 a20dd-7c2f.2.html

                          This option allows you to call a named XDP when a specific node is found in the XML. Based on your description, it should meet your requirements.