Highlighted

Is it possible to use a form variable (in memory) as input to render pdf?

Clookes

05-02-2009

Hi,



I understand that the render to PDF service takes URI as input, but what if I have a xdp form modified and stored in memory, and would like to use that to render PDF, how can this be done?



Thakns in advance.

Replies

Highlighted

Jasmin_Charbonn

06-02-2009

You can pass the XDP in a document variable type as part of the data parameter. In that case, you can leave the form url blank.



Jasmin
Highlighted

Clookes

06-02-2009

Hi Jasmine,



Thanks for the tip. So, is this what I need to do?



I have an xdp form in the repository, and xml data I generate from a custom component.



1. render the pdf form (merge xdp (no data) with xml data)

2. convert pdf back to xdp (this xdp now includes data) and stored as a document variable in memory

3. manipulate the xdp (via custom component)

4. render the pdf form by passing the xdp (from step 3) in a document variable type as part of the data parameter, leaving URL blank.

5. write pdf to disk



This would work right? Is there another way?



Thanks in advance.
Highlighted

Jasmin_Charbonn

06-02-2009

I'm not entirely clear as why you want to render it a second time.



What type of manipualtion are you doing in step 3.



Jasmin
Highlighted

Jasmin_Charbonn

06-02-2009

If it was me, I would have a hidden field on the xdp that gets populated form the data from your custom component or from a setValue in the process, then have some script on the forms that disables all the fields based on the value of that fields.



Jasmin
Highlighted

Clookes

06-02-2009

Ya that's what I did actually, originally, but they (client) didn't like that apparently, they didn't want to have put this invisible field and java script in their xdp templates, so I am just trying to get around it.



Thanks for your help. 🙂