Working with String Template

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.Assembly 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-assembly -- dnx GroupDocs.Assembly.Mcp --yes
Folders, licensing and more →

GroupDocs.Assembly API allows you to use a string as input and output template, instead of document. This feature improves programmability while working with strings instead of documents, the resultant output string can be used as per the application needs. Follow these steps to using a string as input and output template:

  • Initialize DocumentAssembler
  • Define sourceString “«[yourValue]»”
  • Convert sourceString to sourceBytes using ByteArrayInputStream(sourceBytes)
  • Get targetBytes using DocumentAssembler.assembleDocument()
  • Get** targetString **using new String(targetBytes, StandardCharsets.UTF_8)