I'm forwarding this message I sent to Matthew because I forgot to copy the list. I am hopeful this will solve my problem with Go To Previous Document no longer working in Acrobat 8 from an Execute Menu Item operation in a bookmark or link.
Glenn
-----Original Message----- From: Glenn Heckard [mailto:garard@netexpress.net] Sent: Thursday, March 29, 2007 3:41 PM To: 'matthew@byteryte.nl' Subject: RE: JavaScript question
Matthew, thank you very much for your help. I haven't tried this yet but it looks promissing. I'll let you know the results as soon as I can try it. I'm in a bit of a bind right now with another job so it may be a few days, hopefully sometime this weekend.
Regards, Glenn
-----Original Message----- From: Matthew Fitzgerald [mailto:matthew@byteryte.nl] Sent: Wednesday, March 28, 2007 6:14 AM To: garard@netexpress.net Subject: Re: JavaScript question
Glenn Heckard wrote: > > Matthew, First, thank you for replying and for your suggested > solution. You are correct that I only need a "document set" level > solution. I package all PDFs on a CD and that is all I have to deal > with. My CDs are basically a book on a CD with front matter, TOC, > papers (one PDF per paper, author index, etc. Does this mean that if I > have 250 documents on a CD, each one has to be disclosed individually? > Can it be done once for all documents on the CD at once? Where and how would I do that? > > Hello Glenn,
Yes - you can add the disclose code to all the documents with one batch sequence. The way we do this for a very similar CD where we have to add some document level code (in our case sorting out the search index files to be loaded) is to put that code in an FDF file, and then use importAnFDF to get the code included as a document level JavaScript. That sounds worse than it is.
Your batch sequence - which I guess you would set to run on a whole directory - is simply:
where /C/somedirectory/discloseme.fdf is the full pathname of the FD to be included. Note that JavaScript is case sensitive - that apparently random capitalization in "importAnFDF" is important. Create a new batch sequence; select the Execute JavaScript option in Select Commands; and type that line in.
The FDF file would be (it can be short than this, but I have used 2 objects simply because that is what I always do):
Then run the batch script on the directory that contains your PDFs and each will be saved with this.disclosed=true as a document level script that runs automatically and silently whenever the file is opened. I've attached an FDF and 3 PDFs with PREV buttons added.
> I'm sorry to ask for specifics but I have very little Javascripting > knowledge. I do have the reference and guide and have browsed through them. > I have Acrobat Pro version 7. > >
I've tested with Acrobat 5.05 (that is the platform we do most of this sort of work for).
Regards,
Matthew
> Regards, > Glenn > > Leonard Rosenthol wrote: > >> Excellent suggestion... >> >> EXCEPT that app.activeDocs() will only display those documents that >> have "disclosed" themselves... >> > > Matthew Fitzgerald wrote: > Then it is no big deal to add a doc level script forcing each doc to > disclose itself. If I remember the original problem, the poster wants > a solution for a fixed document set he delivers rather than a > universal solution. > > > >> On Mar 27, 2007, at 5:15 AM, Matthew Fitzgerald wrote: >> >> >>> Glenn Heckard wrote: >>> >>>> I haven't seen a response to this on any newsgroup I've contacted >>>> so maybe it isn't possible. Can someone reply whether or not >>>> JavaScript coding in a bookmark (or link) can be written so it >>>> looks like the user pressed the hotkey combination for Go To >>>> Previous Document? Can it be done or not? If so, any thoughts would be appreciated. >>>> >>>> >>> I haven't done more than a very quick test, but wouldn't this work? >>> It assumes that docs are returned by activeDocs in the order in >>> which they were opened, and I imagine that is true. >>> >>> var d = app.activeDocs; >>> var i = -1; >>> while (++i < d.length) >>> { >>> if (this.path == d[i].path) >>> { >>> if (i != 0) { d[i-1].bringToFront();} else { break; } } } >>> >> --This list is a free service of OmniPilot Software, Inc. >> http://www.omnipilot.com/ >> Search the list archives: http://www.listsearch.com/acrobattalk.lasso >> Manage your subscription: >> http://www.listsearch.com/acrobattalk.lasso?manage >> >> >> >> --No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: >> 26/03/2007 14:31 >> >> >> > > > -- > This list is a free service of OmniPilot Software, Inc. > http://www.omnipilot.com/ > Search the list archives: http://www.listsearch.com/acrobattalk.lasso > Manage your subscription: > http://www.listsearch.com/acrobattalk.lasso?manage > > > > >
-- This list is a free service of OmniPilot Software, Inc. http://www.omnipilot.com/ Search the list archives: http://www.listsearch.com/acrobattalk.lasso Manage your subscription: http://www.listsearch.com/acrobattalk.lasso?manage
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!