Rotating pages in in Acrobat Reader using Javascript + AIR

Greetings,
Currently we're building an application to view pdf files in an AIR application.
We communicate with a javascript code, embedded in the PDF.
Now, we want to rotate the pages of the document, but we cannot get this to work...
Zoom, page up, page down, those work fine,
but when we try to set the rotation for the pages, nothing happens.
We also found rumours that rotating pages won't work in Acrobat Reader 9, but we need to be sure.
all the help is appreciated!
Regards,
Mario
//-----------------Do not edit the XML tags--------------------
//<Document-Level>
//<ACRO_source>0000000000000000</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:0000000000000000 ***********/
function myOnMessage(aMessage)
    if (aMessage.length==1)
        app.alert(aMessage[0]);
        switch(aMessage[0])
            case "ZoomIn":
                zoom *= 2;
                break;
            case "ZoomOut":
                zoom /= 2;
                break;
            case "PageUp":
                pageNum--;
                break;
            case "PageDn":
                pageNum++;
                break;
            case "rotateClockWise":
                app.alert("rotating, rotating, rotating...rawhiiddde!!");
                this.setPageRotations(0,1,90);
                 app.alert("rotated?");
                break;
            case "pageFit":
                zoomType = zoomtype.fitP;
                break;
            case "pageWidth":
                zoomType = zoomtype.fitW;
                break;
            default:
                app.alert("Unknown message: " + aMessage[0]);
    else
        app.alert("Message from hostContainer: \n" + aMessage);
function myOnDisclose(cURL,cDocumentURL)
    return true;
function myOnError(error, aMessage)
    app.alert(error);
var msgHandlerObject = new Object();
msgHandlerObject.onMessage = myOnMessage;
msgHandlerObject.onError = myOnError;
msgHandlerObject.onDisclose = myOnDisclose; this.hostContainer.messageHandler = msgHandlerObject;
//</ACRO_script>
//</Document-Level>

We also found rumours that rotating pages won't work in Acrobat Reader 9, but we need to be sure.
A product with the name 'Acrobat Reader 9' doesn't exists.
With Adobe Acrobat you can rotate pages. Read the documentation in the Acrobat Javascript Reference.

