7 Replies Latest reply on Nov 15, 2012 6:48 AM by Harbs.

    [CS3] Enabling full redo/undo support

    Pavel_Kotelva

      Is there any way to enable full redo/undo support in the InDesign server?

      Or can I write my own redo/undo functionality?

       

      Thanx in advance.

        • 1. Re: [CS3] Enabling full redo/undo support
          alam_84 Level 1

          Hi Pavel,

           

          I am also looking for same solution. Are you able to found a solution?

           

          I could try following

          1. Created a scriptable plugin and expose a method myUndo on document object.

          2. Used following code.

           


          InterfacePtr<ICommandProcessor> cmdProcessor(GetExecutionContextSession()->QueryCommandProcessor(), UseDefaultIID());

          InterfacePtr<ICmdHistory> cmdHistory(cmdProcessor, UseDefaultIID());

          cmdHistory->Enable(docRef);

          if(cmdHistory->CanUndo(docRef))

          {

          ErrorCode status = cmdHistory->Undo(1, docRef);

          }

           

          Above code works fine in indesign desktop environment but fails in indesign server

           

          Please help me or guide me how i could achieve this

          Any help will be appreciated here

           

          Thanks and Regards,

          Alam

          • 2. Re: [CS3] Enabling full redo/undo support
            alam_84 Level 1

            Hi All,

             

            Can anyone help on this

            i.e. achieving undo operation in indesign server

             

            Regards,

            Alam

            • 3. Re: [CS3] Enabling full redo/undo support
              Harbs. Level 6

              As far as I know, there is no undo support in InDesign Server. There's definitely no way to invoke undo via scripting.

              • 4. Re: [CS3] Enabling full redo/undo support
                alam_84 Level 1

                Hi Harbs,

                 

                Thanks for your reply, Can we have some other custom way using which we can achieve undo functionality.

                 

                Regards,

                Alam

                • 5. Re: [CS3] Enabling full redo/undo support
                  Harbs. Level 6

                  Why do you need undo? Besides a bit of esoteric scripting functionality that undo makes easier, I can't imagine why you'd need undo on InDesign Server.

                   

                  Harbs

                  • 6. Re: [CS3] Enabling full redo/undo support
                    alam_84 Level 1

                    Hi Harbs,

                     

                    We need this for following workflow

                    1. Suppose you have a text frame wich have a content like "Welcome to inDesign"

                    2. Now you did some editing and text becomes "Welcome to inDesign server".

                    3. Now you generate its preview by some means. Nw you think how preview looks like if I change text from server to desktop i.e. ""Welcome to inDesign desktop" for this I need to take my caret position to word "inDesign" so that i can save my time.

                     

                    Regards,

                    Alam

                    • 7. Re: [CS3] Enabling full redo/undo support
                      Harbs. Level 6

                      Well, being that you're not working in InDesign itself, I'd probably just replace the whole contents rather than keep track of changes and revert. The workflow would be something like this:

                       

                      1) You populate your interface with "Welcome to InDesign" from the document.

                      2) Your user edits that to "Welcome to InDesign server".

                      3) You'd push the new content to the text frame replacing the original content.

                      Every time the user makes an edit, you'd repeat step 2 and 3.

                       

                      Of course for very large stories you might want a more sophisticated system, but even there, I don't see how undoing the original edit really helps.

                       

                      If you're really set on playing with changing specific content within a story, you can just cache the original state of the story (or copy it to a non-printing text frame) and deal with that.

                       

                      Undo and redo is really a feature that is more appropriate to a UI than an automated solution...

                       

                      HTH,

                       

                      Harbs

                      http://www.in-tools.com

                      Innovations in Automation