Save 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.Merger 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-merger -- dnx GroupDocs.Merger.Mcp --yes
Folders, licensing and more →

GroupDocs.Merger allows to save PDF resultant document by specifying accesibility settings PdfAccesibilitySettings.

There is an ability to set parameter EnableAutoTagging in order to enable auto tagging mode.

The steps to save document with auto tagging mode are the following:

Save the PDF document with auto tagging mode

The following code sample demonstrates how to save PDF document with auto tagging mode:

string filePath = @"c:\sample.pdf";
string filePathOut = @"c:\result.pdf";

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.AccesibilitySettings.EnableAutoTagging = true;
           
using (Merger merger = new Merger(filePath))
{
     merger.Save(filePathOut, pdfSaveOptions);
}  

Save any document by default

The following code sample demonstrates how to save any document by default:

string filePath = @"c:\sample.docx";
string filePathOut = @"c:\result.docx";

using (Merger merger = new Merger(filePath))
{
     merger.Save(filePathOut);
}