DocumentSaveCopyAs

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

docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

DocumentSaveCopyAs

Post by docu-track99 »

I think I've run across an error in the newest build (2.0.44.0) with reference to how the explicit and implicit DocumentSaveCopyAs are working.

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.
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).
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.

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.
You do not have the required permissions to view the files attached to this post.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: DocumentSaveCopyAs

Post by John - Tracker Supp »

I am afraid our Viewer project team are on their Christmas break for the next couple of days (in Ukraine) - ad this is going to be one for them ..
Will ensure they respond as soon as they are back, apologies and thanks for your patience.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: DocumentSaveCopyAs

Post by Vasyl - PDF-XChange »

Hi, docu-track99.

This issue will be fixed in the next build, but for the registered version only. :wink:

Reason: if the unlicensed version were used then the original document will be modified by the SaveAsCopy each time because the demo-labels are drawn on pages before saving.

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.