I think I can use that.
Is a PDDoc variable a normal pointer ?
Sorry for my questions, but what is the difference between an AvDoc and a PDDoc.
Do I need the PDDocDidClose or the AvDocDidClose notification ?
I am not sure what the difference is. They are both 'docs'...
I also read in the documentation the following:
"Starting with Acrobat 7.0, it is possible to have multiple windows open on the same document."
Does this mean when I open a document twice, I have two exactly the same AVDoc values ?
Take a look at this page from the SDK documentation:
Acrobat DC SDK Documentation - About the Acrobat Core API
It explains the different layers of the plug-in API. As you can see, all "AV" type functions and types are related to the viewer. All "PD" type function and types are related to PDF documents. The difference between an AVDoc and a PDDoc is that they both reference the same document, but one is used for controlling the viewer specific behavior of a document, and the other the actual document. Every document that is open in Acrobat (or Reader) is represented by a PDDoc, but only those that are also shown in the viewer have an AVDoc as well. You can open PDF documents without showing them, and in such a case you would only have a PDDoc, and no AVDoc. You will never have just an AVDoc. You can go back and forth between PDDoc and AVDoc by requesting the corresponding "other" document type.
You do not need to know what a PDDoc type actually is - it's an opaque type, and you just use it without knowing what it is. This way, Adobe can change it's implementation without you having to change your code.
If you want to only deal with documents that are open in the viewer you would use the AVDoc type functions, if you are interested in all PDF documents that get opened, use the PDDoc level functions. But, don't be surprised that Acrobat will potentially open a lot of these without you ever seeing anything on the user interface.