How to stop Prompt for Saving after adding Digital Signature
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 29
- Joined: Thu Jan 03, 2013 7:43 pm
How to stop Prompt for Saving after adding Digital Signature
Hi, I realize that when a digital signature is applied, a save should occur, because after that, if user edited, then signature would indicate changes made etc, but, is there any way to just have a regular popup to save yes/no as you do when document is dirty and you close viewer, instead of having to choose a file to save to etc.
Thanks
Thanks
-
- Site Admin
- Posts: 7361
- Joined: Wed Mar 25, 2009 10:37 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Hi patient chart manager, llc
there is no way in the current End User Viewer to do this. We have been asked this before and have added it to the feature wish list. I can't promise if it will be delivered but it's least on the radar. I'll need to get one of the dev team to comment on if this can be done with the SDK.
Look for an answer here.
hth
there is no way in the current End User Viewer to do this. We have been asked this before and have added it to the feature wish list. I can't promise if it will be delivered but it's least on the radar. I'll need to get one of the dev team to comment on if this can be done with the SDK.
Look for an answer here.
hth
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 29
- Joined: Thu Jan 03, 2013 7:43 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Ok, well, this is so critical because no reason that the user inside my program should be allowed access to the file system, to choose where they want to save the file, even if there was a way to eliminate that dialog, and just when user answers yes to save, at least not getting another dialog that gives them unfettered access to the file system.
Best suggestion for implementation would be to cache the signing, so in case users makes a few more changes, that applied digital signature is indeed done after all edits are finished.
Thanks
Best suggestion for implementation would be to cache the signing, so in case users makes a few more changes, that applied digital signature is indeed done after all edits are finished.
Thanks
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Hi, patient chart manager llc
I can suggest you one way to suppress the 'Save As' dialog and save signed document silently.
HTH.
I can suggest you one way to suppress the 'Save As' dialog and save signed document silently.
Code: Select all
bool g_bSigningDoc = false;
...
g_bSigningDoc = true;
DoVerb(null, "ExecuteCommand", DataIn("SignDocument"), null, 0);
g_bSigningDoc = false;
...
youreventhandler OnEvent(type, name..)
{
if (g_bSigningDoc && (type == PXCVA_OnNamedNotify) AND (name == "Notifications.BeforeSaveDoc"))
{
// get current source file name
int docID;
pdfViewer.GetProperty("Notifications.BeforeSaveDoc.DocID", out docID, 0);
string fileName;
pdfViewer.GetDocumentProperty(docID, "FileName", out fileName, 0);
// to save to source file
pdfViewer.SetProperty("Notifications.BeforeSaveDoc.DestFileName", fileName, 0);
pdfViewer.SetProperty("Notifications.BeforeSaveDoc.SaveMode", 0, 0);
}
}
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: 29
- Joined: Thu Jan 03, 2013 7:43 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Ok, well, that is a big help, but, there is still the dialog that pops up asking you to confirm whether you want to use incremental saving or not, and hard to see why that should come up if this statement is used as you show:
pdfViewer.SetProperty("Notifications.BeforeSaveDoc.SaveMode", 0, 0);
I also use that command even before loading the document, but does not matter, still one more dialog, but certainly much better than before. Please advise if there is anyway still that final dialog can be suppressed, as I always want full save, not incremental, and bothersome to see that.
Thanks for the help, hope we have this final piece of the puzzle.
pdfViewer.SetProperty("Notifications.BeforeSaveDoc.SaveMode", 0, 0);
I also use that command even before loading the document, but does not matter, still one more dialog, but certainly much better than before. Please advise if there is anyway still that final dialog can be suppressed, as I always want full save, not incremental, and bothersome to see that.
Thanks for the help, hope we have this final piece of the puzzle.
-
- User
- Posts: 29
- Joined: Thu Jan 03, 2013 7:43 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Ok, sorry, my mistake, I forgot to add to this notification:
Call PDFX1.setProperty("Prompts.ConfirmDocumentIncSave.UserChoice", "No", 0)
and that fixed the issue, thanks so much, made my day
Call PDFX1.setProperty("Prompts.ConfirmDocumentIncSave.UserChoice", "No", 0)

