Inquiry about Adding Signature During Dynamic PDF Generation with GroupDocs.Signature

I have a specific requirement where I need to add a signature to a PDF while it is being dynamically generated, rather than adding the signature to an existing PDF.

Upon reviewing the current documentation, it appears that GroupDocs.Signature primarily focuses on working with existing documents. However, my use case involves adding only a signature during the dynamic PDF generation process no stamps or text or images.

Could you kindly provide information on whether GroupDocs.Signature supports this specific workflow? If it does not currently support this feature, I would appreciate any insights into potential workarounds or any plans for introducing such functionality in future updates.

Your assistance in this matter is greatly appreciated. Thank you for your time and support.

If I want to add a particular feature from “GroupDocs.Signature” such as stamp or signature without adding my pdf first save it and then attach it to a generated pdf at a particular location in the pdf.
Thanks

@nafi1211

Do you want to initially generate a signature, save it in image format, for instance, and subsequently embed that signature/image into a PDF document situated in your directory on a specified page?

@atir.tahir
Yes and specific page at specific location for example right bottom corner above word “SIGNATURE”

@nafi1211
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SIGNATURENET-5018

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@nafi1211

We investigated SIGNATURENET-5018. API doesn’t actually generate signatures. It basically signs files, but you can sign any document and extract signatures from the content in the SignResult then save them (like in the above code).
We don’t have such functionality that allows generating signatures, but below is the workaround.

//C# code
using (Signature signature = new Signature(@"sample.pdf"))
{
    // Create QRCode option with predefined QRCode text
    QrCodeSignOptions options = new QrCodeSignOptions("JohnSmith")
    {
        // Setup QRCode encoding type
        EncodeType = QrCodeTypes.QR,
        // Set signature position
        Left = 100,
        Top = 100,
        ReturnContent = true
    };

    // Sign the document and obtain the result
    SignResult? result = signature.Sign(@"sample_result.pdf", options);

    // Counter for file naming
    int i = 0;

    // Iterate through successful signatures
    foreach (QrCodeSignature barcodeSignature in result.Succeeded)
    {
        if (barcodeSignature.Content != null)
        {
            // Define the folder path to store the result
            string pathToFolder = @"result_folder";
            // Generate output file path with unique name
            string outputFilePath = Path.Combine(pathToFolder, $"image{i}{barcodeSignature.Format?.Extension}");

            // Write the signature content to a file stream
            using (FileStream fs = new FileStream(outputFilePath, FileMode.Create))
            {
                fs.Write(barcodeSignature.Content, 0, barcodeSignature.Content.Length);
            }
        }

        // Increment file naming counter
        i++;
    }
}

The above code signs a PDF document with a QR code containing the text “JohnSmith”, saves the signed document as “sample_result.pdf”, and then extracts and saves the QR code images from the signed document to a specified folder.

Can you please help me with adding this using Asp.net without MVC pattern. I downloaded a demo project but its not gonna work since it is in MVC pattern and cannot use it in our project since it will be a lengthy and difficult process to do. We want in our organisation to add this feature in already built project at a particular webform and if the trial version works in our project we are thinking of buying the full paid version as soon as possible. Waiting for your reply. Regards

@nafi1211

We already have a WebForms application. However, we have created a ticket SIGNATURENET-5033 to look into the possibility to update the demo application to cooperate with this feature. You’ll be notified in case of any update.

I worked out with the project link you have provided but we will have to work around it to implement but what we want is to implement this to already made projects. It is a lengthy/tough process to do so. Suggest some way to add it to our already made projects easily instead of working around the given link you have provided. Thanks for your support. Regards

@nafi1211

Please note that GroupDocs.Signature for .NET is a back-end, UI-agnostic API that could be integrated in any .NET application irrespective of framework/platform.
In your existing application, you could implement this code there are no UI dependencies.

Forgot to update you that our requirement for Dynamic generation is not present anymore and want to just add signing of pdf & docs in our project

@nafi1211

Please refer to this documentation article - sign document with text signature.
You just have to pass the source file to the Signature class and specify signature position.

with the help of your provided Github WebForms Demo i was able to run it and made adjustments in the same Demo as per our project requirements, what i am asking is right now is to able to do the same in already built project and work like this, for that what all needs to be transferred/used from the Demo in already built ASP.Net project in webform? I feel there has to be more than just CODE to be added in the project. Also
i have attached this time with our projects file structure,


I have added “AddSign.aspx” in our existing project to work as i have provided above (PopUp for Signature).
image.png
Here is the file Structure of Demo project you have provided with. I hope I was clear with all the necessary details I can think of to you and was able to explain the issue I am facing to add in our Project.
Once again thanks for your help & support.

@nafi1211

We are already looking into possibility to develop a simple ASP.NET WebForms application. Please note all free support tickets are assisted on first come first serve basis. However, you’ll be notified in case of any update.

Please also consider this email (nsiddique@protatechindia.com) for further updates as CC.

@nafi1211

Alright.

Hi Atir, is there any update on this?
This particular integration is an integral part of our project and we have to update further to our management so that we can purchase the product as soon as possible.
Regards, Nafi

@nafi1211

This ticket is still under investigation. Please note that all free tickets are assisted on first come first serve basis.

Can I get an ETA? Also we can only go ahead with the product when we know that it will fulfill our requirements.
Regards,
Nafi Azim Siddique
Proatech India Pvt. Ltd

@nafi1211

We’ll soon share a guideline for you on how to integrate the Signature API in ASP.NET WebForms project.