sign document C#

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v12)  /  Re: sign document C#

DynamicPDF CoreSuite for .NET (v12) Forum

 Sep 20 2023 10:52 AM
is there a way i can sign a document one time but link multiple pages with an image to the same signature?
 Sep 20 2023 3:45 PM
Posted by a ceTe Software moderator
Hi,

You can sign the PDF using DynamicPDF Core Suite for .NET product. Please refer to the documentation on digital signing here. If you sign a document, then it is applied to the whole document (all pages in that document).

Thanks,
ceTe Software Support Team
 Oct 08 2023 2:28 AM
i'm trying display the signature image on the same position on multiple pages is there a way to achieve it?
 Oct 09 2023 9:39 AM
Posted by a ceTe Software moderator
Hi,

Yes, you can add an image to a PDF at a specific location using DynamicPDF Core Suite for .NET. You will need to load the image using the Image page element and then apply it to the whole Document using Template object.

Here is a code sample.

            //Load exiting PDF.
            string inputPdf = @"Input PDF file path";
            PdfDocument pdf = new PdfDocument(inputPdf);
            MergeDocument document = new MergeDocument(pdf);
            //Load an image using Image page element.
            string inputImage = @"Input Image file path";
            Image imageObj = new Image(inputImage,0,0);
            imageObj.X = 100;
            imageObj.Y = 100;
            //Create Tamplate object to apply to whole document.
            Template templateObj = new Template();
            templateObj.Elements.Add(imageObj);
            //Apply template object to Document.
            document.Template = templateObj;
            string outputPdf = @"C:\Temp\Mydocument.pdf";
            document.Draw(outputPdf);

Thanks,
ceTe Software Support Team
 Oct 09 2023 11:43 AM
great thanks but i meant to add an image in all pages that is linked to the signature is that possible?


 Oct 09 2023 12:22 PM
something more like:
templateObj.Elements.Add(signature);

but only with one signer in the document when you click on it
now i have a few lines of the same signer
 Oct 09 2023 1:38 PM
Posted by a ceTe Software moderator
Hi,

You can add multiple signature fields and sign them dynamically using DynamicPDF Core Suite for .NET. Only one Signature will be applied to all pages.

Here is a code sample.

            //Load exiting PDF.
            string inputPdf = @"Input PDF file path";
            PdfDocument pdf = new PdfDocument(inputPdf);
            MergeDocument document = new MergeDocument(pdf);
            Signature signField = new Signature("sig",100, 100, 100, 50);
           
            string inputImage = @"Input image file path";
            signField.LeftPanel.HideAllText();
            signField.LeftPanel.SetImage(ImageData.GetImage(inputImage));
            signField.LeftPanel.FitImage =true;
            //Create Tamplate object to apply to whole document.
            Template templateObj = new Template();
            templateObj.Elements.Add(signField);
            Certificate certObj = new Certificate(@"Certificate file path", "password");
            document.Sign("sig", certObj);
            //Apply template object to Document.
            document.Template = templateObj;
            string outputPdf = @"C:\Temp\Mydocument.pdf";
            document.Draw(outputPdf);
           

Thanks,
ceTe Software Support Team
 Oct 11 2023 10:18 AM
it signed each page
when i check the signature panel in adobe
i see a line for each page the same signature
 Oct 12 2023 7:36 AM
Posted by a ceTe Software moderator
Hi,

The code sample we posted above will sign the document with only one digital signature and will be applied to all signature fields.

If you are trying to sign multiple signature fields in a PDF, then you may want to add signature fields with unique names and sign one at a time.

If you continue facing an issue, then you can email your requirements to support@dynamicpdf.com so we can guide you further.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 10:18 AM.