Identify when ActiveX is done
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Identify when ActiveX is done
Is there any way to identify when the ActiveX control is finished processing something like a SaveDocument?
-
- Site Admin
- Posts: 798
- Joined: Tue Apr 14, 2009 11:33 pm
Re: Identify when ActiveX is done
Hi docu-track99,
No special events for this case.
But caller will be unblocked when SaveDocument finished.
No special events for this case.
But caller will be unblocked when SaveDocument finished.
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.
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Identify when ActiveX is done
That doesn't seem to be the case in my program.
I'm saving changes done to an open PDF, then checking the modified state of the control. I expect that it should be 0 (false), but immediately following the SaveDocument call the Modified property returns 1 (true).
If the state is again queried after a pause, it returns 0 (false), as one would expect it to after a save of the document.
I've included a small demonstration project illustrating this, if you click the open button, modify the pdf, then click the save button, the state will be 1 (document is modified), if you then click the "Modified?" button the stat will be 0.
I'm saving changes done to an open PDF, then checking the modified state of the control. I expect that it should be 0 (false), but immediately following the SaveDocument call the Modified property returns 1 (true).
If the state is again queried after a pause, it returns 0 (false), as one would expect it to after a save of the document.
I've included a small demonstration project illustrating this, if you click the open button, modify the pdf, then click the save button, the state will be 1 (document is modified), if you then click the "Modified?" button the stat will be 0.
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 798
- Joined: Tue Apr 14, 2009 11:33 pm
Re: Identify when ActiveX is done
Hey docu-track99,
Ok, I've asked the Viewer Team to have a look.
Regards,
Chris
Ok, I've asked the Viewer Team to have a look.
Regards,
Chris
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.
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Identify when ActiveX is done
Hi, docu-track99.
This issue reproduced and will be fixed in the next build.
Note: thanks for your example project but one call in your code has other potential issue.
In your example you are open document named as '<path>\AcroJSGuide.pdf' and save it into a new file named as '<path>\Test.pdf' but without special save-flag(by default its 0).
In this case you should change your code to:
CoPDFXCview1.SaveDocument nID, App.Path & "\Test.pdf", CoPDFXCview1.PXCVA_DocumentSaveAs
- document will be saved into a new file and source-file for this document will be changed to '<path>\Test.pdf', 'Modified' property will be changed to 'false'.
or to:
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.
The behavior of current build in this case(if special save-flag is not specified or equals to 0 and different dest.-name specified):
saves document into a new file and associates document with new file, but incorrectly displays in the UI a file path of this document: shows path to an old file.
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).
Thanks.
This issue reproduced and will be fixed in the next build.
Note: thanks for your example project but one call in your code has other potential issue.
In your example you are open document named as '<path>\AcroJSGuide.pdf' and save it into a new file named as '<path>\Test.pdf' but without special save-flag(by default its 0).
In this case you should change your code to:
CoPDFXCview1.SaveDocument nID, App.Path & "\Test.pdf", CoPDFXCview1.PXCVA_DocumentSaveAs
- document will be saved into a new file and source-file for this document will be changed to '<path>\Test.pdf', 'Modified' property will be changed to 'false'.
or to:
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.
The behavior of current build in this case(if special save-flag is not specified or equals to 0 and different dest.-name specified):
saves document into a new file and associates document with new file, but incorrectly displays in the UI a file path of this document: shows path to an old file.
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).
Thanks.
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Identify when ActiveX is done
Thanks for the explanation of the differences between the two options, I'll check over my current code to ensure that that is the way we're doing things. The example code I provided was, obviously, just a quick example thrown together to demonstrate the observed behaviour.
-
- Site Admin
- Posts: 798
- Joined: Tue Apr 14, 2009 11:33 pm
Re: Identify when ActiveX is done
Thanks, 

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.
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com