Loads a template document from the specified source path, populates the template document with data from the specified single or multiple sources, and stores the result document to the target path using default LoadSaveOptions.
Loads a template document from the specified source path, populates it with data from the given sources, and saves the result to the target path using the provided LoadSaveOptions.
Loads a template document from the specified source stream, populates it with data from the given sources, and writes the result to the target stream using default LoadSaveOptions.
Loads a template document from the specified source stream, populates it with data from the given sources, and writes the result to the target stream using the provided LoadSaveOptions.
The unordered set of unique type names that can be referenced in document templates processed by this assembler instance to invoke static members, perform type casts, etc.
Gets or sets a value indicating whether invocations of custom type members performed via reflection API are optimized using dynamic class generation or not. The default value is true.
Example
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerorders=[{"Number":10001,"Product":"Harbor Blend whole bean coffee","Quantity":30,"Price":552.0},{"Number":10004,"Product":"Aged harbour cheddar","Quantity":8,"Price":132.0},]# Each data source goes under the name the template's tags use for itassembler=DocumentAssembler()assembler.assemble_document("order-table.docx","order-table-report.docx",[DataSourceInfo("Quayside Bistro","customer"),DataSourceInfo(orders,"orders"),])