19 Replies Latest reply on Jun 16, 2009 2:03 PM by Jan Babicky

    Generate and merge PDF

    JendaDH Level 1
      Hi,

      I have a complicated task I need to resolve with LC.
      First of all, I need to have a process, that on the invokation over WSDL will take document variable and convert that file to PDF.
      Once this is done, I need to inject the PDF with process fields so I can have route names taks buttons in the workspace.
      Once that is done, I need the user to be able to click on the route name button and the workflow should continue that way.

      What I have done far:
      - I can convert any doc to PDF (using the sample that comes with the LC)

      What I need to do:
      - insert process fields into the PDF (as far as I know, this can not be done, so I need to merge the converted PDF with blank PDF that has these process fields included)
      - make sure, that the document is routed through route that the user picked by the button click (I did create flat PDF with process fields, I did use the form injection action to enable buttons in the workspace, however if I click on them, nothing happens. The task is still at assigned users workspace)

      Any advices are highly apprecitated

      J.
        • 1. Re: Generate and merge PDF
          Jasmin Charbonneau Level 4
          "insert process fields into the PDF (as far as I know, this can not be done, so I need to merge the converted PDF with blank PDF that has these process fields included)"

          That's correct. You can use Assembler to do that.

          "make sure, that the document is routed through route that the user picked by the button click (I did create flat PDF with process fields, I did use the form injection action to enable buttons in the workspace, however if I click on them, nothing happens. The task is still at assigned users workspace)"

          Make sure the target URL on the submit button is set to http:// :/workspace-server/submit.

          Jasmin
          • 2. Re: Generate and merge PDF
            JendaDH Level 1
            Hello Jasmin,

            I've seen that you have great knowledge here. Any ideas or guidelines how can I use the assembler to merge those two documents? As far as I know, it can work only with files in the repository. Is there a way how to do it with dynamicaly created PDF's?

            I will check the URL. Thanks for the hint.
            Best,

            Jan
            • 3. Re: Generate and merge PDF
              Jasmin Charbonneau Level 4
              Sure.<br /><br />Assembler doesn't just work with files from the repository. It can also take a map as an input parameter that contains the PDFs. You just need to populate the map variable with a key and the value of a documents and reference the key in the DDX.<br /><br />For example let's say your map contains the following information:<br />Key     Value<br />doc1 -> content of first PDF<br />doc2 -> content of second PDF<br /><br />Then if the DDX you can have something like:<br />      ...<br />      <PDF result="output1"><br />         <PDF source="doc1" /><br />         <PDF source="doc2" /><br />      </PDF><br />     </DDX><br /><br />Jasmin
              • 4. Re: Generate and merge PDF
                JendaDH Level 1
                Oh ok,

                I will do some search on the map variable. Did not use it so far.
                Thanks

                J.
                • 5. Re: Generate and merge PDF
                  JendaDH Level 1
                  Jasmin, the submit URL, is it with the dash between workspace and server, or without the dash?

                  J.
                  • 6. Re: Generate and merge PDF
                    pguerett Level 6
                    With the -
                    • 7. Re: Generate and merge PDF
                      JendaDH Level 1
                      Hi,

                      I am having wierd behaveiour with routes selection...
                      If I choose route names in english with approve and deny labels, all works fine, if I choose different, there is no activity once user click on the button in workspace.

                      I have a PDF that is converted from different fileformat (e.g. image)
                      I pass the converted PDF as variable DOCUMENT to the injection action (process fields are inserted manually) to enable route names buttons in workspace. I have the URL on the submit button, however, after click nothing happens.
                      I did notice that set user action accepts only FORM, DOCUMENT FORM and XFA FORM variables. Shall I change the converted document from DOCUMENT to DOCUMENT FORM?
                      Strange is, that with english labels, it works.. I even get those small icons on the big label in the workspace in the todo view...

                      Thanks

                      J
                      • 8. Re: Generate and merge PDF
                        pguerett Level 6
                        Those route names are "special" and are handled by the UI. I would put the process fields onto the form as well as the form bridge...and yes you should be using a Document Form var.
                        • 9. Re: Generate and merge PDF
                          JendaDH Level 1
                          Paul,
                          can be var DOCUMENT assigned to DOCUMENT FORM var (eventhough that the only fields are going to be the process fields)?
                          That should work right?

                          thanks

                          J.
                          • 10. Re: Generate and merge PDF
                            Jasmin Charbonneau Level 4
                            The Document Form variable has a property called document where you can store the content of a document variable.

                            The xPath would be something similar to

                            /process_data/DocForm/object/document = /process_data/@mydocument

                            Jasmin
                            • 11. Re: Generate and merge PDF
                              Jan Babicky

                              Hello Jasmin,

                               

                              I am still having issues with such a basic thing like the route selection in workspace.

                              Currently what my process does is takes a document as input, converts it to PDF, reads the PDF envelope from repository to variable (it has process fields and the form bridge), than it goes to workspace enable process and set user box.

                              When I get it to workspace, I can see the PDF from the repository, I can see two buttons with custom name, I can see converted file in the attachments tab, but when I click on one of those two buttons, nothing happens :-(

                               

                              I tried the Document var, Document Form var, XFA form (XDP file) var with no success for the envelope. With the XDP I had issues converting it to PDF Form with the rendertoPDF box. (not sure if that one worked and workspace enabled form failed due to invalid PDF stream input)

                               

                              Any ideas what am I doing wrong?

                               

                              Thanks in advance,

                               

                              J.

                              • 12. Re: Generate and merge PDF
                                Jasmin Charbonneau Level 4

                                I'm getting a bit confused with what you're doing, but ultimately I think the submit url of the submit button is not getting set properly.

                                 

                                Can you try to hard code http://localhost:8080/workspace-server/submit for the submit url of the submit button and see if that works.

                                 

                                Jasmin

                                • 13. Re: Generate and merge PDF
                                  Jan Babicky Level 1

                                  :-) Fantastic!!! It is finaly routing. Thanks a milion times Jasmin.

                                   

                                  J

                                  • 14. Re: Generate and merge PDF
                                    Jan Babicky Level 1

                                    Hi Jasmin,

                                     

                                    may I ask for one more wise hint? For some reason, I need to use the CreatePDF2 service over WSDL. I have created custom short-lived process with one input/output variable of type Document and add the CreatePDF2 block there with variable mapping. If I invoke it manually, the document gets converted.

                                    The tricky part is calling this custom process over WSDL (as it will be on a different HW box) and I can not figure out, how to pass the attachment in.

                                    The problem is that I am not able to put together the SOAP message. I did look at the manual for webservice invokation and tried to duplicate steps there with the attachments tab and part0 var but with no luck.

                                    Currently my SOAP looks like this:

                                     

                                    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                                    xmlns:ser="http://adobe.com/idp/services">
                                       <soapenv:Header/>
                                       <soapenv:Body>
                                          <ser:invoke>
                                              <ser:docIn>
                                              <ser:attachmentID>
                                              part0
                                              </ser:attachmentID> 
                                              </ser:docIn>
                                         </ser:invoke>
                                       </soapenv:Body>
                                    </soapenv:Envelope>
                                    

                                    the docIn is the input/output variable of the custom short-lived process.

                                    Sorry for bothering you with this, I know that it will be simple, but I can't figure it out :-(

                                    Thanks

                                     

                                    J.

                                    • 15. Re: Generate and merge PDF
                                      Jasmin Charbonneau Level 4

                                      What's calling LiveCycle using web services? A Java app, .NET app, third party software?

                                       

                                      Jasmin

                                      • 16. Re: Generate and merge PDF
                                        Jan Babicky Level 1

                                        Another process in the LC is calling the invoke webservice component. I got the invoke webservice partially running. It passes the box in the process and continues on, but java exception is thrown out in the result variable. The document is not converted.

                                        I can not log on to the remote server where it is. Once I can, I will post a picture of the process so you can get the idea. The SOAP envelope is probably fine. (found one example on the internet)

                                         

                                         

                                        J

                                        • 17. Re: Generate and merge PDF
                                          Jan Babicky Level 1

                                          Hi Jasmin,

                                           

                                          one more thing. If you initiate a task by webservice and it gets to users queue, he clicks on that item and the form comes up with buttons as route names. Is it possible for the user to click on one of those buttons and display new form with different data?

                                          Simple example can be email like communication. User receives something what is displayed to him in the workspace and he clicks the button reply and another form should come up.

                                           

                                          Thanks

                                           

                                          J.

                                          • 18. Re: Generate and merge PDF
                                            Jasmin Charbonneau Level 4

                                            I afraid you can't really do that. You would have to customize the Workspace interface.

                                             

                                            Jasmin

                                            • 19. Re: Generate and merge PDF
                                              Jan Babicky Level 1

                                              Cheers Jasmin. Will have a look at that.

                                              J.

                                              PS. Wonder how to mark it as answered...