Skip to main content
Participating Frequently
April 6, 2026
Question

Saving while closing the document

  • April 6, 2026
  • 1 reply
  • 16 views

I am trying to do one operation during pdf close and trying to persist it Using PDDocSave. The problem is all other unsaved things also gets saved due to this which I don't want. So is there a way to save only a particular change while closing? Or should I avoid save operation during the pdClose call back all togehter

    1 reply

    BarlaeDC
    Community Expert
    Community Expert
    May 27, 2026

    Hi, I don’t think what you want to do is possible Acrobat saves everything or nothing, dependent on a flag that is set when changes happen and then it is cleared when the document is saved.

     

    As mentioned in the documentation 

    	
    void PDDocClose(PDDoc doc)
    Closes a document and releases its resources. If doc is NULL, it does nothing. Changes are not saved. You must use PDDocSave() to save any modifications before calling PDDocClose().

    you should make your change and call PDDocSave before the PDDocClose.

    If you can provide more information about the specific thing you are wanting to save then there may be a different way that we can achieve your aim.

     

    Regards

    Malky