13 Replies Latest reply on Jun 23, 2011 11:27 PM by John Hawkinson

    Modal dialog issue - very urgent

    rwoznicki

      Hi everyone,

       

      i'm working with indesign application under asp.net. I'm using Interop.InDesign.dll. I'm able to open Indesign, but when i try to change UserInteractionLevel, then application returns error "Cannot handle the request because a modal dialog or alert is active." I can't see what modal dialog is opened because, i can't see Indesign window. It is runing in asp.net context.

       

      When i'm opening manually Indesign then none of the modal dialogs is active.

       

      My code:

       

       

      Type indAppType = Type.GetTypeFromProgID("InDesign.Application");

      objInDesign = (InDesign.Application)Activator.CreateInstance(indAppType, true);

      objInDesign.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idNeverInteract;

       

      Do you have any solutuion for it ?

      Thanks.

       

      Regards

        • 1. Re: Modal dialog issue - very urgent
          wadcorp

          Dear rwoznicki,

           

          I don't have an answer for you, but I am having a similar issue.

           

          InDesign on my MacBook Pro seems to be working fine, until I go to make an edit in a Table.

           

          When I'm at the Cell Options level & attempt to go into edit Text or Rows & Columns, InDesign seemingly freezes up.

           

          Trying to Quit, I get the same alert you get: Cannot handle the request because a modal dialog or alert is active.

           

          Is the modal dialog box just off the screen?

           

          Anyone have any ideas here?

           

          thanks,

          Phil

           

          .

          • 2. Re: Modal dialog issue - very urgent
            Harbs. Level 6

            What happens if you hit Esc?

             

            Harbs

            • 3. Re: Modal dialog issue - very urgent
              CoreyMingo

              He likely cannot hit "ESC" because he is automating InDesign and the application may

              not have access to a Desktop.

              • 4. Re: Modal dialog issue - very urgent
                CoreyMingo Level 1

                I have similar issues.

                 

                Initially this was caused by the splash dialog that appears the first time a user launches InDesign.  Logging in with the credientals used to launch InDesign, and checking the "Dont show again" checkbox cleared it up for me.

                 

                Later, I ran into the problem again when InDesign was trying to recover some autosaved files.

                 

                This was cleared up by deleting the recovered file information from the accounts AppData folder.

                 

                I'm now getting this error again, but so far I dont know why. I have no Idea what modal dialog InDesign is trying to display.  How can I tell?

                 

                I've got to say, I'm very disapointed with this behavior.

                 

                If a programmer sets ScriptPreferences.UserInteractionLevel to InDesign.idUserInteractionLevels.idNeverInteract;  this should inform InDesign that its launch is part of an automated process; there is no user available to press anything, and there is likely not a desktop to display anything.

                 

                It is far more important for InDesign to respect the ScriptPreferences.UserInteractionLevel than to try and recover documents or display a welcome dialog.

                 

                But since we are stuck with this exception, I have the following questions:

                 

                Is there a way to programmatically dismiss the splash "Welcome" dialog via script command?

                 

                Is there a way to programmatically respond to the dialog that is displayed when InDesign has recovered documents?

                 

                Is there a way to programmatically determine what modal dialog is causing the exception? (app.Dialogs is empty)

                 

                Thanks!

                • 5. Re: Modal dialog issue - very urgent
                  John Hawkinson Level 5

                  The general assumption about scripting is that you are dealing with an already-running instance of InDesign. If that's not the case, then I think Adobe expects you to use InDesign Server, which does not have these issues.

                  • 6. Re: Modal dialog issue - very urgent
                    Harbs. Level 6

                    Corey,

                     

                    Your issue has nothing to do with the current thread. Please start a new discussio in the future.

                     

                    I have trouble coming up with any scenario where you'd want to launch InDesign from a script where the user doesn't have access to the UI -- which doesn't violate the EULA.

                     

                    If you need to drive InDesign as a back-end you likely require InDesign Server.

                     

                    If it's possible for the user to dismiss the windows on startup and you are using CS5 or later, you can run your script in an idle event. I'd recommend doing that either way because startup scripts run before the initialization of InDesign is finished.

                     

                    Harbs

                    • 7. Re: Modal dialog issue - very urgent
                      CoreyMingo Level 1

                      Thank you for your prompt response Harbs!

                       

                      You are half right.  First, my Issue is exactly the same issue described by rwoznicki above, and is in no way off topic for this thread.

                       

                      1.  We are both consuming InDesign through its COM interface.

                      2.  We are both running the exact same lines of code

                      3.  We are both encountering the same exception.

                      4.  We are both automating InDesign from a service that has no access to a desktop.; in his case IIS, in my case an MSMQ processign service.

                       

                      Unfortuniately, both rwoznicki and I have likely run afoul of the EULA; as you and John have pointed out.

                       

                      I understand Adobe's desire to protect its InDesign Server market share.  It's clear they dont want people using InDesign in the same manner that InDesign Server was intended.  But It blows my mind that Adobe would expose an inviting COM interface, capable of launching and controlling InDesign programmatically, and then prohibit us from doing that with it.

                       

                      In my system, InDesign plays a very small role.  I simply use it to convert INX files into a PDFs, and I only process, on average, around 100 documents a day.  For this task, InDesign Server is cost prohibitive.

                       

                      It occured to me that InCopy may be able to meet my technical needs as well, but it suffers from the same restrictive EULA.

                       

                      I'm afraid I need to find another option for automated INX -> PDF conversion of documents.

                       

                      Thanks again.

                      Corey

                      • 8. Re: Modal dialog issue - very urgent
                        John Hawkinson Level 5
                        You are half right.  First, my Issue is exactly the same issue described by rwoznicki above, and is in no way off topic for this thread.

                        Well, even if your issue is 100.00% aligned, re-opening an old thread with "very urgent" in the subject line is kind of poor. It's a bit like crying wolf, because people may respond in an extra timely fashion only to find out later that there wasn't actually anything urgent or timely about it at all, and they'll feel a bit grumpy about it. (I know that happened to me!)

                         

                        In my system, InDesign plays a very small role.  I simply use it to convert INX files into a PDFs, and I only process, on average, around 100 documents a day.  For this task, InDesign Server is cost prohibitive.

                        Have you considered Amazon's Mechanical Turk service?

                        • 9. Re: Modal dialog issue - very urgent
                          CoreyMingo Level 1

                          Thank you John,

                           

                          Your responses, and Harbs above are very valuable to me.  I was unaware my intended use of InDesign violated the EULA, and will take steps to ensure I am in compliance with all licensing agreements.

                           

                          I'm sorry if I gave the impression that I was merely browsing old posts and adding untimely comments.  This is an active problem I am working on now.  It is "very urgent" to me today, just as it was to the original poster back in August.

                           

                          If you sense any frustration in my posts, its only do the availbility of a proven, technically viable solution that is prohibited by the EULA.

                           

                          Adobe tools are, without a doubt, best in class, for my task; and Adobe Forums deliver an excellent level of community support.  I've submitted purchase requests for two copies of InDesign server; in the meantime, I better continue looking for an alternative, less pricy solution.

                           

                          I'm currently looking at RenderX, who have freely available stylesheets to convert INX to XSL-FO, which I can then use a number of tools to convert XSL-FO into a PDF.  It's a lot more work for me than an InDesign Server solution, but you get what you pay for.

                           

                          I'll check out Amazon Mechanical Turk, as well.

                           

                          Thanks again!

                          Corey

                          • 10. Re: Modal dialog issue
                            John Hawkinson Level 5

                            I don't have a license for RenderX's INX2FO, but I suspect you're going to find that route very painful. Not to mention that INX support sunset with CS4 and you'll need to support IDML.

                             

                            I would be surprised if images worked properly with INX2FO. Maybe you don't care about images?

                             

                            I can't imagine this is "very urgent." I don't know what that means to you,but to me that means you have seconds, not minutes, hours, days, or weeks. And I can't really imagine that's what you mean. So my rule is never say "ASAP" -- instead, say what you mean. Five minutes or Five days or Five months.

                            • 11. Re: Modal dialog issue
                              CoreyMingo Level 1

                              John,

                               

                              Seriously?  You doubt this issue is "very urgent"?

                               

                              I've had to disable layout processing on our in house production system (leaving unprocessed orders to pile up).  I've had to delay delivery to a customer on another production system.  I work for a small company and failure to deliver solutions on time threatens our ability to make payroll.  That's very urgent to me - although I didn't title the original post.  Which is why I'll be working non-stop until this is resolved.  In other words, I don't have seconds, I need this fixed yesterday.

                               

                              Looking back through my customer support records, Adobe never mentioned anything about our plan being in violation of the EULA during pre or post sales calls and discussions.  This despite being fully briefed on our requirements and intentions back in March 2007.

                               

                              My temporary solution is to insert a user into the process.  I may not be allowed to launch InDesign from an automated service; but as orders come in, I can have a user come by and push a button launching InDesign interactively, and processing all pending work at that time with a startup script.  This is not ideal, but it complies with the terms of our license and will keep production in operation until I come up with a new fully automated solution.

                               

                              So now, I've got a little breathing room...

                               

                              I'm not a big fan of dealing with XSL transforms, and suspect you are right, this will be a painful (in fact, it already is).  But you have to deliver with the tools you've got.

                              • 12. Re: Modal dialog issue
                                John Hawkinson Level 5
                                Seriously?  You doubt this issue is "very urgent"?

                                Right. And more importantly, I guess, an ambiguous qualitative designation is always less useful than a specific quantitative one, and there is no reason anyone has to expect someone who resurrects a years-old thread will have the same level of urgency as the original poster. Indeed, there is every reason not to think your issue is "very urgent" if you don't say that it is.

                                 

                                That said, you go on to say:

                                 

                                In other words, I don't have seconds, I need this fixed yesterday.

                                That's meaningless. Either you need it solved in minutes, hours, days, weeks, months, or years. But you certainly dont' need it solved yesterday, because that is impossible. Furthermore, you're certainly not going to solve it in a day, so you'd better re-evaluate.

                                 

                                Anyhow, this semantic prioritization foofaraw is probably not productive, so I'm sorry if it looks like I'm baiting you.

                                 


                                 

                                I don't know what to tell you, it certainly looks like you have either a manual step or a EULA violation in your future.

                                 

                                On the gripping hand, there's no compelling reason to believe that Adobe's EULA is enforceable. So an apparent EULA violation is not necessarily cause for penalties. Consult competent legal counsel. And of course, unless you post about your EULA violation on the Internet, it seems unlikely that you are  to suffer for it, regardless of the potential hypothetical outcome of a civil suit.

                                 

                                Just for everyone else's reference, I believe we're talking about section 2.4 of the Adobe InDesign CS5 EULA, which states:

                                “Permitted Number” means one (1) unless otherwise indicated under a valid license (e.g., volume license) granted by Adobe.

                                ...

                                2.4 Server Use. You may install the Software on Computer file server(s) within your Internal Network only for use of the Software initiated by an individual from a Computer within the same Internal Network only as permitted by Section 2.2. The total number of users (not the concurrent number of users) able to use the Software on such Computer file server(s) may not exceed the Permitted Number By way of example, the foregoing does not permit you to install or access (either directly or through commands, data or instructions) the Software: (a) from or to a Computer not part of your Internal Network, (b) for enabling Web hosted workgroups or services available to the public, (c) by any individual or entity to use, download, copy or otherwise benefit from the functionality of the Software unless licensed to do so by Adobe, (d) as a component of a system, workflow or service accessible by more than the Permitted Number of users, or (e) for operations not initiated by an individual user (e.g., automated server processing).

                                (emphasis mine).

                                • 13. Re: Modal dialog issue
                                  CoreyMingo Level 1

                                  Thanks John,

                                   

                                  I guess thats the bottom line.  We need a manual step.

                                   

                                  My company takes compliance seriously.  Enforceable or not, we honor our agreements.

                                   

                                  I appreciate your help, and your etiquette guidance, although it seems a little Orwellian to me.