How to know whether the document is modified

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

song_sd
User
Posts: 27
Joined: Sat Jun 13, 2009 6:33 am

How to know whether the document is modified

Post by song_sd »

Hi,

As the topic mentioned, I want to know whether the pdf file has been modified by
the PDF-XChange Viewer ocx so that I can make the next decision.
Is there a way?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: How to know whether the document is modified

Post by Corwin - Tracker Sup »

Hello,

You can check modified flag for document by using next code:
int nActiveDocID = 0;
axCoPDFXCview1.GetActiveDocument(out nActiveDocID);
if (nActiveDocID < 0)
return;
object vDataOut;
axCoPDFXCview1.GetDocumentProperty(nActiveDocID, "Modified", out vDataOut, 0);
if ((int)vDataOut != 0)
MessageBox.Show("Document modified");
Also when this flag is changing you will receive "Documents[#docid].Modified" event. For example you can see how this works in "C#Examples\FullDemo".

HTH