10 Replies Latest reply on Nov 4, 2009 7:14 AM by zolouchka77

    generate a process which generates pdfoutput

    zolouchka77

      Hi

      i want to automate generating pdf with output..

      until yet i call as a web service OutPutService in my dotnet application

      in this application i merge a file.xdp with a file.xml. As there are several record in my file.xml the result is several file.pdf.

      until yet it is ok.

      But i want to automate this process by create a process in workbench.

      i want this process to generatePDFOutput with file.xml and file.xdp in input and i want this process to permit me to count all the pdf file which are generated, the date of creating file and at the end of the process, it should be send an email to user that inform the user of the number of pdf generated and the date of creating.

      i am a very beginner and i don't know (even with the quickstart creating process) what to do and how to begin.

      i created a process with generatingpdf operation but i don't know how to count the number of pdf generated.

       

      thanks for help

        • 1. Re: generate a process which generates pdfoutput
          $Nith$ Level 4

          You can loop through the number of records available in the xml file.

           

          Create a counter variable (of type Integer) and increment the count for each PDF generation.

           

          By default, there is a function called count which is used to find the number of nodes in the given xml. So you can also make use of that.

           

          Create a list variable with subtype of document to save your generate pdf documents.

           

          If you can send a form template and sample data file (the .xml & .xdp files), i would explain you in detail.

           

          Nith

          • 2. Re: generate a process which generates pdfoutput
            zolouchka77 Level 1

            ok thanks

            but i know extracting by my project dotnet  number of element in my file.xml, i don't want to do that.

            i want to create a process in workbench which automate this process :

            xml+xdp -> generatepdfoutput-> number(n) of pdf generate-> send email to a user input : you have generate n pdf at this date time, on this folder.

             

            after that to run the project, i just call it by adding web reference in my dot net project and invoke it

            • 3. Re: generate a process which generates pdfoutput
              $Nith$ Level 4

              The generatepdfoutput component will generate only one PDF at a time.

               

              So either you need to invoke the process 'n' times from the .net code which is not suitable for your case (for sending email from workflow)

               

              Or you need to make a loop inside the process to generate multiple PDFs.

               

               

               

              Thanks & Regards,

              Nith

              1 person found this helpful
              • 4. Re: generate a process which generates pdfoutput
                zolouchka77 Level 1

                oh!

                ok so i have to create a process which loop and read my xml element by element and for each element  go to generatePDFOutput which generate one pdf

                and when my loop is at its end i send a mail you have generate n pdf?

                 

                and what about the option generate multi stream in property batch of the operation generatePdfOutput?

                 

                thanks for you help, i am a novice in live cycle and i am a little lost actually..

                • 5. Re: generate a process which generates pdfoutput
                  $Nith$ Level 4

                  I'm not sure that property will produce multiple PDF document. The PDF Output is the one which is returned by the generatePDFOutput service.

                   

                  Anyways, confirm your assumption with someone else. I don't have knowledge on the multiple streams property.

                   

                  Thanks & Regards,

                  Nith

                  • 6. Re: generate a process which generates pdfoutput
                    Scott Brodersen Adobe Employee

                    The Batch properties of GeneratePDFOutput are used to generate multiple PDFs from one XML file. The XML has to be structured as a series of 'records'.

                     

                    There is s good explanation in the LiveCycle Services guide, at http://www.adobe.com/go/learn_lc_services_82. In the bookmarks, go to  Output Service > Using The Output Service > Processing Batch Data To Product Multiple Documents.

                     

                    scott

                    • 7. Re: generate a process which generates pdfoutput
                      $Nith$ Level 4

                      Great of you!

                       

                      Cheers,

                      Nith

                      • 8. Re: generate a process which generates pdfoutput
                        zolouchka77 Level 1

                        it's ok when i call output service and i set render option generate multi file = true and recordname = name_element and i put <batch> </batch>

                        in the beginning end end of my xml file it's running.

                        My problem is that i want to create a process with operation generatepdfOutput and something in this process should count the number of pdf generate and when all is generate it should send a email to a user provide in input.

                         

                        actually i am far for that because just create a process with generatePdfOutput seems to be impossible!!!!

                        when i invoke the process and give the parameter i have a probleme with one of them : dataxml which should give the path of the xml file which contain the data.

                        in my process i define xmldata as a variable document input and i do that in my code :

                         

                         

                        BLOB inData = new BLOB();

                         

                         

                         

                        String inPutFile = "C:\\creerPdf\\PurchaseOrder.xml";

                         

                         

                        FileStream fs = new FileStream(inPutFile, FileMode.Open);

                         

                         

                         

                        int longueur = (int)fs.Length;

                         

                         

                        Byte[] byteArray = new byte[longueur];

                        fs.Read(byteArray, 0, longueur);

                        inData.binaryData = byteArray;

                         

                         

                         

                         

                         

                         

                         

                         

                         

                        BLOB generatePDFOutputMetaDataDoc = new BLOB();

                         

                         

                        BLOB generatePDFOutputResultDoc = new BLOB();

                         

                         

                        OutputResult outResult = new OutputResult();

                        EssaiOutputService essaiOutput = new EssaiOutputService();

                        essaiOutput.Url +=

                        "?blob=base64"

                        ;

                        essaiOutput.Credentials =

                        new System.Net.NetworkCredential("administrator", "password");

                        generatePDFOutputMetaDataDoc = essaiOutput.invoke(

                        "c:\\creerPdf", inData, "BonCmdeDynamiq.xdp", out outResult, out generatePDFOutputResultDoc);

                         

                        and it renders this error :

                         

                        ALC-DSC-127-000: com.adobe.idp.dsc.LongLivedInvocationException: The Long Lived Service EssaiOutput can not be invoked synchronously.

                         

                        is somoene knowing what it is wrong?

                        • 9. Re: generate a process which generates pdfoutput
                          Scott Brodersen Adobe Employee

                          The process is long-lived and so it must be executed asynchronously. You can either: