Saving signature when pdf is loaded in memory and not from file
Posted: Tue Jun 18, 2019 2:48 pm
Hi Alex,
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:
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?
Thanks again for all your support.
-Jesse
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:
Code: Select all
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
}
}
Thanks again for all your support.
-Jesse