2 Replies Latest reply on Jul 26, 2010 8:23 AM by starlinton

    does reader support saveAs conversion file types ?

    starlinton

      Hello,

       

      The "JavaScript for Acrobat API Reference" doc specifies that second parameter 'cConvID' of the doc.saveAs function is conversion file type id. This method is supported since 5.0 version. There is no restrictions available for reader accept security.

       

      I tried to convert pdf document to tiff using folder level script:

       

      doc.saveAs("/e/test.tiff", "com.adobe.Acrobat.tiff");

       

      This produced the following error: "An unimplemented or obsolete function was called". I'm sure this is not a security issue as I'm able to save the document as pdf if second parameter is not specifed.

       

      From another side I tried to test which conversion types are supported and executed the following code:

      for ( var i = 0; i < app.fromPDFConverters.length; i++)
      app.alert(app.fromPDFConverters[i]);

       

      In this case I got: "Get not possible, invalid or unknown" on app.fromPDFConverters. My document is not hidden and this app property is supported from 6.0 reader version without any restrictions.

       

      I don't have an idea what's wrong here - the only explanation that reader scripting does not support conversions. Online Help states these features are supported:

      http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html

      http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.110.html

       

      Reader versions I tested it: 9.3 and 9.3.3 with win7 and Snow Leopard. If you have any related info please share it with me.

       

      Thank you a lot,

      Alexey

        • 1. Re: does reader support saveAs conversion file types ?
          gkaiseril MVP & Adobe Community Professional

          Have you read the section about the 'quick bar' which appears at the top of each object, property, or method page?

           

          What is the box at the far right of the bar for?

           

          What is the meaning of the black 'S' in that box mean?

           

          Have you looked in those references for the application object's 'viewerType' and 'viewerVariation' properties, and the description for the quick bars?

           

          What are the values for those properties?

           

          Have you read the section about trusted and privileged functions?

           

          The note for the 'saveAs' method:

           

          "Note: This method can only be executed during a batch or console event. See Privileged versus non-privileged context for details. The event object contains a discussion of JavaScript events."

           

          Reader can only save as a PDF.

           

          How to save a PDF with Acrobat JavaScript by Thom Parker

          1 person found this helpful
          • 2. Re: does reader support saveAs conversion file types ?
            starlinton Level 1

            Hi GKaiseril, thank you for reply,

             

            There are my answers:

             

            Have you read the section about  the 'quick bar' which appears at the top of each object, property, or  method page?

            - yes, I read

             

            What  is the box at the far right of the bar for?

            - Availability

             

            What is the meaning of the  black 'S' in that box mean?

            - Requires the document save right, my document has extended usage rights including save. In addition, I'm able to save the document using saveAs function without second param specified. The problem is only reproduced if I specify conversion type id.

             

            Have you looked in those references for the  application object's 'viewerType'  and 'viewerVariation' properties, and the description for the quick  bars?

            - Yes, I looked. There is no such restriction for the method and property specified.

             

            What are the values for  those properties?

            The first box indicates that saveAs was first  added to Acrobat/Reader in version 5.0. The box at the far right of the bar show S - means you need document save right only, so saveAs function will work in  all versions and variations of Acrobat, including Adobe Reader since 5.0 version and if document have Save usage  rights.

             

             

            Have you read the section about trusted and privileged functions?

            - yes, I read. Again, I'm able to save my document without specifying the second argument  - it means my script environment and function call conditions satisfy the requirements.

             

             

            The note for the 'saveAs'  method:

             

            "Note: This method can only be  executed during a batch or console event. See Privileged versus  non-privileged context for details. The event object contains a discussion of JavaScript events."

             

            - it also can be executed from folder level scripts. For reader you need extended usage rights.

             

            Reader can only save as a  PDF.

            - Could you please provide more info/links for this statement? Accordingly to online help it should be possible to use "saveAs" function with conversion  type id for reader.

             

            How  to save a PDF with Acrobat JavaScript by Thom Parker - I read it sometime ago - did not find anything related to the issue.

             

            Thank you,

            Alexey