Expand my Community achievements bar.

write document then renderPDFForm

Avatar

Former Community Member

I have a document in a document-variable and need to use renderPDFForm. It seems renderPDFForm will only render a hard file from the Adobe server and has no functionality to render a document contained in a variable. So, I need to save the document to the Adobe server and have it pull from there. I can't seem to get paths right. A document name and document version are provided as input. In a script that populates the document variable I'm also setting some variables to be used by makeDirectory and writeDocument. For instance if the form name is "travel_voucher" and the version is "1.0", I'm setting the following variables:

temp_folder = repository:////GenericProcesses/temp/travel_voucher/

temp_file_write = repository:////GenericProcesses/temp/travel_voucher/1.0.z

temp_file_render = /GenericProcesses/temp/travel_voucher/1.0.z

I want to use makeDirectory with temp_folder. I want to use writeDocument with temp_file_write. I then want to use renderPDFForm with tempfile_render. If I manually put a document in resources and skip the file stuff it renders OK. The problem I'm having is how to construct the path for use with the directory and write functions. Please help!

4 Replies

Avatar

Level 10

In ES2, you can specify a variable that contains your xdp.

In ES, you can also put the content of the XDP into an document variable and pass that variable as part of the Form Data parameter and leave the form url blank.

Jasmin

Avatar

Former Community Member

Jasmin,

I have XML data to be merged with the form, that's in a document-variable, and the Form Data parameter contains the name of the variable. I tried many different things, but it always says the contentURI parameter is blank, or if I put the standard value there it tries to create a filename using contentURI combined with the Form to Render parameter. I looked at the java class description and the renderPDFForm requires a physical file to be present and it reads that.

So, I need to write the document somewhere on the Adobe server and point the renderPDFForm service there.

I have LiveCycle ES 8.2

Avatar

Level 10

Are you using ES2 or ES?

There are ways to NOT use a physical. That's what I'm trying to explain.

Jasmin

Avatar

Former Community Member

We have ES1 .

Where you mentioned the Form Data parameter, that's what I'm using to specify the XML data to be merged with the form.