Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"app.openDoc()" java script command does not work in AR 6.0

294 views
Skip to first unread message

Kennet...@adobeforums.com

unread,
Oct 7, 2003, 9:38:47 PM10/7/03
to
I use the app.openDoc() java script command to open another pdf document from a current pdf document. The command works fine in Acrobat 5.0 and Reader 5.0 but does not work in Acrobat Reader 6.0.

The java script reference for Acrobat 6.0 confirms that the format of the command is unchanged from version 5.05. So far I do not have any good work arounds. Is any one else having this problem or any other problems with java scripts in 6.0?

I have tried this in Windows 2000 and Windows NT with the same results. Any help would be greatly appreciated.

Tobias_...@adobeforums.com

unread,
Oct 8, 2003, 2:23:50 AM10/8/03
to
"openDoc()" still works, BUT since 5.05 (not 5) the document you want to open has to have "this.disclosed" in its document level JavaScript. See this thread </cgi-bin/webx?14@@.1dea249d/4> for more on this.

Tobias

Chris D

unread,
Oct 8, 2003, 3:54:10 AM10/8/03
to
This is due to a new security feature of Acrobat 6.0 that restricts
accessing other PDF documents via JS. Specifically, it is the
disclosed property that a PDF document carries.

The description of the disclosed property in the JS reference is:

"A boolean property that determines whether the document should be
accessible to
JavaScripts in other documents.

The two methods app.openDoc and app.activeDocs check the disclosed
property of the document before returning its Doc Object."

What you need to do is in the PDFs that you want to open using the
app.openDoc() method is add some document level JavaScript that is run
on each open.

If you add this document level javascript, then it should work fine.

docOpen()
{
this.disclosed = true;
}

docOpen();


Hope this helps.

- Chris.
___________________________________

Chris Dahl - CTO, Solutions
ARTS PDF
chris...@artspdf.com
http://www.artspdf.com/

Kennet...@adobeforums.com wrote in message news:<2ccdc...@webx.la2eafNXanI>...

0 new messages