4 Replies Latest reply on Jan 9, 2009 6:05 PM by neptas

    converting a xdp (xml variable) to pdf

    neptas Level 1
      Hello,

      In my process I need to transform a xdp file (the template part). For that, Im getting a xdp file from the repository to a xml variable. Then I apply a xslt template on that xdp and get a new xdp (in a xml variable). Finally I want to render this xdp to a pdf file, and this is where I get an error saying I need to give a content root ID. However, since Im trying to feed the form service with a template stream (in a xml variable) I dont have any content root... I believe I would be able to save the xdp variable to disk and then give a url to formservice, but I rather work only in memory, using variables.

      Any idea on this?

      thank you
        • 1. Re: converting a xdp (xml variable) to pdf
          Jasmin Charbonneau Level 4
          "However, since Im trying to feed the form service with a template stream (in a xml variable) I dont have any content root."

          If you feed the form service with a template stream, you need to pass it as part of the "Form Data" parameter of the renderPDFForm operation and not the "Form to Render" parameter.

          If you specify something in the "Form to Render", it'll expect a Content Root URI.

          Jasmin
          • 2. Re: converting a xdp (xml variable) to pdf
            neptas Level 1
            Jasmin,

            It worked well thank you :)

            But I was wondering: if I need to pass the xml variable with the xfa template as part of the "Form Data" parameter, how can I pass the data part of the form to make a merge with the template? Do I need to create a second step in my process that will take this output PDF file (in a variable) and a data file, or is it possible to make this merge in the same step? (for instance, feeding the xfa template with a datset node)

            Thank you
            • 3. Re: converting a xdp (xml variable) to pdf
              Jasmin Charbonneau Level 4
              "But I was wondering: if I need to pass the xml variable with the xfa template as part of the "Form Data" parameter, how can I pass the data part of the form to make a merge with the template?"

              XDP data can contain both the template and the data. You can pass both at the same time.

              Jasmin
              • 4. Re: converting a xdp (xml variable) to pdf
                neptas Level 1
                Jasmin,

                One more thing: because I´m referencing fragsments in this dynamically created xdp form, the process is not resolving the fragments right. I understand that if I give a document path, the fragments would be resolved based in this base path, however, in my case I dont have a base path...

                Thank you