Group docs editor to enable editing of variable fields of the pdf

Hi,

I have been looking at Group Docs Editor features for one of my requirement. Our requirement is, we have pdfs with some variable fields (Please find sample screen shot below.) We want to implement .NET web application, to allow the user to edit the variable fields on the document and save it. While saving, we want to extract the data entered in the variable fields and store it for our further process.

We can also, convert our variable PDF to word document and use the group docs editor to edit the word document. However, the problem with this is, it is allowing to edit the whole document but not few fields for which we want to allow edits.

Could you please point me if this feature is available/doable using groups doc editor?

Sample screenshot with variable fields:
image.png (20.2 KB)

@nagasivaos

We are investigating this use-case, your investigation ticket ID is EDITORNET-2754. We’ll notify you in case of any update.

@nagasivaos

Editing only variable fields feature is supported by GroupDocs.Signature. Below is the code snippet that demonstrates how you can retrieve information from form fields in a document, update the values, and then save it in the DOCX format.

string filePath = "sample.pdf";
string outputFilePath = "result.docx";

using (Signature signature = new Signature(filePath))
{
    //get information about document form fields  
    IDocumentInfo documentInfo = signature.GetDocumentInfo();

    foreach (PageInfo pageInfo in documentInfo.Pages)
    {
        Console.WriteLine(
            $" - page-{pageInfo.PageNumber} Width {pageInfo.Width}, Height {pageInfo.Height}");
    }

    // display document Form Field signatures information
    Console.WriteLine($"Document Form Fields information: count = {documentInfo.FormFields.Count}");
    foreach (FormFieldSignature formField in documentInfo.FormFields)
    {
        Console.WriteLine($" - type #{formField.Type}: Name: {formField.Name} Value: {formField.Value}");
    }

    // display document Form Fields signatures information
    Console.WriteLine($"Document Form Fields signatures : {documentInfo.FormFieldSignatures.Count}");
    var documentInfoFormFields = documentInfo.FormFields;
    foreach (FormFieldSignature formFieldSignature in documentInfoFormFields)
    {
        Console.WriteLine(
            $" - #{formFieldSignature.SignatureId} Type {formFieldSignature.Type}: Name: {formFieldSignature.Name} Value: {formFieldSignature.Value}");
    }

    TextSignOptions ffOptions = new TextSignOptions("Document is approved")
    {
        // set alternative signature implementation on document page
        SignatureImplementation = TextSignatureImplementation.FormField,
        FormTextFieldType = FormTextFieldType.PlainText
    };

    List<SignOptions> listOptions = new List<SignOptions>();
    listOptions.Add(ffOptions);

    PdfSaveOptions pdfSaveOptions = new PdfSaveOptions()
    {
        FileFormat = PdfSaveFileFormat.DocX,
        OverwriteExistingFiles = true
    };

    // sign document to file
    signature.Sign(outputFilePath, listOptions, pdfSaveOptions);
}

You may find following articles helpful: