Another thing one can try is to embed this JS code as a doc-level script: this.pane="B";
On Thu, Oct 29, 2015 at 4:39 AM, Tilman Hausherr <thaush...@t-online.de> wrote: > > Am 29.10.2015 um 03:07 schrieb Gary Grosso: > >> Hi everyone, >> >> I very much appreciate Maruan's reply (thanks Maruan), but our customer >> is suggesting there should be some other way to do this. >> >> The reasoning is as follows: >> >> Using Acrobat, it is possible to go to File->Properties and then to the >> Initial View tab; set the Navigation tab value to Bookmarks Panel and Page, >> and save the file. After which this PDF file opens with the navigation pane >> open, and the bookmarks displayed. >> >> It is possible to view a small PDF file before and after this procedure >> was performed, at: >> >> http://aapro.net/bookmarktest/ >> >> The end users will be opening PDF files in Internet Explorer, but the >> experience is basically the same when I open them in Reader. >> >> I would be very interested in any insight anyone can provide. While I was >> able to add bookmarks to a PDF file (with help from this forum), I don't >> have any tools or expertise for examining the insides of a PDF file, to >> find out what is different between these two files. >> > > use PDFDebugger: > > https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-debugger/2.0.0-SNAPSHOT/ > > that helped me find it - in 1.8 use > > doc.getDocumentCatalog().setPageMode(PAGE_MODE_USE_OUTLINES); > > > (never heard of that one before, but PDF has a surprise every day) > > Tilman > > > >> Thanks, >> Gary >> >> >> -----Original Message----- >> From: Maruan Sahyoun [mailto:sahy...@fileaffairs.de] >> Sent: Wednesday, October 21, 2015 12:33 PM >> To: users@pdfbox.apache.org >> Subject: Re: How to make the PDF document open with the Navigation Pane >> open? >> >> Hi, >> >> it's not part of the Viewer Preferences so can not be set in the PDF >> directly. You could inject a JavaScript which is executed when the document >> opens. As short sample for such JavaScript is available in the examples >> package for PDFBox 2.0.0 under >> org.apache.pdfbox.examples.interactive.form.UpdateFieldOnDocumentOpen. >> >> The issue with executing menu items is that this is a restricted function >> so it might be available if the PDF is not certified. Lookup the function >> execMenuItem in the Acrobat SDK JavaScript Reference. >> >> BR >> Maruan >> >> >> >> Am 21.10.2015 um 18:17 schrieb Gary Grosso <gary.gro...@oberontech.com>: >>> >>> I am looking for a way to say in a PDF document that it should open with >>> the Navigation Pane open. Not sure if this is even possible; it may >>> strictly be a user preference. >>> >>> Thanks, >>> Gary Grosso >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org >> For additional commands, e-mail: users-h...@pdfbox.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org >> For additional commands, e-mail: users-h...@pdfbox.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > For additional commands, e-mail: users-h...@pdfbox.apache.org > >