3 Replies Latest reply on Mar 16, 2014 4:46 PM by Trevorׅ

    Exporting A PDF issue

    JonnyDL Level 1

      I've built an dialog window (figured out my issues with the ui from the last post). I'm having a problem exporting a file via a button "export"

      when I leave the code outside a function, it works fine. Builds the PDF with the preferences on build of the dialog.

       

      with(app.pdfExportPreferences)

          {

              exportGuidesAndGrids = true;

              exportLayers = true;

              exportNonPrintingObjects = false;

            }

      myDoc.exportFile(ExportFormat.pdfType, new File(myPath+"/filesname.pdf"), false);

       

      When I put it in a onclick function, or call a named function from the onclick I get errors. What am I doing wrong, and How can I get it to work with a button selection?

       

         Thanks

        • 1. Re: Exporting A PDF issue
          [Jongware] Most Valuable Participant

          Let me guess (because you didn't specify): do you get the error "There is a dialog window open"?

          • 2. Re: Exporting A PDF issue
            JonnyDL Level 1

            Well I'm using extendscript toolbar, Im not getting any error messeges just an orange bar telling me where the errror is (tried to find that to turn it on so I could actually know what the error is)

             

            We can assume that the window is open. The button in the window trys to call the function while its still open. Can I have a widow open and export? I did try a close as the first command for an onclick function, followed by the eport but it still gives me an error

            • 3. Re: Exporting A PDF issue
              Trevorׅ Adobe Community Professional

              JonnyDL wrote:

               

              I've built an dialog window (figured out my issues with the ui from the last post). I

               

              Maybe you meant to say, "ta very much Trevor for figuring out the issue I had on my last post"