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

access pdf document from web page by javascript

jacfe
Registered: Mar 26 2009
Posts: 12

hello, i want to know how can i acces the reader functions, like total number of pages, current page, rotate page; from a web page using javascript code, only i need that functions for the moment.

if anybody can help me i really appreciate that.

pd. sorry for my english

att, Jaime

My Product Information:
Reader 9.0, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
If you are viewing the PDF in a browser window, you will only see the toolbar, so you will have to add a custom toolbar button to add the extra functions and that custom bar will always be available.

If you just want to veiw the options, use the right mouse button to pull up the context menu and select the "document properties" option or use the +D key combination.

George Kaiser

jacfe
Registered: Mar 26 2009
Posts: 12
hi,

thanks for your reply and your time,
yes i'm viewing the pdf document in a browser,

well how can i add a custom toolbar with my functions?,

is posible from javascript in a browser or i need acrobat javascript in the document level pdf?.

i have an applet to generate the pdf document from a scanner,

if i need acrobat javascript in the document level pdf, do you know how i put it from the applet?.

if i don't need acrobat javascript, you can tell me what is the javascript code to make that?

i`m sorry if i have many question but i don`t find good documentation for this, if you can help me i really appreciate.

pd. sorry for my english

att, Jaime
jacfe
Registered: Mar 26 2009
Posts: 12
hi again, well i find some functions to implement, i have control to some functions of the viewer adobe reader,

i don't find three functions yet, 1. rotate page, 2. get the total number of pages, 3. get the current page.

ok, my question is: how can i make it works in firefox?, i have an object but in firefox sometimes don't recognize the object and when the object is good don't recognize the functions.

if you know what can i do?

thanks for your help.

att, Jaime

pd. sorry for my english again
nixopax
Registered: Feb 6 2009
Posts: 105
1. You cannot rotate pages in the Reader Version of Acrobat using Javascript. If you are in Acrobat Standard or Pro, then you can use this code:
this.setPageRotations({nStart:0, nEnd:10, nRotate:180});
nStart is the page that it will start with.
nEnd is the page that it will end with. If you only want to rotate one page, do not set this variable.
nRotate will be the degree of rotation. 0, 90, 180, 270 are valid ranges of rotation.

2. this.numPages;
3. this.pageNum;
jacfe
Registered: Mar 26 2009
Posts: 12
hi nixopax, that code is acrobat javascript and i need javascript in the browser context.

thanks for your help anyway.

att, jaime