This content has been marked as final. Show 13 replies
> Alternately, a script to automatically show the "previous view" and "next view" arrows, without having the user have to do anything, might work.
Are you in a corporate deployment? Could you not just add the previous and next view arrows to your users default view? I believe there is a registry key for that, you could add it to your deployment MST.
Sorry, I shouldn't have tried to "simplify" by saying "corporate." This is actually an electronic version of a legal brief with a ton of linked docs, exhibits, etc. It's pretty much dictated to me by the attorneys that this has to be literally "fool-proof". It will be going to a variety of external users via CD-ROM, including the Court, clients, co-counsel, etc...
The most elegant solution would be a batch script that could permanently modify each link in my "parent" docs to "open in new window", so it would be "baked in"...
Thanks so much for the quick response!
I *think* I have it:
Given that the doc is set to open on Page 1, I can set Page 1's Action to:
app.openInPlace = false;
...and set document property under DocumentWillClose to
app.openInPlace = true; (to return to default)
Seems to work... Hopefully, there won't be many (if any) users of this thing that want their default preference to be "open in new window"...I guess I could create a variable to evaluate and store their initial preference, to be sure we restore it upon closing the doc...?
>app.openInPlace = true; (to return to default)
This isn't necessarily the default or the person's previous setting;
better to save and restore than to set it to your choice. Better still
not to change it, and to change each link, but this would probably
require a custom plug-in to set that.
Absolutely, thanks! I will try to create a variable to store -- and later, restore -- that. Since we have about a zillion links, changing each link would be no fun at all! Is there an issue with trying to evaluate the setting and store the variable from a "on page 1 open" action, and being able to access the variable's value from the "DocumentWillClose" action? (and apologies for any capitalization, etc., issues)
Do I somehow need to declare the variable to be global, or do I need to have the initial actions happen from an "on document open" event? (I don't see such an event as being an available option)...
Any code snippet(s) far a similar situation that you could point me towards...?
> Is there an issue with trying to evaluate the setting and store the variable from a "on page 1 open" action, and being able to access the variable's value from the "DocumentWillClose" action? (and apologies for any capitalization, etc., issues)
Well, you may not have been through the "on page 1 open" action, so
you do need to recover from that case.
For an "on document open" script you would set up a document
I'm *almost* there, though! If you have a second to elaborate, I think I'll have it. Regardless, thanks for the help! I know you're probably busy, too...
Ah, think I got it! I deleted the Page-Level action, and:
var x=(app.openInPlace); //hopefully stores the existing value of this parameter
app.openInPlace = false; //to cause links to open in new window
...then under Advanced>Document Processing>Set Document ACtions>Document Will Close, I put:
app.openInPlace = x; //hopefully restores the previous value upon closing the doc
> //hopefully stores the existing value of this parameter
Not in all cases, no. Read the JS API Reference section about global variables (the bookmark is titled "global").
Yikes. I read it (or did the best I could!), but am not sure why I might need to change anything... I think I see how it might be a best practice; but if I'm only running this one snippet in these .pdfs, it seems like it will work in all but the rarest cases??? I just need the "child" links to open in a new window as long as the main pdf is open.
Sorry for my density! Am I at least correct that we don't need to worry about making the variable persistent? And if I'm only dealing with the one variable in this pdf (which I realize could at least be named better), do I really even need to specifically define it as Global?
You don't need to make it persistent, no.
Ah, thanks so much! I will try to find a decent book on this asap after this project.
FYI, I mean so I don't have to bother anybody with elementary questions! Aandi and PDL, your help is greatly appreciated. The API Reference is tough sledding for me, without enough background...so I hope I can find a good book that can help fill in the gaps. Thanks for your patience!