Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Help with renderPDFForm service URL Options

Avatar

Former Community Member
Hi,<br /><br />I have a process which needs to generate a new PDF file based on the <br />originally submitted PDF, and assign it to a user. I'm using workspace, <br />so I'm using the renderPDFForm service and the FormAugmenterService.<br />Everything looks like it is working as the PDF is assigned to the user<br />and displays correctly in workspace. My problem is the submit buttons<br />don't work. I get a javascript exception stating "Operation Failed".<br /><br />After some trial and error, I'm able to get the submit buttons functioning<br />by setting the URL Option - Target URL property in renderPDFForm to: <br /><br />"http://<my ip address>:<my port>/workspace-server/submit"<br /><br />The documentation says this is the default value, but it doesn't seem to<br />work unless I explicitly set it.<br /><br />My question is how to get this value without having to hard code it. <br />I can see that when I configure the renderer for my original input <br />form I set the targetURL to "Custom Configuration -> targetUrl"<br />but I don't know how to access "Custom Configuration" from within<br />my process.<br /><br />Any help would be greatly appreciated...<br /><br />Thanks.
11 Replies

Avatar

Level 10
You shouldn't have to hard code the target URL.



I have a question on the following :"... needs to generate a new PDF file based on the originally submitted PDF". Are you submiting the entire PDF or just the data?



The only thing you should need on your xdp is a submit button, and you shouldn't have to configure anything if you configure the render service properly.



Jasmin

Avatar

Former Community Member
Did you create the original form using Designer?

Avatar

Former Community Member
I'm submitting the form as a PDF as there are attachments embedded

in the PDF. I'm generating a second PDF with the data and attachments

from the first PDF. The second PDF has all the data as expected and

the attachments embedded. I have two exit routes from the Assign Task,

and neither of the buttons work when the PDF is displayed in Workspace.



Both forms were created in the Workbench.



Thanks.

Avatar

Level 10
On your second PDF, you need to add the Process Management\Form Augmenter\Inject Form Bridge operation.



This will enable the communication from the PDF to Workspace.



Jasmin

Avatar

Former Community Member
Hi Jasmin

I do send the second PDF through the Inject Form Bridge operation.
My output from the renderPDFForm operation is stored in a document
variable, then I use that document variable as the input and output
of the Inject From Bridge operation. I have two exit routes from
the assign task, and I do get two buttons at bottom of the workspace
screen, one for each route. I even see the following added to my
XML data:

H4sI ... c79ZOeAAA
http://172.16.11.30:9080/workspace-server/submit

However, the buttons just throw the javascript exception mentioned
above. If I hard card the value of the FSTARGETURL_ element above
in the Target URL property of the renderPDFForm operation, they
will work.

Is there some configuration on the server that I've missed?

Avatar

Level 10
What are the exact configuration of the render service you're using?



Jasmin

Avatar

Former Community Member
Here's the config:



Form to Render: uri of the pdf file (it's a pdf not an xdp)

Form Data: xml variable containing the form data (without the xfa:dataset and xfa:data elements)

PDF Form Render Options: all blank except for the following...

Populate XML Data: False

Tagged PDF: True

Linearized PDF: False

Render At Client: Yes

Standalone Rendition: False

Form Model: Auto



URL Options: all blank except for...

Content Root URI: repository://



Attachments: map variable (subtype document) containing the attachments



Rendered Form: a document variable to hold the new pdf

Page Count, Locale, and Forms Result are blank.



Thanks.

Avatar

Former Community Member
When I configure the Render Service for the input PDF file,

I have access to a "Custom Configuration" object which contains

the "targetUrl" property. Is there a way to get access to this

object from a Set Value operation?

Avatar

Former Community Member
is your problem solved

mergeandfuse@gmail.com

Avatar

Former Community Member
No, it is not resolved. I have to explicitly set the targetUrl property

of renderPDFForm otherwise the buttons in workspace don't do anything.



Not a big deal, but I don't know how to access the task level

"Custom Configuration" variables which I use to get the targetURL

for the Render Service of the initial input form.



Thanks.

Avatar

Level 10

John

did you find any solution for this issue..

I'm stuck up with this problem now..

Nith