These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

js to set document open preferences

rbogie
Registered: Apr 28 2008
Posts: 432

needed: help in constructing a js (to run as a document action) to set the 'open settings' (on preferences [ctrl+k] > documents)

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
You can use the properties of the Doc object to set *some* things, which in a document-level script is the "this" object:

this.zoomType = zoomtype.fitP; // fit-to-page
this.layout = "SinglePage"; // single-page-at-a-time layout

You cannot use a document-level script to make any changes to the user's preferences; change menus, compliance modes, etc. as this would breach the security sandbox model.
rbogie
Registered: Apr 28 2008
Posts: 432
big thanx for a helpful response.

UVSAR wrote:
You cannot use a document-level script to make any changes to the user's preferences
indeed, i do want, were it possible, to make certain settings effective on user's preferences and, thereby, to side step the need to instruct a user manually to make this or that setting (settings that are essential for the intended functioning of an integrated set of interactive files).
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
See this sample PDF, it's full of JavaScripts that makes some changes to the user's preferences (and full of french way of life…).
;-)

[i](Use "helenripley" as password to unlock abracadabraPDF's demo files.)[/i]
rbogie
Registered: Apr 28 2008
Posts: 432
merci, i'll look at it in the morning (it's 4 am here in LA) & i gotta get some zzz.
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Too bad !
It's that kind of docs that should seriously improve your dreams…

;-))