7 Replies Latest reply on Apr 17, 2013 11:04 AM by JADarnell

    exportDataObject...any way to make it work?

    JADarnell Level 1

      I have reviewed the discussions contained in this forum WRT this doc method.  I have also reviewed the documentation. 

       

      I have this function:  AttachDataObject(ThePDFDoc).

       

      I have included it in this statement:

       

      app.trustedFunction(AttachDataObject);

       

      Toward the end of the above function I have the following lines enclosed in a try:catch block:

       

      ThePDFDoc.createDataObject(yada yada);

      ThePDFDoc.exportDataObject({cName: "SomeName.csv", cDIPath: "/Macintosh HD/WPCPrint Files", nLaunch: 0});

       

      When I run this in the debugger, the error that I get back is "Range Error: invalid argument value"

       

      The documentation says that I should get back a "not allowed" error.

       

      Is there any way, any workaround, anything at all to keep the "choose file" dialog from coming up?  This is supposed to be in an automated work flow and the fewer human interruptions we can engineer into the workflow, the better.

       

      TIA!

       

      John

        • 1. Re: exportDataObject...any way to make it work?
          try67 MVP & Adobe Community Professional

          Read the Note in the reference file about the cDIPath parameter of this

          function.

          • 2. Re: exportDataObject...any way to make it work?
            JADarnell Level 1

            I guess you missed the first line of my submission where I specifically state that I have read the documentation and other discussions on this forum. Please be reassured once again that I read the documentation, scanned a number of previous entries on the forum and tried playing with the code to see if I could figure it out on my own.  The docs are confusing, the forum answers seem to contradict themselves and the experimental code provided results that were not in accordance with the docs.  After several hours of messing around with this ambiguity I turned to the experts.  My apologies if my questions seem unresearched; I promise you they are not. 

             

            Respectfully,

            John

            • 3. Re: exportDataObject...any way to make it work?
              try67 MVP & Adobe Community Professional

              Then why did you continue to specify this parameter, even if it is no

              longer allowed?

              • 4. Re: exportDataObject...any way to make it work?
                JADarnell Level 1

                I am not sure that continuing this discussion will be fruitful.  If you have read the above and still cannot figure it out...well never mind.

                 

                Thank you for your input.  Though it is harsh, it is still appreciated.

                 

                Respectfully,

                John

                • 5. Re: exportDataObject...any way to make it work?
                  try67 MVP & Adobe Community Professional

                  OK, good luck...

                  • 6. Re: exportDataObject...any way to make it work?
                    Dave Merchant MVP & Adobe Community Professional

                    You need to understand that the JSAPI documentation has evolved over many years, and in some places it's not fully updated.

                    JADarnell wrote:

                     

                     

                    When I run this in the debugger, the error that I get back is "Range Error: invalid argument value"

                     

                    The documentation says that I should get back a "not allowed" error.

                     

                    Back in the Acrobat 6 Family you got a NotAllowedError, as we kept the cDIPath argument but blocked it (to ensure transitioned code failed in a diagnostic way). Now you get an "invalid argument value" error because that argument has been removed completely - it doesn't exist and should never be specified, as the documentation clearly states. If you remove the variable from your code it will run perfectly, but it will pop up the folder selection prompt. That's intentional.

                     

                    JADarnell wrote:

                     

                    Is there any way, any workaround, anything at all to keep the "choose file" dialog from coming up?  This is supposed to be in an automated work flow and the fewer human interruptions we can engineer into the workflow, the better.

                     

                    Of course there isn't - the entire point behind removing the cDIPath variable was to close a security hole (e.g. a malicious PDF could implant new code in executable files without the user having any idea what was happening). Adobe isn't going to leave some back-door workaround available.

                    • 7. Re: exportDataObject...any way to make it work?
                      JADarnell Level 1

                      Thank you Mr. Merchant for your candid commentary, but my conversation with TRY67 convinced me of the uselessness of the cDIPath argument already. 

                       

                      My intention in the original post was not to criticize Adobe, nor was it to seek some kind of hack.  I found some ambiguity in the documentation, on the forum and in the results of my code.  Before I gave up on it, I just wanted to be sure that all bases were covered. 

                       

                      Please, people.  I was not trying to start a firestorm.  This subject is answered for me.  If I have offended, I apologize.  Believe me, insulting anyone was not my intention.  I, a newbie Javascript programmer was just trying to be thorough, and cannot afford to insult the experts.

                       

                      Can we please drop this coversation now?

                       

                      R,

                      John