We load our PDF's directly from our db into memory and then directly into the pdf editor sdk without first creating a file. Everything has been working great except signatures. It wants to save to a file on disk and will not allow me to save back to the file in memory. I've tried this code to prevent the Save As window from showing and having it save back to it's original in memory source:
else if (e.nEventID == nIDS[(int)IDS.e_operBeforeExecute])
PDFXEdit.IOperation oper = (PDFXEdit.IOperation)e.pFrom;
int opAddSig = PDFXEditor.Inst.Str2ID("op.document.addDigitalSignature", false);
if (opAddSig == oper.ID && PDFXEditor.Doc != null)
PDFXEdit.ICabNode options = oper.Params.Root["Options"];
options["AskDestinationFileName"].v = false;
options["DestinationFileName"].v = ""; //Saving to the same document
but it gives me a Parameter is invalid error always. I've figured out a workaround to saving it to a file and then loading that file back into memory after the signature is added, but we would rather not have to create the file. Is there any way to do this?
This will work like this for the Editor SDK for now. The problem is that the signing process is being done when the document is being saved - that's the nature of it.
You can try opening the document via the IPXC level and then you can use the deferred signing via the IPXC_Document::DeferedDigitalSign method and save the document where you want (in your case - into the memory).
Join us at Google+: https://plus.google.com/+PDFXChangeEditorTS Subscribe at: https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