Features Overview

GroupDocs.Assembly for Python via .NET generates reports from templates. A template is an ordinary document of one of the supported formats whose text holds tags such as <<[customer.Name]>> or <<foreach [o in orders]>>. Every task follows the same workflow: prepare the data, wrap each data source in a DataSourceInfo with the name the template uses, and call DocumentAssembler.assemble_document() with the template and the report to write.

Data sources

Fill a template with:

Template syntax

Expressions in tags use a subset of C# syntax that works on any data source: arithmetic, comparisons, string operations, the Sum, Count, Average, Where, OrderBy, GroupBy and other sequence operations, and conditional expressions. Format numbers, dates and text in the tag itself, declare variables, and leave comments in a template. See Template syntax - part 1, part 2, Basic template syntax and Enumeration extension methods.

Reports

Formats

Templates and reports can be Word processing documents, spreadsheets, presentations, OpenDocument files, emails, HTML, Markdown and plain text. A report is saved in the format of its file extension, or of the format you name with LoadSaveOptions, so a Word template can give a PDF or HTML report. See Supported document formats, Changing target file format and Using Markdown documents.

Assembly options

Loading and saving

Read templates from files or streams and write reports to files or streams, resolve the pictures of an HTML template from a folder of your choice, save an HTML report with its resources in a separate folder, and choose the OOXML compliance level of a Word report. See Streams vs. file paths, Loading and saving with external resource files and Specify OOXML compliance.