Similar Messages

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • Launch acrobat reader from javascript

    Hi Team,
    Greetings!
    Is it possible to launch Acrobat Reader from javascript?
    Thank you.

    hi, you can try to launch the pdf file in your server in other navigator window with Applet.getAppletContext.showDocument,
    if the client have acrobat, the pdf file open in navigator window
    take a look my linkOnApplet sample, but change myUrl for a url with a pdf file, like's this "http://mysite/file.pdf"
    i hope it help you.
    sorry but my site is in spanish.
    http://www.sunflowermachine.com/recusos/java/linkOnApplet.html

  • Close both the PDF and Acrobat Reader from Javascript

    Hello,
    I'm working on a C++ project which at some point open a PDF (using the ShellExecute function).
    I coded some javascript in this PDF with Life Cycle Designer to print its content and finally close it automatically using event.target.closeDoc().
    The problem is that just the PDF is closed but not Acrobat Reader.
    I need Reader to be also terminated, to catch the end of process signal in my C++ program and to continu the execution.
    Do have any idea if there is a javascript function to close Reader?
    Thank you very much!

    Hi John,
    After a lot of research and tests, I didn't find the solution. You can't close Acrobat Reader from a pdf. (for security reasons; It's like you are not allowed to closed a browser with a javascript function).
    Finally we moved to the PDF library C++ SDK, so Reader is no more opening, but we had to pay for that...
    Stephane

  • Integration of SAP with MS Office & Adobe Acrobat Reader using OLE

    Hi Friends,
    I have to integrate MS Office 2003 and ADOBE Acrobat reader with SAP very much like that demonstrated in SAPRDEMODOCUMENTCONTAINER program given in the control examples by SAP. But the problem is, the code I am developing and even in the one given by SAP has some problems in them. They are:
    (1) When a MS Word or any application is opened, many of its attributes are
    disabled like CTRL+ N for opening new document and CTRL+ O for opening
    an existing file and many others.
    (2) When I try to open an existing file using the recently used list, it is opening in
    a new window but my requirement is to open it in the same window in which
    the application frame is displayed over SAP screen.
    (3) I am following the same procedure that is used in the above said example and
    unable to understand the way methods of the inner most interface are implem-
    ented like method CONTAINER_CONTROL->CREATE_DOCUMENT that is
    called from within I_OI_DOCUMENT_PROXY~CREATE_DOCUMENT method. I
    am clueless how it is working.
    Please guide me how to solve the problem along with some good reference material that you can suggest me to study.
    Thanks & Regards
    Aditya P. Srivastava

    Hi Adiya,
    You need to pass the parameter 'open in place' to word file in same window.
    CALL METHOD DOCUMENT->OPEN_DOCUMENT
                        EXPORTING OPEN_INPLACE = 'X'
    Regards,
    karthik.

  • Changing document restriction in Adobe Reader using JavaScript

    Hi all,
    I'm wondering if it's possible to change the "Commenting" document restriction option of a pdf file with "No Security" as the security method, using JavaScript while in Adobe Reader.
    Thanks in advance,
    Kamil

    Not possible.

  • Brochure pages appearance in Acrobat Reader

    Hello!
    I would like to create a brochure much like this one: http://imagesrv.gartner.com/summits/docs/emea/enterprise-architecture/ea13_summit_brochure _generic.pdf from Gartner.
    They have the front page (when viewing the PDF document in Acrobat/Reader) as a stand-alone page, and then the following pages side-by-side.
    I think it looks really good, much like reading a real brochure, just digitally.
    How would I create this, though?
    Couldn't I just make the design in Illustrator and save the final brochure as a PDF document, then go into Acrobat and modify some document settings to make the pages appear as I want?
    Or how would I go about this?
    Thank you!

    Works fine for me... Be aware that that setting only has effect when
    opening the file, so if you change it you need to save the file and then
    re-open it for it take effect.

  • Select a word using its quad points/rect in adobe reader using Javascript

    Select a word using its quad points/rect point in adobe reader using Javascript

    The only option you have to select a word using JS is by using the selectPageNthWord method, which works based off an index, not a quads.
    However, in principle you should be able to use a loop that iterates over all the words on the page, comparing their quads to the one you have, and then selecting the one that matches.

  • Acrobat Reader - Use Fixed Resolution for Snapshot tool images setting

    Hello,
    We're currently running Acrobat Reader 9.x on our production Windows Vista SP2 Enterprise image and we're running Acrobat Reader X on our development Windows 7 Enterprise 64-bit image.  I'm curious if there's a registry setting that sets the "Use fixed Resolution for Snapshop tool images" from 72dpi to 300 dpi. 
    Any help would be greatly appreciated.
    Thanks,
    Rob

    The per user settings are held in the following registry location:
    HKCU\SOFTWARE\Adobe\Acrobat Reader\10.0\Selection
    There is a hexadecimal value named iSnapshotResolution which contains the resolution for the Snapshot Tool. Also a parameter called bUseFixedSnapshotResolution which needs to be set to 1 to switch the feature on or 0 to disable the feature.
    This is a per user setting but I believe Reader checks the per machine location
    HKLM\SOFTWARE\Adobe\Acrobat Reader 10.0\Selection
    Presumably you can put the same values into the HKLM section (it doesn't exist by default) so you will need to create the Selection key.
    Hope this makes sense.
    You might also find benefit of using the Enterprise Deployment tools for your deployment environment.
    Enterprise Deployment Technical Resources
    https://www.adobe.com/content/dotcom/en/products/acrobat/technical-resources.html
    Adobe Reader 9 Customization Wizard
    https://www.adobe.com/support/downloads/detail.jsp?ftpID=3993
    Adobe Reader X Customization Wizard
    https://www.adobe.com/support/downloads/detail.jsp?ftpID=4950

  • How to: Rotate pages from Portrait to Landscape using Acrobat Pro XI?

    As title states need to know how to do this on a multi-page document.
    E.g. out of a 10 page document, pages 4-7 need to be changed from portrait to landscape.  Note must keep the document scaling once pages 4-7 are changed to landscape.
    Tried Tool > Rotate and it does not work.  Rotating 90 degrees or 180 degrees do not present the document in landscape format. Researching the forums does not provide a solution.
    Can someone help provide specific steps for Acrobat Pro XI?  Thanks!

    Never heard of a this issue. Perhaps we are expecting different things. Here is a portrait page:
    and I apply Rotate Clockwise 90 degrees. Here is the result:
    Document scaling is preserved. (Of course 180 degrees does not change to portrait, but it makes it upside down).
    This to me has worked as expected. Were you expecting something different? For example, were you expecting the effect you would have in Word if you changed page setup from portrait to landscape, where the contents would not rotate, but would reformat to fit the new page - which certainly isn't what happens in PDF.

  • How to disable the print option in A. Reader (using JavaScript)

    I need be able to disable the print option from JavaScript code. I know that the print option can be disabled in the
    "File > Form preferences > PDF Security" option in the main menu but i need to do this from a script into the document (
    preferably using the JavaScript language).
    Thanks in advance!
    Dan

    HI!
    I have the same problem =)
    I have fixed this issue using the "app.fs.isFullScreen = true;" statement.
    Doing this you don't see toolbar anymore.
    You can use "hideToolbarButton" instruction and, maybe, you can obtain a more interesting result.
    Below there is a very interesting document:
    http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf
    I'm sorry for my poor english :-)
    Bye,
    Roberto (from Italy)
    Ps= Do you know how I can obtain a list of required fields in a form?
    thank's!

  • How to open url in acrobat reader using command line

    Hi,
    I need to open file from url using command line, but I'm still getting some error (wrong filename).
    I've tried for example this command:
    AcroRd32.exe http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf
    Can anyone help me and tell me what's wrong?

    You can't use a URL as parameter for AcroRd32.exe.

  • (Acrobat XI) Using Javascript to scan PDF text

    I am scanning text in a PDF and reading it into memory using doc::getPageNthWord().  Reading the text from the file using the mark 1 mod 0 eyeball looks like this:
    References
    Greenpeace. 2012. Safeway charts new course for
      sustainable tuna. www.greenpeace.org/usa/en/media-
      center/news-releases/Travis-Nichols.
    Monterey Bay Aquarium. 2012a. Wild seafood issue:
       Overfishing, www.montereybayaquarium.org/cr/cr_
       seafoodwatch/issues/wildseafood_overfishing.aspx.
    (Please note that I am unable to determine how the PDF is causing the indent.  I am using three spaces, but a hex editor...well read on, please).
    Using the above function (i.e getPageNthWord()) the information comes in like   this:
    Wild
    seafood
    issue:
    • Ł Ł • • Ł Ł • • Ł Ł • • Ł Ł •
    www.
    Copying it to a text editor using the clipboard, it looks like this:
    "Wild seafood issue:"
    ", OOHJDO              AVKLQJ.
    Can anyone suggest a possible solution to getting the text in a readable format?
    TIA!
    John

    I have some additional information.  When I copy the text to a programming editor I see the latter transformation.  When I compare the text, letter for letter, each letter in the cryptic version  has been reduced in value by 29 with a few exceptions; periods and forward slants do not seem to have been affected.  Additionally, the letters f and i, when placed together, are interpreted as a single letter with an ascii version of 195. 
    I have looked at possible XOR/OR bit fiddling conversions, but have not been able to figure out what is causing the transformation (or causing the transformation to fail).

  • Scroll() in Adobe Acrobat and Adobe Reader X using Javascript

    Hi there,
    Does someone know how scrolling works in Adobe Acrobat/Reader using javascript?
    The scroll() functions needs two parameters: x and y.
    How are these axises defined? Is this based per page or does the scrolling reference change every time the page changes?
    Why we need to know this? We're making and application in Flash Builder that loads a PDF. External buttons need to call an embedded javascript within the PDF that scrolls up or down.
    Anyone who can provide us with some information concerning this topic: thank you!
    Regards
    Mario

    Well,
    It's hard to formulate: basically we need to understand how the scrolling is handled in Adobe Reader.
    Like: why does the scrolling index change every time you change to a new page. It gets resetted or something.
    Anyway: you cannot create a variable "scrollVerticalIndex" and "scrollHorizontalIndex" and increment it everytime you want to go down or up/left or right and say scroll(scrollHorizontalIndex,scrollVerticalIndex). Also, if you zoom in, the dimension of your page stay the same. We cannot find a way to calculate top or bottom of a document.
    In a perfect world you could say: (height of a page) x ((number of pages)-1) = total height of the document (and thus the total amount you can scroll up/down). But that is just not the case...
    We want to get an insight how the scrolling works :-)
    Does this make sence ;-) ?

  • Calling custom COM-based library from Acrobat/Reader javaScript

    Hi All,
    is ist possible to extend the javascript object model? For example, is it possible to call a custom COM-based library from Acrobat/Reader using javaScript. Or is their a diffrent way to call third part libs?
    Thanks
    CommanderPeek

    I need a Reader Integration to a document management system (DMS). The user should interact from Reader GUI with the DMS.
    Nobody is able to give me binding statement, if my customer (this company need plugin for internal use only) will get the Adobe Reader Integration Key License/digital certificate for such a Reader plugin and how high the costs will be. I wait and wait for Adobes’ Feedback :-(
    For this reason I check a different solution with Javascript but I have no idea how to make calls to the DMS from Javascript. On other side are COM- or .Net-based libraries available.

Maybe you are looking for

  • XP Mode can't access parallel printer connected with USB to DB-25 adapter

    After some arduous work I finally got XP Mode to run on Windows 7 Virtual PC on my Win 7 Pro 64-bit machine. I have an HP LJ 4000 printer that has a Centronics interface with a DB-25 plug. I used a USB to DB-25 adapter advertised as IEEE 1284-complia

  • I installed lion  and iDVD is not longer exist?

    I install a full version of Lion from the Thumb, and this erase all Mac OS X ; and I have to buy, again iPhoto, iMovie,Keynote  but I no able to find iDVD to burn the movies i make like before when  I have the all version.

  • ORA-04021:timeout...

    Hi guys, I have a problem: when I try to replace or delete a package I recive an error message ORA-04021: timeout occurred while waiting to lock object XXX Of course it's becouse this package is used by another session. In v$access table I've found o

  • Idoc entering status 51

    Hello ,    This problem is little different . When IDOC is processed it enters status 51 Error:Enter the requested delivery quantity If we keep break point in respective fn module and reprocess the idoc then it enters status 68 Error : no further pro

  • EEWB Structure changed

    Hello Friends, I have Extended BP with EEWB. Every thing goes well. After some days i got requirement to extend some more fields. Now i have done that also. This is also successful. But my problem is, previously created fields are not showing in BP c