Expand my Community achievements bar.

SOLVED

submit button with two parameters

Avatar

Former Community Member

Hello

Are you able to send two parameters in a submitForm by javascript? i would like to send the pdf itself plus its xml to a servlet.

thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Refer to the getDocuments method of this class. You can get all the attachments using Java code.

http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/com/adobe/livecycle/formsservice/client/...

Thanks

Srini

View solution in original post

6 Replies

Avatar

Level 10

You can do this but with two separate commands. You can not send both PDF and XML in the same command.

You have to call the send email function twice, one with PDF and other with XML.

The Servlet will receive two separate requests to process.

Thanks

Srini

Avatar

Former Community Member

ok, thanks for your answer, that was i thought!

one more question, if i send a PDF with attachments to a servlet, am i able to get this attachemnts outside the pdf that owns them?

thanks

Avatar

Level 10

I did not follow your question

Once you attach the attachments to PDF, then they will become part of the PDF just like the data on the PDF. There is no link to source location where you attached the files from. That means after you add the attchments, if you change the source file of attachment,  the changes will not reflect on the PDF attachment.

You can access the attachments in servlet/ PDF itself as if they were part of the PDF.

I don't know whether I am explaining you in a better way..

Thanks

Srini

Avatar

Former Community Member

Imagine that i send a PDF to a servlet with one file attached. Once in the servlet (in my case a java servlet) i would like to extract this file attached from the pdf just using Java code...is it possible?

thanks

Avatar

Correct answer by
Level 10

Refer to the getDocuments method of this class. You can get all the attachments using Java code.

http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/com/adobe/livecycle/formsservice/client/...

Thanks

Srini

Avatar

Former Community Member

Nice!

where can i get this API or jar?

do i need the Forms license to use it? because in my project i'm just allowed to use Reader Extensions...

best regards