3 Replies Latest reply on Oct 14, 2009 7:51 AM by Salser0

    Please suggest on how to achieve this (XDP + XML = PDF)

    Salser0

      Guys,

       

      I just managed to install LC ES turnkey for Weblogic on my machine. I logged into the server from my workbench and seems like everything is working fine.

       

      I have never used LC before so please dumb down your responses as much as possible

       

      I would like to do the following :

       

      1.) Create a single page XDP with some customer info. (I have done this already in LC Designer)

      2.) Create an XML with data for multiple customers. (I have done this already)

      3.) Use Livecycle to create a PDF where we iterate over the customer list (which is stored in XML) and add a new customer info page in the PDF for each customer.

       

      I am hoping this cannot be achieved without using the LC Server. I have setup Eclipse as my IDE and would like to use Java to call any SDK API.

       

      Thanx

      Salser0

        • 1. Re: Please suggest on how to achieve this (XDP + XML = PDF)
          Salser0 Level 1

          Guys,

           

          I am able to apply the XML to the XDP by calling services in JAVA and it generated a PDF for me.

          Now i need to implement the logic where i iterate over the XML and create a PDF page for each customer info occurrence in the XML. Then combine all the PDF's as one PDF. Any suggestions on this part ?

           

          Salser0

          • 2. Re: Please suggest on how to achieve this (XDP + XML = PDF)
            The Flex Viking Level 1

            I don't recombine, but I do use loops in my processes to do similar things

             

            1. Create a process
            2. Make a xml_data of type xml as an Input.  Make an out_doc of document type as an Output.
            3. Create a looping construct in the process with an activity that checks to see if your current loop iteration > the number of instances of the PDF you need created.
              1. I call these doc_count & doc_index
            4. Extract the XML for the document referenced by doc_index into a temporary xml.  I do this because I like working with xpath statements less than 200 characters and I often times need to "adjust" the XML before sending it to be rendered
            5. Call the process or activity which does the rendering ( I am using Output services) using your extracted XML
            6. I think you'd want to save the PDF in a list variable ( I am not doing this, since I store the resulting PDF to a database)
            7. doc_index ++
            8. When the loop exits, you will need to write some DDX that combines the documents in the list variable
              1. You already know the number of documents to process
              2. I created my DDX using a Script component, but you could just as easily do this using a DSC.
            9. Execute the DDX.
            10. Extract the document from the results into the out_doc variable.  I can give more details here if you need.
            • 3. Re: Please suggest on how to achieve this (XDP + XML = PDF)
              Salser0 Level 1

              The Flex Viking,

               

              Thank you for the response. I was able to create multiple PDF's using the "Repeat Subform for each Data Item" property in the LiveCycle Designer. However, i rather go your route since it will give me more control and also help me learn this tool. So far i am having a hard time creating complex processes since everything is so new to me. I think i have to brush up on XPATH (i have never used it).

               

              I am going to start working on this today and come back with questions.

               

              Thanx

              Salser0