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
I want to set a digital signature in my pdf with PDV Viewer SDK but i want catch th event "Prompts.ConfirmDocumentIncSave" to set the filename itself and ommit the confirmation to the user. But i never get PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnDisplayPrompt, the control itself handels the "SaveAs" an no event is fired.
Private Sub AxCoPDFXCviewAkt_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCviewAkt.OnEvent
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnDisplayPrompt Then
If e.name = "Prompts.ConfirmDocumentIncSave" Then
Dim nDocID As Integer
Dim filenameNew As String = System.IO.Path.GetTempPath() & System.IO.Path.GetFileNameWithoutExtension(System.IO.Path.GetTempFileName) & ".PDF"
AxCoPDFXCviewAkt.GetActiveDocument(nDocID)
AxCoPDFXCviewAkt.SetProperty("Documents[#" & CStr(nDocID) & "].Prompts.ConfirmDocumentIncSave.FileName", filenameNew)
AxCoPDFXCviewAkt.SetProperty("Documents[#" & CStr(nDocID) & "].Prompts.ConfirmDocumentIncSave.UserChoice", 0)
AddLogAction(LogAction.AddDoc, cmbGesellschaft.SelectedValue, gAktObj.Properties("F_DOCNUMBER").Value)
SaveAsNewDokument(gAktObj, filenameNew, False, gDocclassnameAkt)
MsgBox("Dokument ist signiert!", MsgBoxStyle.Information)
End If
End If
End Sub
By default the "Documents.SaveMethod" means the "FullOrIncrementalForDigSign" - it enforces control to incremental save of all dig-signed documents automatically, without any confirmation, see our SDK Help.
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.
Unfortunatley it doesn't help. I always get the "Save As" - Dialog on control after i attach a digital signing, but no event PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnDisplayPrompt. I'd like to handle the SaveAs be my own by setting a known filename to replace the existing document in our documentarchivingsystem.
We cannot reproduce this issue.
One thought - you should call the ax.SetProperty("Documents.SaveMethod", "Full", 0) BEFORE any document opening.
Can you provide a simple example project for reproducing?
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.
If I understand you correctly - you wanted to override our "Save As" dialog after digital signing of document? If yes - it's impossible in current implementation, but we will add the special named notification like as "Notifications.SaveDocument". You will be able to replace the destination file name in our "Save As" dialog or replace/skip this dialog fully. Wait for the next build...
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.
This still does not work, and this event "Notifications.SaveDocument" does not fire.
I just wish there was a way for this to work, do not understand why the feature can't work like the one Prompts.ConfirmDocumentSave, which does work perfectly fine.
Please fix for 2.5.0.8 as this control is very stable, and to have to upgrade to V3 just for this one feature is hard to swallow.