Expand my Community achievements bar.

Define characteristics of the new window in app.launchURL true

Avatar

Level 1

I have a button in LiveCycle Designer that when pressed launches a URL (php program) in a new window. In other cases I want that the new window opens in the DocReady event after the document opens. I need that the new window does not have scroll bars or toolbar as I do when opening a new window in javascript html. I have Internet explorer 8 browser.

Code in javascript html:

window.open ('http://server/myprogram.php', 'MyWindow', 'scrollbars = YES, resizable = no, menubar = no, toolbar = no, status = no, directories = no, left = 450, top = 25, width = 750, height = 520 ');

Code onclick event in the adobe livecycle javascript button:

app.launchURL("http://a97100aph/ci/php/myprogramm.php?id_colectivo=xxx.pdf",true);

Thanks in advance

5 Replies

Avatar

Level 8

There aren't any parameters in any LiveCycle Designer or Acrobat methods that access those properties of a web browser.

I would recommend having a condition in your php file that sets the browser viewing properties based on the URL query string.

Kyle

Avatar

Level 10

You can add PDF open parameters to your URL, to control how the PDF will be opened.

Try this one, it will point you the right way ;-)

app.launchURL("http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf#page=5&view=FitH&scrollb...",true);

Avatar

Level 8

Very interesting. I like!!

Kyle

Avatar

Level 1

Once Acrobat has opened the new window you can only resize or reposition it. You can't supress tool bars or adress bar or tab bar with javascript. The only way to define the window appearance is when you open a new one with javascript command window.open. Moreover if you open a second window with javascript and try to close the fist one a message appears asking you to confirm to close.

I miss a javascript command like window.open in adobe to control options in the opened window.

Avatar

Level 1

Thank you radzmar. It was very helpful to learn that I can control the way in which it shows the pdf. For example it is interesting to open the pdf in a specific page or to suppress the adobe tool bar but all this controls are under the adobe pdf file shown inside the window browser and you can't control those properties of the opened new window as you can in javascript html as I answered to Kyle.

I have found a trick. You can open a cgi (php) program in the same window with false at the end of the app.launchURL command and then open a new window as you like with javascript inside that  php program to display database data and finally execute a history.go (-1) command to keep your original pdf in the screen. All this works if you have a button to launch the url but you can't do that in the onready event as it goes into a loop when you execute a history.go (-1) because it loads again the pdf.

Rafa