assemble_document method
assemble_document
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
.
Returns
A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if
a value of the DocumentAssembler.options
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.
def assemble_document(self, source_path, target_path, data_source_infos):
...
Parameter | Type | Description |
---|---|---|
source_path | str | The path to a template document to be populated with data. |
target_path | str | The path to a result document. |
data_source_infos | list | Provides information on data source objects to be used. |
assemble_document
Loads a template document from the specified source stream, populates the template document with data from
the specified single or multiple sources, and stores the result document to the target stream using default
LoadSaveOptions
.
Returns
A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if
a value of the DocumentAssembler.options
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.
def assemble_document(self, source_stream, target_stream, data_source_infos):
...
Parameter | Type | Description |
---|---|---|
source_stream | io.RawIOBase | The stream to read a template document from. |
target_stream | io.RawIOBase | The stream to write a result document. |
data_source_infos | list | Provides information on data source objects to be used. |
assemble_document
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 the given
LoadSaveOptions
.
Returns
A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if
a value of the DocumentAssembler.options
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.
def assemble_document(self, source_path, target_path, load_save_options, data_source_infos):
...
Parameter | Type | Description |
---|---|---|
source_path | str | The path to a template document to be populated with data. |
target_path | str | The path to a result document. |
load_save_options | LoadSaveOptions |
Specifies additional options for document loading and saving. |
data_source_infos | list | Provides information on data source objects to be used. |
assemble_document
Loads a template document from the specified source stream, populates the template document with data from
the specified single or multiple sources, and stores the result document to the target stream using the given
LoadSaveOptions
.
Returns
A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if
a value of the DocumentAssembler.options
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.
def assemble_document(self, source_stream, target_stream, load_save_options, data_source_infos):
...
Parameter | Type | Description |
---|---|---|
source_stream | io.RawIOBase | The stream to read a template document from. |
target_stream | io.RawIOBase | The stream to write a result document. |
load_save_options | LoadSaveOptions |
Specifies additional options for document loading and saving. |
data_source_infos | list | Provides information on data source objects to be used. |
See Also
- module
groupdocs.assembly
- class
DocumentAssembler
- class
LoadSaveOptions