8 Replies Latest reply: May 26, 2009 12:49 AM by ChromeUser RSS

    About save pdf file.

    ChromeUser Community Member

      The document is a form in fact.

      I noticed that if I just fill only one field and not chang the cursor to other field,the "save" button and menu is disabled,also the ctrl + s is disabled.

      I can only close the document then the Acrobat will prompt me that to save the document.

       

      If i fill the field and move the cursor to another field all command are OK.

      My problem is under this circumstance i could not use PDDocGetFlags to judge if the document is changed.

       

      How to resolve this problem?

      Thanks!

       

      My acrobat is 8.1.5

        • 1. Re: About save pdf file.
          lrosenth Adobe Employee

          That is because until the field loses "focus", you haven't actually made any changes to the document.

          • 2. Re: About save pdf file.
            ChromeUser Community Member

            But the user could not think so.

            They just think they input the value but why they can not save the value.

             

            Think about if the form has just only one text field,then the document could not be saved?

            • 3. Re: About save pdf file.
              Malcolm Thomson Community Member

              ChromeUser wrote:

               

              But the user could not think so.

              They just think they input the value but why they can not save the value.

               

              Think about if the form has just only one text field,then the document could not be saved?

               

              That is true to an extent, although as you point out when you try and close the document the field will lose focus and therefore the application will ask the user if they would like to save the document.

               

              If you are worried about the user not noticing this or wanting to save the document them selves then you could create a button  that the user clicks to save the document

               

              HTH

               

              Malcolm

              • 4. Re: About save pdf file.
                ChromeUser Community Member

                That is what i want to say.

                How can i decide the document need to save?Usually i call "PDDocGetFlags" to check the document  is need to save.

                But at that situation the "PDDocGetFlags" can not get the right result, it tell me no need save reslut.

                 

                • 5. Re: About save pdf file.
                  Malcolm Thomson Community Member

                  Technically the PDDocGetFlags, is giving you the correct result, as Leonard said, until the form field loses the focus the document has not changed and therefore does not require a save.

                   

                  This is how the form fields are implemented, you could try calling AVAPgeViewClearFocusAnnot () and then check the PDDoc flags, as this call should cause the form to loose focus and therefore update the status of the document.

                   

                  HTH

                   

                  Malky

                  • 6. Re: About save pdf file.
                    ChromeUser Community Member

                    Malcolm Thomson wrote:

                     

                    Technically the PDDocGetFlags, is giving you the correct result, as Leonard said, until the form field loses the focus the document has not changed and therefore does not require a save.

                     

                    This is how the form fields are implemented, you could try calling AVAPgeViewClearFocusAnnot () and then check the PDDoc flags, as this call should cause the form to loose focus and therefore update the status of the document.

                     

                    HTH

                     

                    Malky

                    Thanks for your reply,Malcolm.

                    The AVAPgeViewClearFocusAnnot () can be used to resolve my current problem.

                    But I am not clearly that if there are any other type objects that are same as Annot.

                    If there are so how do i to deal with these uncertain type of objects?

                     

                    Thanks.

                    • 7. Re: About save pdf file.
                      Malcolm Thomson Community Member

                      As just about all items that are drawn on a PDF file in Acrobat as Annots to greater or lesser degree, I am not sure where your problem is, if they have created a different kind of annotation ( such as a comment) then you calling AVPageViewClearAnnot() would cause that annotation to be cleared and if possible the document would be marked as requiring a save.

                       

                      So unless I am misunderstanding your workflow, there would be no difference in what your plug-in would need to do to enable the save.

                       

                      HTH

                       

                      Malky

                      • 8. Re: About save pdf file.
                        ChromeUser Community Member

                        Thanks Malcolm for your reply.