and that fixed the issue, thanks so much, made my day
-
- Site Admin
- Posts: 7361
- Joined: Wed Mar 25, 2009 10:37 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Awesome to hear.


Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Hi,
I have the same problem and I have test your solution. But it doesn't work.
The Problem is, that immediately after "ExecuteCommand" the g_bSigningDoc will set to "False". But at this time the signature is not yet inserted. And after signature-insert the "OnEvent" fires, but g_bSigningDoc is already "False" at this time.
g_bSigningDoc = True
DoVerb(null, "ExecuteCommand", DataIn("SignDocument"), null, 0);
g_bSigningDoc = False
So what am I doing wrong?
BTW: No "ConfirmDocumentIncSave" Event fires! Why?
I have the same problem and I have test your solution. But it doesn't work.
The Problem is, that immediately after "ExecuteCommand" the g_bSigningDoc will set to "False". But at this time the signature is not yet inserted. And after signature-insert the "OnEvent" fires, but g_bSigningDoc is already "False" at this time.
g_bSigningDoc = True
DoVerb(null, "ExecuteCommand", DataIn("SignDocument"), null, 0);
g_bSigningDoc = False
So what am I doing wrong?
BTW: No "ConfirmDocumentIncSave" Event fires! Why?
-
- User
- Posts: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Meanwhile, I've tried everything, but it does not work.
Any advice for me?
Any advice for me?
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Hi, Dorwol.
HTH
It may occur when your document doesn't contain any unsigned 'digital-signature' fields. In this case the command 'SignDocument' only activates the 'Place Signature' end-user's tool and returns immediately without any dialogs. After this user will be able to place 'digital-signature' field by mouse clicking on the page. So for your case the document must have one unsigned 'digital signature' field...The Problem is, that immediately after "ExecuteCommand" the g_bSigningDoc will set to "False".
HTH
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.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to stop Prompt for Saving after adding Digital Signa
The same reason: it looks like that your document doesn't contain any 'digital signature' fields..BTW: No "ConfirmDocumentIncSave" Event fires! Why?
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: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: How to stop Prompt for Saving after adding Digital Signa
I'm not sure if I understood you correctly. Before I call "Sign Document", I have an unsigned 'digital signature' field to add?
Strange but how do I do that? In the instructions I found no command to do this?
Can you give me a pseudo-code please?
Strange but how do I do that? In the instructions I found no command to do this?
Can you give me a pseudo-code please?
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
Re: How to stop Prompt for Saving after adding Digital Signa
Hi Dorwol,
Ivan explains the differences between Place Signature and Sign Document here:
https://forum.pdf-xchange.com/ ... hp?p=28552
So have you tried calling the PlaceSignature (ID: 36517) command instead?
Regards,
Stefan
Ivan explains the differences between Place Signature and Sign Document here:
https://forum.pdf-xchange.com/ ... hp?p=28552
So have you tried calling the PlaceSignature (ID: 36517) command instead?
Regards,
Stefan
-
- User
- Posts: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: How to stop Prompt for Saving after adding Digital Signa
> So have you tried calling the PlaceSignature (ID: 36517) command instead?
Already yesterday tested. But exactly the same bad result!
Already yesterday tested. But exactly the same bad result!

-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Sorry, the 'PlaceSignature' cannot help you. It only activates the end-user's tool for placing signature fields on the pages. Currently is no way to add the empty, unsigned signature-field that can be used by "SignDocument" operation.
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: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: How to stop Prompt for Saving after adding Digital Signa
-
And why it works for "patient chart manager, llc"?
Is there a way for detecting the reason for the "Notifications.BeforeSaveDoc" event?
Is there a way for detecting if "Sign-Tool mousepointer" is still activated?
Is there any other way? I need the possibility for saving a signed document in the database only and not as file by asking the user for any filename!
And why it works for "patient chart manager, llc"?
So the question is still "How to stop Prompt for Saving after adding Digital Signature"?patient chart manager, llc wrote:and that fixed the issue, thanks so much, made my day
Is there a way for detecting the reason for the "Notifications.BeforeSaveDoc" event?
Is there a way for detecting if "Sign-Tool mousepointer" is still activated?
Is there any other way? I need the possibility for saving a signed document in the database only and not as file by asking the user for any filename!

