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.

Opening another pdf

Avatar

Level 2

Hey I am having an issue..I am designing some forms in Livecycle to communicate with each other. The user will hav 3 forms to work with; one at a timethe first will call the second after it has been fully completed and the 2nd the same with the 3rd form....

My first question though is whats the javascript code used to call and open another pdf form?

Thanks in advance..

16 Replies

Avatar

Former Community Member

app.openDoc("path and filename") ...I think ...not near my reference at the moment ...look in the Acrobat JS reference.

Paul

Avatar

Level 2

Thanks much

Tried it the code didnt work:

app.openDoc("P:\Online Filing\New Forms to be developed\Finished Forms to be tested\Form 2 (july 2, 2009).pdf");

doesnt open the document.

How do you look in the Acrobat JS reference.?

Avatar

Former Community Member

Try it with the file in the same directory and no path. That is the right command.

To get the Acrobat Javacript Reference .....just enter those words into a google search and the site will come up.

Paul

Avatar

Level 2

Thanks much it worked without the path...but y it cannot be used with the path? y does the file have to be in the same directory?

Dont you think thats a limitation?

Norman

Avatar

Former Community Member

I do not know if that is a limitation....I would put the question in the Acrobat form...there are more knowledgeable folks on that forum that could explain y.

Paul

Avatar

Level 2

hey Paul,

The code works fine and thanks again, here is an issue I need help with tho...form 1 inserts data into a database and then form 2 retrieves some of this data from the database when it is open. Remember the first issue I asked? after form 1 is filled out a button is clicked to open form 2. Now here is the issue: Since form 2 retrieves data from the database which was entered from form1 there obviously need to be some link between the 2 forms. Therefore a transaction number is saved to the database to link the forms. Now I need this number to be available when a user is entering the information: so that when he clicks to open form 2..form 2 will be able to connect to the database use this number and retrieve the data from form1. You already told me how to open another form, how can you send this number to the other form; so lets say its transaction number 10, how am i able to send this variable to that form so it will be able to retrieve the data associated with form 2?

Avatar

Former Community Member

There are a couple of ways to handle this but all involve some complex code ...are you code savvy?

Paul

Avatar

Level 2

well what I hav narrowed this down to do, since is one variable is to use a hidden field on form 2..but how do u access this field from form 1 before opening it?

Avatar

Former Community Member

There is an acroform document level command called "disclosed" that needs to be set on the initilization of th eform. When that sample you refered to was built this command was open to whoever wanted to set it. Since that time the command was deemed a security risk and only certified documents can use it. So that technique you are using will not be useful to you.

There is a messaging object that you coudl use to set up a send/recieve message in each of the PDFs but it woudl involve some heavy duty code. Once a connection was established metween the sender and reciever you could pass a message from one fom to the other with the valid value. I woudl do this as a last resort and if you are not a coder you will struggle with the concepts.

Paul

Avatar

Level 2

ok thanks again,

I will be accessing and calling these forms via a web application..is their a way to send a value like for example in my case: a transaction number (variable) from an aspx page to the pdf? so the user is doing the transaction on a web page a transaction number is generated for each user...when the user clicks to open the pdf to fill it out I want that number to be passed to the pdf?

Is there a way to do this? whats the code?

Avatar

Former Community Member

I do not know ...that woudl be an Acrobat thing. I woudl post your question on that forum as there are more Acrobat savvy people there.

paul

Avatar

Level 2

Paul,

Did you get a reply to the post you made in reference to my question?

Avatar

Former Community Member

I did not post your question .....you need to do that.

Paul