As discussed in this previous thread:
Vasyl-Tracker Dev Team wrote:CoPDFXCview1.SaveDocument nID, App.Path & "\Test.pdf", CoPDFXCview1.PXCVA_DocumentSaveCopyAs
- document will be saved into a new file but source-file of document not be changed to '<path>\Test.pdf', 'Modified' property not be changed also.
What I've run across is that when you preform a DocumentSaveCopyAs the Modified flag as maintained by the Viewer Control is set to true.Vasyl-Tracker Dev Team wrote:In the new build this behavior will be changed to:
if save-flag is not specified or equals to 0 and diff. dest.-name specified then saves document into a new file only, without association with a new file(i.e identical to saving with CoPDFXCview1.PXCVA_DocumentSaveCopyAs).
I've provided a simple example project to illustrate this point.
The "Open" button simply opens a pdf, the "Save" button will save the pdf back to it's original location, the "Is Modifed?" will return the "Modified" property from the control, the "Doc Path?" will return the "Filename" property from the control, the "Save As(With Flag)" does a "SaveDocument" to a new location with the PXCVA_DocumentSaveCopyAs flag passed into the "SaveMode", and the "Save As" button simply does a "SaveDocument" to a new location.
If you test the "Is Modified?" button before and after you make a change to the open document and Save, the "Modified" property behaves as expected.
If you press either of the "Save As" buttons when the document "Modified" property is 0 (false) then the document "Modified" property becomes 1 (true). This isn't what I'd expect it to do from the quotes provided above from the other thread. I'd expect if the document has a "Modified" of 0 and I did a "DocumentSaveCopyAs" it would still have a "Modified" of 0 after the operation was completed.
Any clarification you could offer on this issue would be appreciated.