Signing specific pages in the multipage document

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Signature MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-signature -- dnx GroupDocs.Signature.Mcp --yes
Folders, licensing and more →

Base signature options SignOptions contains property SignOptions.PagesSetup which allows to set up specific page numbers.

This example shows how to sign specific pages in the multipage Tiff document through the PagesSetup.PageNumbers list of integer values.

using (var signature = new Signature("multipage.tiff"))
{
    var options = new QrCodeSignOptions("Patient #36363393. R: No-Issues")
    {
        // set signature position 
        Left = 10,
        Top = 10,
        // set signature rectangle
        Width = 200,
        Height = 200,
        //specify pages numbers which we want to sign
        PagesSetup = new PagesSetup()
        {
            PageNumbers = new List<int> { 1, 3 }
        }
    };

    // sign document to file
    SignResult signResult = signature.Sign(outputFilePath, options);
    Console.WriteLine($"\nDocument signed with {signResult.Succeeded.Count} signatures");
    Console.WriteLine("\nList of newly created signatures:");
    foreach (BaseSignature temp in signResult.Succeeded)
    {
        Console.WriteLine($"{temp.SignatureType} at page #{temp.PageNumber}: Id:{temp.SignatureId}.");
    }
}

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online Apps

Along with the full-featured .NET library, we provide simple but powerful free online apps.

To sign PDF, Word, Excel, PowerPoint, and other documents you can use the online apps from the GroupDocs.Signature App Product Family.