-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Hi, Dorwol.
-this feature will be available soon.
Also you may catch:
BUT will be still unclear situations when you signing document that:
1. has not any empty(unsigned) signature-fields - in this case the "SignDocument" will activate the "DigSign" tool. User must choose page, position on page, and click mouse. The "Sign Document" dialog will be shown.
2. has more one empty signature-fields - in this case the "SignDocument" will warn user about this situation. User must choose necessary field on page and click it. The "Sign Document" dialog will be shown.
HTH.
Currently - is no way. But in new build we can add simple string prop than can be used like:Is there a way for detecting the reason for the "Notifications.BeforeSaveDoc" event?
Code: Select all
youreventhandler OnEvent(type, name..)
{
if ((type == PXCVA_OnNamedNotify) AND (name == "Notifications.BeforeSaveDoc"))
{
// check for reason
string saveReason;
pdfViewer.GetProperty("Notifications.BeforeSaveDoc.Reason", out saveReason, 0);
if (saveReason != "sign")
return; // default procedure
// get current source file name
int docID;
pdfViewer.GetProperty("Notifications.BeforeSaveDoc.DocID", out docID, 0);
string fileName;
pdfViewer.GetDocumentProperty(docID, "FileName", out fileName, 0);
// to save to source file
pdfViewer.SetProperty("Notifications.BeforeSaveDoc.DestFileName", fileName, 0);
pdfViewer.SetProperty("Notifications.BeforeSaveDoc.SaveMode", 0, 0);
}
else if ((type == PXCVA_OnDisplayPrompt) AND (name == "Prompts.ConfirmDocumentIncSave"))
{
pdfViewer.SetProperty("Prompts.ConfirmDocumentIncSave.UserChoice", "yes", 0); // to skip possible asking about incremental save when you signing
}
}
Is there a way for detecting if "Sign-Tool mousepointer" is still activated?
Code: Select all
string activeToolName;
pdfViewer.GetProperty("Tools.Active", out activeToolName, PXCVA_GetNamed);
if (activeToolName == "DigSign")
{
....
}
Code: Select all
youreventhandler OnEvent(type, name..)
{
if ((type == PXCVA_OnPropertyChanged) AND (name == "Tools.Active"))
{
string activeToolName;
pdfViewer.GetProperty("Tools.Active", out activeToolName, PXCVA_GetNamed);
...
}
}
1. has not any empty(unsigned) signature-fields - in this case the "SignDocument" will activate the "DigSign" tool. User must choose page, position on page, and click mouse. The "Sign Document" dialog will be shown.
2. has more one empty signature-fields - in this case the "SignDocument" will warn user about this situation. User must choose necessary field on page and click it. The "Sign Document" dialog will be shown.
HTH.
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: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: How to stop Prompt for Saving after adding Digital Signa
> unclear situations when you signing document that
The first one: (User must choose page, position on page, and click mouse. The "Sign Document" dialog will be shown)
> if (activeToolName == "DigSign")
Cool!
> if (saveReason != "sign")
Perfect!
> But in new build
Any timeframe for me? Next month?
Have a good day!
The first one: (User must choose page, position on page, and click mouse. The "Sign Document" dialog will be shown)
> if (activeToolName == "DigSign")
Cool!

> if (saveReason != "sign")
Perfect!

> But in new build
Any timeframe for me? Next month?
Have a good day!

-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to stop Prompt for Saving after adding Digital Signa
Approximately - in 1.5 weeks.> But in new build
Any timeframe for me? Next month?
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.