diff --git a/english/python-net/_index.md b/english/python-net/_index.md index eaab697fe8f..3748390bbec 100644 --- a/english/python-net/_index.md +++ b/english/python-net/_index.md @@ -29,6 +29,7 @@ is_root: true | [aspose.words.layout](./aspose.words.layout/) | The **aspose.words.layout** module provides classes that allow to access information such as on what page and where on a page particular document elements are positioned, when the document is formatted into pages. | | [aspose.words.lists](./aspose.words.lists/) | The **aspose.words.lists** module contains classes for working with bulleted and numbered lists defined in a document. | | [aspose.words.loading](./aspose.words.loading/) | The **aspose.words.loading** module provides classes and enumerations that allow to specify additional options when loading documents. | +| [aspose.words.lowcode](./aspose.words.lowcode/) | The **Aspose.Words.LowCode** contains classes and methods to handle complex general operations in a low code way. | | [aspose.words.mailmerging](./aspose.words.mailmerging/) | The **aspose.words.mailmerging** module contains classes of the "original" mail merge reporting engine. | | [aspose.words.markup](./aspose.words.markup/) | The **aspose.words.markup** module contains classes that represent customer defined semantics in a document: smart tags, custom XML and structured document tags (content controls). | | [aspose.words.math](./aspose.words.math/) | The **aspose.words.math** module contains classes that represent Office Math elements. | diff --git a/english/python-net/aspose.words.lowcode/_index.md b/english/python-net/aspose.words.lowcode/_index.md new file mode 100644 index 00000000000..be3c90a207c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/_index.md @@ -0,0 +1,56 @@ +--- +title: aspose.words.lowcode module +linktitle: aspose.words.lowcode module +articleTitle: aspose.words.lowcode module +second_title: Aspose.Words for Python +description: "The Aspose.Words.LowCode contains classes and methods to handle complex general operations in a low code way." +type: docs +weight: 160 +url: /python-net/aspose.words.lowcode/ +--- + +The **Aspose.Words.LowCode** contains classes and methods to handle complex general operations in a low code way. + +Represents a group of methods intended to convert, merge, split, compress etc. a variety of different types of documents, +ultimately streamlining the integration process and facilitating efficient data consolidation across multiple formats. + +Provides comprehensive document convert, merge, split with 35+ supported file formats. + + + + +## Classes + +| Class | Description | +| --- | --- | +| [Comparer](./comparer/) | Provides methods intended to compare documents. | +| [ComparerContext](./comparercontext/) | Document comparer context | +| [Converter](./converter/) | Represents a group of methods intended to convert a variety of different types of documents using a single line of code. | +| [ConverterContext](./convertercontext/) | Document converter context | +| [MailMergeDataSource](./mailmergedatasource/) | Mail merge data source used for using in [MailMergerContext](./mailmergercontext/). | +| [MailMergeOptions](./mailmergeoptions/) | Represents options for the mail merge functionality. | +| [MailMerger](./mailmerger/) | Provides methods intended to fill template with data using simple mail merge and mail merge with regions operations. | +| [MailMergerContext](./mailmergercontext/) | Mail merge context. | +| [Merger](./merger/) | Represents a group of methods intended to merge a variety of different types of documents into a single output document. | +| [MergerContext](./mergercontext/) | Document merger context. | +| [Processor](./processor/) | Processor class for performing different document processing actions. | +| [ProcessorContext](./processorcontext/) | Base class for processor contexts. Provides properties and options used by the processor to execute processing. | +| [Replacer](./replacer/) | Provides methods intended to find and replace text in the document. | +| [ReplacerContext](./replacercontext/) | Find/replace operation context. | +| [ReportBuilder](./reportbuilder/) | Provides methods intended to fill template with data using LINQ Reporting Engine. | +| [ReportBuilderContext](./reportbuildercontext/) | LINQ Reporting Engine context. | +| [ReportBuilderOptions](./reportbuilderoptions/) | Represents options for the LINQ Reporting Engine functionality. | +| [SignerContext](./signercontext/) | Document signer context | +| [SplitOptions](./splitoptions/) | Specifies options how the document is split into parts. | +| [Splitter](./splitter/) | Provides methods intended to split the documents into parts using different criteria. | +| [SplitterContext](./splittercontext/) | Document splitter context. | +| [Watermarker](./watermarker/) | Provides methods intended to insert watermarks into the documents. | +| [WatermarkerContext](./watermarkercontext/) | Document watermarker context. | + +## Enumerations + +| Enumeration | Description | +| --- | --- | +| [MergeFormatMode](./mergeformatmode/) | Specifies how formatting is merged when combining multiple documents. | +| [SplitCriteria](./splitcriteria/) | Specifies how the document is split into parts. | + diff --git a/english/python-net/aspose.words.lowcode/comparer/_index.md b/english/python-net/aspose.words.lowcode/comparer/_index.md new file mode 100644 index 00000000000..6f9cddf8c4c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparer/_index.md @@ -0,0 +1,56 @@ +--- +title: Comparer class +linktitle: Comparer class +articleTitle: Comparer class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Comparer class. Provides methods intended to compare documents." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/comparer/ +--- + +## Comparer class + +Provides methods intended to compare documents. + + +**Inheritance:** [Comparer](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ compare(v1, v2, output_file_name, author, date_time)](./compare/#str_str_str_str_datetime) | Compares two documents with additional options and saves the differences to the specified output file, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_file_name, author, date_time, compare_options)](./compare/#str_str_str_str_datetime_compareoptions) | Compares two documents with additional options and saves the differences to the specified output file, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_file_name, save_format, author, date_time)](./compare/#str_str_str_saveformat_str_datetime) | Compares two documents with additional options and saves the differences to the specified output file in the provided save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_file_name, save_format, author, date_time, compare_options)](./compare/#str_str_str_saveformat_str_datetime_compareoptions) | Compares two documents with additional options and saves the differences to the specified output file in the provided save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_file_name, save_options, author, date_time)](./compare/#str_str_str_saveoptions_str_datetime) | Compares two documents with additional options and saves the differences to the specified output file in the provided save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_file_name, save_options, author, date_time, compare_options)](./compare/#str_str_str_saveoptions_str_datetime_compareoptions) | Compares two documents with additional options and saves the differences to the specified output file in the provided save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_stream, save_format, author, date_time)](./compare/#bytesio_bytesio_bytesio_saveformat_str_datetime) | Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_stream, save_format, author, date_time, compare_options)](./compare/#bytesio_bytesio_bytesio_saveformat_str_datetime_compareoptions) | Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_stream, save_options, author, date_time)](./compare/#bytesio_bytesio_bytesio_saveoptions_str_datetime) | Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, producing changes as a number of edit and format revisions. | +|[ compare(v1, v2, output_stream, save_options, author, date_time, compare_options)](./compare/#bytesio_bytesio_bytesio_saveoptions_str_datetime_compareoptions) | Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, producing changes as a number of edit and format revisions. | +|[ compare_to_images(v1, v2, image_save_options, author, date_time)](./compare_to_images/#str_str_imagesaveoptions_str_datetime) | Compares two documents and saves the differences as images. Each item in the returned array represents a single page of the output rendered as an image. | +|[ compare_to_images(v1, v2, image_save_options, author, date_time, compare_options)](./compare_to_images/#str_str_imagesaveoptions_str_datetime_compareoptions) | Compares two documents and saves the differences as images. Each item in the returned array represents a single page of the output rendered as an image. | +|[ compare_to_images(v1, v2, image_save_options, author, date_time)](./compare_to_images/#bytesio_bytesio_imagesaveoptions_str_datetime) | Compares two documents and saves the differences as images. Each item in the returned array represents a single page of the output rendered as an image. | +|[ compare_to_images(v1, v2, image_save_options, author, date_time, compare_options)](./compare_to_images/#bytesio_bytesio_imagesaveoptions_str_datetime_compareoptions) | Compares two documents and saves the differences as images. Each item in the returned array represents a single page of the output rendered as an image. | +|[ create()](./create/#default) | Creates new instance of the converter processor. | +|[ create(context)](./create/#comparercontext) | Creates new instance of the comparer processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/comparer/compare/_index.md b/english/python-net/aspose.words.lowcode/comparer/compare/_index.md new file mode 100644 index 00000000000..1d807a8b5e6 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparer/compare/_index.md @@ -0,0 +1,339 @@ +--- +title: Comparer.compare method +linktitle: compare method +articleTitle: compare method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Comparer.compare method" +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/comparer/compare/ +--- + +## compare(v1, v2, output_file_name, author, date_time) {#str_str_str_str_datetime} + +Compares two documents with additional options and saves the differences to the specified output file, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: str, v2: str, output_file_name: str, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| output_file_name | str | The output file name. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## compare(v1, v2, output_file_name, author, date_time, compare_options) {#str_str_str_str_datetime_compareoptions} + +Compares two documents with additional options and saves the differences to the specified output file, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: str, v2: str, output_file_name: str, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| output_file_name | str | The output file name. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## compare(v1, v2, output_file_name, save_format, author, date_time) {#str_str_str_saveformat_str_datetime} + +Compares two documents with additional options and saves the differences to the specified output file in the provided save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: str, v2: str, output_file_name: str, save_format: aspose.words.SaveFormat, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## compare(v1, v2, output_file_name, save_format, author, date_time, compare_options) {#str_str_str_saveformat_str_datetime_compareoptions} + +Compares two documents with additional options and saves the differences to the specified output file in the provided save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: str, v2: str, output_file_name: str, save_format: aspose.words.SaveFormat, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## compare(v1, v2, output_file_name, save_options, author, date_time) {#str_str_str_saveoptions_str_datetime} + +Compares two documents with additional options and saves the differences to the specified output file in the provided save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: str, v2: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## compare(v1, v2, output_file_name, save_options, author, date_time, compare_options) {#str_str_str_saveoptions_str_datetime_compareoptions} + +Compares two documents with additional options and saves the differences to the specified output file in the provided save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: str, v2: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## compare(v1, v2, output_stream, save_format, author, date_time) {#bytesio_bytesio_bytesio_saveformat_str_datetime} + +Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: io.BytesIO, v2: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | io.BytesIO | The original document. | +| v2 | io.BytesIO | The modified document. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## compare(v1, v2, output_stream, save_format, author, date_time, compare_options) {#bytesio_bytesio_bytesio_saveformat_str_datetime_compareoptions} + +Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: io.BytesIO, v2: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | io.BytesIO | The original document. | +| v2 | io.BytesIO | The modified document. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## compare(v1, v2, output_stream, save_options, author, date_time) {#bytesio_bytesio_bytesio_saveoptions_str_datetime} + +Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: io.BytesIO, v2: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | io.BytesIO | The original document. | +| v2 | io.BytesIO | The modified document. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## compare(v1, v2, output_stream, save_options, author, date_time, compare_options) {#bytesio_bytesio_bytesio_saveoptions_str_datetime_compareoptions} + +Compares two documents loaded from streams with additional options and saves the differences to the provided output stream in the specified save format, +producing changes as a number of edit and format revisions. + + +```python +def compare(self, v1: io.BytesIO, v2: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | io.BytesIO | The original document. | +| v2 | io.BytesIO | The modified document. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## Examples + +Shows how to simple compare documents. + +```python +# There is a several ways to compare documents: +first_doc = MY_DIR + 'Table column bookmarks.docx' +second_doc = MY_DIR + 'Table column bookmarks.doc' +aw.lowcode.Comparer.compare(v1=first_doc, v2=second_doc, output_file_name=ARTIFACTS_DIR + 'LowCode.CompareDocuments.1.docx', author='Author', date_time=datetime.datetime(1, 1, 1)) +aw.lowcode.Comparer.compare(v1=first_doc, v2=second_doc, output_file_name=ARTIFACTS_DIR + 'LowCode.CompareDocuments.2.docx', save_format=aw.SaveFormat.DOCX, author='Author', date_time=datetime.datetime(1, 1, 1)) +compare_options = aw.comparing.CompareOptions() +compare_options.ignore_case_changes = True +aw.lowcode.Comparer.compare(v1=first_doc, v2=second_doc, output_file_name=ARTIFACTS_DIR + 'LowCode.CompareDocuments.3.docx', author='Author', date_time=datetime.datetime(1, 1, 1), compare_options=compare_options) +aw.lowcode.Comparer.compare(v1=first_doc, v2=second_doc, output_file_name=ARTIFACTS_DIR + 'LowCode.CompareDocuments.4.docx', save_format=aw.SaveFormat.DOCX, author='Author', date_time=datetime.datetime(1, 1, 1), compare_options=compare_options) +``` + +Shows how to compare documents from the stream. + +```python +# There is a several ways to compare documents from the stream: +with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.CompareStreamDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Comparer.compare(v1=first_stream_in, v2=second_stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, author='Author', date_time=datetime.datetime(1, 1, 1)) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.CompareStreamDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + compare_options = aw.comparing.CompareOptions() + compare_options.ignore_case_changes = True + aw.lowcode.Comparer.compare(v1=first_stream_in, v2=second_stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, author='Author', date_time=datetime.datetime(1, 1, 1), compare_options=compare_options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Comparer](../) + diff --git a/english/python-net/aspose.words.lowcode/comparer/compare_to_images/_index.md b/english/python-net/aspose.words.lowcode/comparer/compare_to_images/_index.md new file mode 100644 index 00000000000..48ebc5de481 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparer/compare_to_images/_index.md @@ -0,0 +1,110 @@ +--- +title: Comparer.compare_to_images method +linktitle: compare_to_images method +articleTitle: compare_to_images method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Comparer.compare_to_images method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/comparer/compare_to_images/ +--- + +## compare_to_images(v1, v2, image_save_options, author, date_time) {#str_str_imagesaveoptions_str_datetime} + +Compares two documents and saves the differences as images. +Each item in the returned array represents a single page of the output rendered as an image. + + +```python +def compare_to_images(self, v1: str, v2: str, image_save_options: aspose.words.saving.ImageSaveOptions, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| image_save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's image save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +## compare_to_images(v1, v2, image_save_options, author, date_time, compare_options) {#str_str_imagesaveoptions_str_datetime_compareoptions} + +Compares two documents and saves the differences as images. +Each item in the returned array represents a single page of the output rendered as an image. + + +```python +def compare_to_images(self, v1: str, v2: str, image_save_options: aspose.words.saving.ImageSaveOptions, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | str | The original document. | +| v2 | str | The modified document. | +| image_save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's image save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +## compare_to_images(v1, v2, image_save_options, author, date_time) {#bytesio_bytesio_imagesaveoptions_str_datetime} + +Compares two documents and saves the differences as images. +Each item in the returned array represents a single page of the output rendered as an image. + + +```python +def compare_to_images(self, v1: io.BytesIO, v2: io.BytesIO, image_save_options: aspose.words.saving.ImageSaveOptions, author: str, date_time: datetime.datetime): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | io.BytesIO | The original document. | +| v2 | io.BytesIO | The modified document. | +| image_save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's image save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | + +## compare_to_images(v1, v2, image_save_options, author, date_time, compare_options) {#bytesio_bytesio_imagesaveoptions_str_datetime_compareoptions} + +Compares two documents and saves the differences as images. +Each item in the returned array represents a single page of the output rendered as an image. + + +```python +def compare_to_images(self, v1: io.BytesIO, v2: io.BytesIO, image_save_options: aspose.words.saving.ImageSaveOptions, author: str, date_time: datetime.datetime, compare_options: aspose.words.comparing.CompareOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| v1 | io.BytesIO | The original document. | +| v2 | io.BytesIO | The modified document. | +| image_save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's image save options. | +| author | str | Initials of the author to use for revisions. | +| date_time | datetime.datetime | The date and time to use for revisions. | +| compare_options | [CompareOptions](../../../aspose.words.comparing/compareoptions/) | Document comparison options. | + +## Examples + +Shows how to compare documents and save results as images. + +```python +# There is a several ways to compare documents: +first_doc = MY_DIR + 'Table column bookmarks.docx' +second_doc = MY_DIR + 'Table column bookmarks.doc' +pages = aw.lowcode.Comparer.compare_to_images(v1=first_doc, v2=second_doc, image_save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), author='Author', date_time=datetime.datetime(1, 1, 1)) +with system_helper.io.FileStream(first_doc, system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(second_doc, system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + compare_options = aw.comparing.CompareOptions() + compare_options.ignore_case_changes = True + pages = aw.lowcode.Comparer.compare_to_images(v1=first_stream_in, v2=second_stream_in, image_save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), author='Author', date_time=datetime.datetime(1, 1, 1), compare_options=compare_options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Comparer](../) + diff --git a/english/python-net/aspose.words.lowcode/comparer/create/_index.md b/english/python-net/aspose.words.lowcode/comparer/create/_index.md new file mode 100644 index 00000000000..9906c14eeb1 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparer/create/_index.md @@ -0,0 +1,69 @@ +--- +title: Comparer.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Comparer.create method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/comparer/create/ +--- + +## create() {#default} + +Creates new instance of the converter processor. + + +```python +def create(self): + ... +``` + +## create(context) {#comparercontext} + +Creates new instance of the comparer processor. + + +```python +def create(self, context: aspose.words.lowcode.ComparerContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [ComparerContext](../../comparercontext/) | | + +## Examples + +Shows how to simple compare documents using context. + +```python +# There is a several ways to compare documents: +first_doc = MY_DIR + 'Table column bookmarks.docx' +second_doc = MY_DIR + 'Table column bookmarks.doc' +comparer_context = aw.lowcode.ComparerContext() +comparer_context.compare_options.ignore_case_changes = True +comparer_context.author = 'Author' +comparer_context.date_time = datetime.datetime(1, 1, 1) +aw.lowcode.Comparer.create(comparer_context).from_file(input=first_doc).from_file(input=second_doc).to_file(output=ARTIFACTS_DIR + 'LowCode.CompareContextDocuments.docx').execute() +``` + +Shows how to compare documents from the stream using context. + +```python +# There is a several ways to compare documents from the stream: +with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + comparer_context = aw.lowcode.ComparerContext() + comparer_context.compare_options.ignore_case_changes = True + comparer_context.author = 'Author' + comparer_context.date_time = datetime.datetime(1, 1, 1) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.CompareContextStreamDocuments.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Comparer.create(comparer_context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Comparer](../) + diff --git a/english/python-net/aspose.words.lowcode/comparercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/comparercontext/__init__/_index.md new file mode 100644 index 00000000000..1b232fd00ba --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: ComparerContext constructor +linktitle: ComparerContext constructor +articleTitle: ComparerContext constructor +second_title: Aspose.Words for Python +description: "ComparerContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/comparercontext/__init__/ +--- + +## ComparerContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ComparerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/comparercontext/_index.md b/english/python-net/aspose.words.lowcode/comparercontext/_index.md new file mode 100644 index 00000000000..09768d343d2 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparercontext/_index.md @@ -0,0 +1,69 @@ +--- +title: ComparerContext class +linktitle: ComparerContext class +articleTitle: ComparerContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ComparerContext class. Document comparer context" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/comparercontext/ +--- + +## ComparerContext class + +Document comparer context + + +**Inheritance:** [ComparerContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [ComparerContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [accept_revisions](./accept_revisions/) | Indicates whether to accept revisions in the documents before comparing them. If the compared documents contain revisions and this flag is set to false, the processor will reject revisions. Default is ``True``. | +| [author](./author/) | The author to be assigned to revisions created during document comparison. | +| [compare_options](./compare_options/) | Options used upon comparing documents. | +| [date_time](./date_time/) | The date and time assigned to revisions created during document comparison. | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Examples + +Shows how to simple compare documents using context. + +```python +# There is a several ways to compare documents: +first_doc = MY_DIR + 'Table column bookmarks.docx' +second_doc = MY_DIR + 'Table column bookmarks.doc' +comparer_context = aw.lowcode.ComparerContext() +comparer_context.compare_options.ignore_case_changes = True +comparer_context.author = 'Author' +comparer_context.date_time = datetime.datetime(1, 1, 1) +aw.lowcode.Comparer.create(comparer_context).from_file(input=first_doc).from_file(input=second_doc).to_file(output=ARTIFACTS_DIR + 'LowCode.CompareContextDocuments.docx').execute() +``` + +Shows how to compare documents from the stream using context. + +```python +# There is a several ways to compare documents from the stream: +with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + comparer_context = aw.lowcode.ComparerContext() + comparer_context.compare_options.ignore_case_changes = True + comparer_context.author = 'Author' + comparer_context.date_time = datetime.datetime(1, 1, 1) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.CompareContextStreamDocuments.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Comparer.create(comparer_context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/comparercontext/accept_revisions/_index.md b/english/python-net/aspose.words.lowcode/comparercontext/accept_revisions/_index.md new file mode 100644 index 00000000000..b91518c6f42 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparercontext/accept_revisions/_index.md @@ -0,0 +1,35 @@ +--- +title: ComparerContext.accept_revisions property +linktitle: accept_revisions property +articleTitle: accept_revisions property +second_title: Aspose.Words for Python +description: "ComparerContext.accept_revisions property. Indicates whether to accept revisions in the documents before comparing them" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/comparercontext/accept_revisions/ +--- + +## ComparerContext.accept_revisions property + +Indicates whether to accept revisions in the documents before comparing them. +If the compared documents contain revisions and this flag is set to false, the processor will reject revisions. +Default is ``True``. + + + +```python +@property +def accept_revisions(self) -> bool: + ... + +@accept_revisions.setter +def accept_revisions(self, value: bool): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ComparerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/comparercontext/author/_index.md b/english/python-net/aspose.words.lowcode/comparercontext/author/_index.md new file mode 100644 index 00000000000..3abc7fcf161 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparercontext/author/_index.md @@ -0,0 +1,32 @@ +--- +title: ComparerContext.author property +linktitle: author property +articleTitle: author property +second_title: Aspose.Words for Python +description: "ComparerContext.author property. The author to be assigned to revisions created during document comparison." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/comparercontext/author/ +--- + +## ComparerContext.author property + +The author to be assigned to revisions created during document comparison. + + +```python +@property +def author(self) -> str: + ... + +@author.setter +def author(self, value: str): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ComparerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/comparercontext/compare_options/_index.md b/english/python-net/aspose.words.lowcode/comparercontext/compare_options/_index.md new file mode 100644 index 00000000000..921f8926f97 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparercontext/compare_options/_index.md @@ -0,0 +1,57 @@ +--- +title: ComparerContext.compare_options property +linktitle: compare_options property +articleTitle: compare_options property +second_title: Aspose.Words for Python +description: "ComparerContext.compare_options property. Options used upon comparing documents." +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/comparercontext/compare_options/ +--- + +## ComparerContext.compare_options property + +Options used upon comparing documents. + + +```python +@property +def compare_options(self) -> aspose.words.comparing.CompareOptions: + ... + +``` + +### Examples + +Shows how to simple compare documents using context. + +```python +# There is a several ways to compare documents: +first_doc = MY_DIR + 'Table column bookmarks.docx' +second_doc = MY_DIR + 'Table column bookmarks.doc' +comparer_context = aw.lowcode.ComparerContext() +comparer_context.compare_options.ignore_case_changes = True +comparer_context.author = 'Author' +comparer_context.date_time = datetime.datetime(1, 1, 1) +aw.lowcode.Comparer.create(comparer_context).from_file(input=first_doc).from_file(input=second_doc).to_file(output=ARTIFACTS_DIR + 'LowCode.CompareContextDocuments.docx').execute() +``` + +Shows how to compare documents from the stream using context. + +```python +# There is a several ways to compare documents from the stream: +with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Table column bookmarks.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + comparer_context = aw.lowcode.ComparerContext() + comparer_context.compare_options.ignore_case_changes = True + comparer_context.author = 'Author' + comparer_context.date_time = datetime.datetime(1, 1, 1) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.CompareContextStreamDocuments.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Comparer.create(comparer_context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ComparerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/comparercontext/date_time/_index.md b/english/python-net/aspose.words.lowcode/comparercontext/date_time/_index.md new file mode 100644 index 00000000000..54cea8ce1be --- /dev/null +++ b/english/python-net/aspose.words.lowcode/comparercontext/date_time/_index.md @@ -0,0 +1,32 @@ +--- +title: ComparerContext.date_time property +linktitle: date_time property +articleTitle: date_time property +second_title: Aspose.Words for Python +description: "ComparerContext.date_time property. The date and time assigned to revisions created during document comparison." +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/comparercontext/date_time/ +--- + +## ComparerContext.date_time property + +The date and time assigned to revisions created during document comparison. + + +```python +@property +def date_time(self) -> datetime.datetime: + ... + +@date_time.setter +def date_time(self, value: datetime.datetime): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ComparerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/converter/_index.md b/english/python-net/aspose.words.lowcode/converter/_index.md new file mode 100644 index 00000000000..309ff124993 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/converter/_index.md @@ -0,0 +1,77 @@ +--- +title: Converter class +linktitle: Converter class +articleTitle: Converter class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Converter class. Represents a group of methods intended to convert a variety of different types of documents using a single line of code." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/converter/ +--- + +## Converter class + +Represents a group of methods intended to convert a variety of different types of documents using a single line of code. + + +### Remarks + +The specified input and output files or streams, along with the desired save format, +are used to convert the given input document of the one format into the output document +of the other specified format. + +The convert functionality supports over 35+ different file formats. + +The [Converter.convert_to_images()](./convert_to_images/#str_saveformat) group of methods are designed to transform documents into images, +with each page being converted into a separate image file. These methods also convert PDF documents directly to fixed-page formats +without loading them into the document model, which enhances both performance and accuracy. + +With [ImageSaveOptions.page_set](../../aspose.words.saving/imagesaveoptions/page_set/), you can specify a particular set of pages to convert into images. + + + + +**Inheritance:** [Converter](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ convert(input_file, output_file)](./convert/#str_str) | Converts the given input document into the output document using specified input output file names and its extensions. | +|[ convert(input_file, output_file, save_format)](./convert/#str_str_saveformat) | Converts the given input document into the output document using specified input output file names and the final document format. | +|[ convert(input_file, output_file, save_options)](./convert/#str_str_saveoptions) | Converts the given input document into the output document using specified input output file names and save options. | +|[ convert(input_file, load_options, output_file, save_options)](./convert/#str_loadoptions_str_saveoptions) | Converts the given input document into the output document using specified input output file names its load/save options. | +|[ convert(input_stream, output_stream, save_format)](./convert/#bytesio_bytesio_saveformat) | Converts the given input document into a single output document using specified input and output streams. | +|[ convert(input_stream, output_stream, save_options)](./convert/#bytesio_bytesio_saveoptions) | Converts the given input document into a single output document using specified input and output streams. | +|[ convert(input_stream, load_options, output_stream, save_options)](./convert/#bytesio_loadoptions_bytesio_saveoptions) | Converts the given input document into a single output document using specified input and output streams. | +|[ convert_to_images(input_file, output_file)](./convert_to_images/#str_str) | Converts the pages of the specified input file to image files. | +|[ convert_to_images(input_file, output_file, save_format)](./convert_to_images/#str_str_saveformat) | Converts the pages of the specified input file to image files in the specified format. | +|[ convert_to_images(input_file, output_file, save_options)](./convert_to_images/#str_str_imagesaveoptions) | Converts the pages of the specified input file to image files using the specified save options. | +|[ convert_to_images(input_file, load_options, output_file, save_options)](./convert_to_images/#str_loadoptions_str_imagesaveoptions) | Converts the pages of the specified input file to image files using the provided load and save options. | +|[ convert_to_images(input_file, save_format)](./convert_to_images/#str_saveformat) | Converts the pages of the specified input file to images in the specified format and returns an array of streams containing the images. | +|[ convert_to_images(input_file, save_options)](./convert_to_images/#str_imagesaveoptions) | Converts the pages of the specified input file to images using the specified save options and returns an array of streams containing the images. | +|[ convert_to_images(input_stream, save_format)](./convert_to_images/#bytesio_saveformat) | Converts the pages of the specified input stream to images in the specified format and returns an array of streams containing the images. | +|[ convert_to_images(input_stream, save_options)](./convert_to_images/#bytesio_imagesaveoptions) | Converts the pages of the specified input stream to images using the specified save options and returns an array of streams containing the images. | +|[ convert_to_images(input_stream, load_options, save_options)](./convert_to_images/#bytesio_loadoptions_imagesaveoptions) | Converts the pages of the specified input stream to images using the provided load and save options, and returns an array of streams containing the images. | +|[ convert_to_images(doc, save_format)](./convert_to_images/#document_saveformat) | Converts the pages of the specified document to images in the specified format and returns an array of streams containing the images. | +|[ convert_to_images(doc, save_options)](./convert_to_images/#document_imagesaveoptions) | Converts the pages of the specified document to images using the specified save options and returns an array of streams containing the images. | +|[ create()](./create/#default) | Creates new instance of the converter processor. | +|[ create(context)](./create/#convertercontext) | Creates new instance of the converter processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/converter/convert/_index.md b/english/python-net/aspose.words.lowcode/converter/convert/_index.md new file mode 100644 index 00000000000..802540e0cb5 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/converter/convert/_index.md @@ -0,0 +1,224 @@ +--- +title: Converter.convert method +linktitle: convert method +articleTitle: convert method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Converter.convert method" +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/converter/convert/ +--- + +## convert(input_file, output_file) {#str_str} + +Converts the given input document into the output document using specified input output file names and its extensions. + + +```python +def convert(self, input_file: str, output_file: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| output_file | str | The output file name. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## convert(input_file, output_file, save_format) {#str_str_saveformat} + +Converts the given input document into the output document using specified input output file names and the final document format. + + +```python +def convert(self, input_file: str, output_file: str, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| output_file | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## convert(input_file, output_file, save_options) {#str_str_saveoptions} + +Converts the given input document into the output document using specified input output file names and save options. + + +```python +def convert(self, input_file: str, output_file: str, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| output_file | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## convert(input_file, load_options, output_file, save_options) {#str_loadoptions_str_saveoptions} + +Converts the given input document into the output document using specified input output file names its load/save options. + + +```python +def convert(self, input_file: str, load_options: aspose.words.loading.LoadOptions, output_file: str, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| load_options | [LoadOptions](../../../aspose.words.loading/loadoptions/) | The input document load options. | +| output_file | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## convert(input_stream, output_stream, save_format) {#bytesio_bytesio_saveformat} + +Converts the given input document into a single output document using specified input and output streams. + + +```python +def convert(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## convert(input_stream, output_stream, save_options) {#bytesio_bytesio_saveoptions} + +Converts the given input document into a single output document using specified input and output streams. + + +```python +def convert(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input streams. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## convert(input_stream, load_options, output_stream, save_options) {#bytesio_loadoptions_bytesio_saveoptions} + +Converts the given input document into a single output document using specified input and output streams. + + +```python +def convert(self, input_stream: io.BytesIO, load_options: aspose.words.loading.LoadOptions, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input streams. | +| load_options | [LoadOptions](../../../aspose.words.loading/loadoptions/) | The input document load options. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## Examples + +Shows how to convert documents with a single line of code. + +```python +doc = MY_DIR + 'Document.docx' +aw.lowcode.Converter.convert(input_file=doc, output_file=ARTIFACTS_DIR + 'LowCode.Convert.pdf') +aw.lowcode.Converter.convert(input_file=doc, output_file=ARTIFACTS_DIR + 'LowCode.Convert.SaveFormat.rtf', save_format=aw.SaveFormat.RTF) +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.convert(input_file=doc, load_options=load_options, output_file=ARTIFACTS_DIR + 'LowCode.Convert.LoadOptions.docx', save_options=save_options) +aw.lowcode.Converter.convert(input_file=doc, output_file=ARTIFACTS_DIR + 'LowCode.Convert.SaveOptions.docx', save_options=save_options) +``` + +Shows how to convert documents with a single line of code (Stream). + +```python +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ConvertStream.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Converter.convert(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX) + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + load_options = aw.loading.LoadOptions() + load_options.ignore_ole_data = True + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ConvertStream.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Converter.convert(input_stream=stream_in, load_options=load_options, output_stream=stream_out, save_options=save_options) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ConvertStream.3.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Converter.convert(input_stream=stream_in, output_stream=stream_out, save_options=save_options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Converter](../) + diff --git a/english/python-net/aspose.words.lowcode/converter/convert_to_images/_index.md b/english/python-net/aspose.words.lowcode/converter/convert_to_images/_index.md new file mode 100644 index 00000000000..faf13804751 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/converter/convert_to_images/_index.md @@ -0,0 +1,262 @@ +--- +title: Converter.convert_to_images method +linktitle: convert_to_images method +articleTitle: convert_to_images method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Converter.convert_to_images method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/converter/convert_to_images/ +--- + +## convert_to_images(input_file, output_file) {#str_str} + +Converts the pages of the specified input file to image files. + + +```python +def convert_to_images(self, input_file: str, output_file: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| output_file | str | The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension" | + +## convert_to_images(input_file, output_file, save_format) {#str_str_saveformat} + +Converts the pages of the specified input file to image files in the specified format. + + +```python +def convert_to_images(self, input_file: str, output_file: str, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| output_file | str | The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension" | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | Save format. Only image save formats are allowed. | + +## convert_to_images(input_file, output_file, save_options) {#str_str_imagesaveoptions} + +Converts the pages of the specified input file to image files using the specified save options. + + +```python +def convert_to_images(self, input_file: str, output_file: str, save_options: aspose.words.saving.ImageSaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| output_file | str | The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension" | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | Image save options. | + +## convert_to_images(input_file, load_options, output_file, save_options) {#str_loadoptions_str_imagesaveoptions} + +Converts the pages of the specified input file to image files using the provided load and save options. + + +```python +def convert_to_images(self, input_file: str, load_options: aspose.words.loading.LoadOptions, output_file: str, save_options: aspose.words.saving.ImageSaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| load_options | [LoadOptions](../../../aspose.words.loading/loadoptions/) | The input document load options. | +| output_file | str | The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension" | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | Image save options. | + +## convert_to_images(input_file, save_format) {#str_saveformat} + +Converts the pages of the specified input file to images in the specified format and returns an array of streams containing the images. + + +```python +def convert_to_images(self, input_file: str, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | Save format. Only image save formats are allowed. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## convert_to_images(input_file, save_options) {#str_imagesaveoptions} + +Converts the pages of the specified input file to images using the specified save options and returns an array of streams containing the images. + + +```python +def convert_to_images(self, input_file: str, save_options: aspose.words.saving.ImageSaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | Image save options. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## convert_to_images(input_stream, save_format) {#bytesio_saveformat} + +Converts the pages of the specified input stream to images in the specified format and returns an array of streams containing the images. + + +```python +def convert_to_images(self, input_stream: io.BytesIO, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | Save format. Only image save formats are allowed. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## convert_to_images(input_stream, save_options) {#bytesio_imagesaveoptions} + +Converts the pages of the specified input stream to images using the specified save options and returns an array of streams containing the images. + + +```python +def convert_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | Image save options. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## convert_to_images(input_stream, load_options, save_options) {#bytesio_loadoptions_imagesaveoptions} + +Converts the pages of the specified input stream to images using the provided load and save options, and returns an array of streams containing the images. + + +```python +def convert_to_images(self, input_stream: io.BytesIO, load_options: aspose.words.loading.LoadOptions, save_options: aspose.words.saving.ImageSaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| load_options | [LoadOptions](../../../aspose.words.loading/loadoptions/) | The input document load options. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | Image save options. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## convert_to_images(doc, save_format) {#document_saveformat} + +Converts the pages of the specified document to images in the specified format and returns an array of streams containing the images. + + +```python +def convert_to_images(self, doc: aspose.words.Document, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| doc | [Document](../../../aspose.words/document/) | The input document. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | Save format. Only image save formats are allowed. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## convert_to_images(doc, save_options) {#document_imagesaveoptions} + +Converts the pages of the specified document to images using the specified save options and returns an array of streams containing the images. + + +```python +def convert_to_images(self, doc: aspose.words.Document, save_options: aspose.words.saving.ImageSaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| doc | [Document](../../../aspose.words/document/) | The input document. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | Image save options. | + +### Returns + +Returns array of image streams. The streams should be disposed by the end user. + + +## Examples + +Shows how to convert document to images. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.convert(input_file=doc, output_file=ARTIFACTS_DIR + 'LowCode.ConvertToImages.1.png') +aw.lowcode.Converter.convert(input_file=doc, output_file=ARTIFACTS_DIR + 'LowCode.ConvertToImages.2.jpeg', save_format=aw.SaveFormat.JPEG) +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = False +image_save_options = aw.saving.ImageSaveOptions(aw.SaveFormat.PNG) +image_save_options.page_set = aw.saving.PageSet(page=1) +aw.lowcode.Converter.convert(input_file=doc, load_options=load_options, output_file=ARTIFACTS_DIR + 'LowCode.ConvertToImages.3.png', save_options=image_save_options) +aw.lowcode.Converter.convert(input_file=doc, output_file=ARTIFACTS_DIR + 'LowCode.ConvertToImages.4.png', save_options=image_save_options) +``` + +Shows how to convert document to images stream. + +```python +doc = MY_DIR + 'Big document.docx' +streams = aw.lowcode.Converter.convert_to_images(input_file=doc, save_format=aw.SaveFormat.PNG) +image_save_options = aw.saving.ImageSaveOptions(aw.SaveFormat.PNG) +image_save_options.page_set = aw.saving.PageSet(page=1) +streams = aw.lowcode.Converter.convert_to_images(input_file=doc, save_options=image_save_options) +streams = aw.lowcode.Converter.convert_to_images(doc=aw.Document(file_name=doc), save_format=aw.SaveFormat.PNG) +streams = aw.lowcode.Converter.convert_to_images(doc=aw.Document(file_name=doc), save_options=image_save_options) +``` + +Shows how to convert document to images from stream. + +```python +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + streams = aw.lowcode.Converter.convert_to_images(input_stream=stream_in, save_format=aw.SaveFormat.JPEG) + image_save_options = aw.saving.ImageSaveOptions(aw.SaveFormat.PNG) + image_save_options.page_set = aw.saving.PageSet(page=1) + streams = aw.lowcode.Converter.convert_to_images(input_stream=stream_in, save_options=image_save_options) + load_options = aw.loading.LoadOptions() + load_options.ignore_ole_data = False + aw.lowcode.Converter.convert_to_images(input_stream=stream_in, load_options=load_options, save_options=image_save_options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Converter](../) + diff --git a/english/python-net/aspose.words.lowcode/converter/create/_index.md b/english/python-net/aspose.words.lowcode/converter/create/_index.md new file mode 100644 index 00000000000..bee2d798831 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/converter/create/_index.md @@ -0,0 +1,56 @@ +--- +title: Converter.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Converter.create method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/converter/create/ +--- + +## create() {#default} + +Creates new instance of the converter processor. + + +```python +def create(self): + ... +``` + +## create(context) {#convertercontext} + +Creates new instance of the converter processor. + + +```python +def create(self, context: aspose.words.lowcode.ConverterContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [ConverterContext](../../convertercontext/) | | + +## Examples + +Shows how to convert documents with a single line of code using context. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.1.pdf').execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.2.pdf', save_format=aw.SaveFormat.RTF).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc, load_options=load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.3.docx', save_options=save_options).execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.4.png', save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG)).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Converter](../) + diff --git a/english/python-net/aspose.words.lowcode/convertercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/convertercontext/__init__/_index.md new file mode 100644 index 00000000000..33652499094 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/convertercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: ConverterContext constructor +linktitle: ConverterContext constructor +articleTitle: ConverterContext constructor +second_title: Aspose.Words for Python +description: "ConverterContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/convertercontext/__init__/ +--- + +## ConverterContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ConverterContext](../) + diff --git a/english/python-net/aspose.words.lowcode/convertercontext/_index.md b/english/python-net/aspose.words.lowcode/convertercontext/_index.md new file mode 100644 index 00000000000..4972755a8d6 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/convertercontext/_index.md @@ -0,0 +1,52 @@ +--- +title: ConverterContext class +linktitle: ConverterContext class +articleTitle: ConverterContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ConverterContext class. Document converter context" +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/convertercontext/ +--- + +## ConverterContext class + +Document converter context + + +**Inheritance:** [ConverterContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [ConverterContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Examples + +Shows how to convert documents with a single line of code using context. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.1.pdf').execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.2.pdf', save_format=aw.SaveFormat.RTF).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc, load_options=load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.3.docx', save_options=save_options).execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.4.png', save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG)).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/mailmergedatasource/_index.md b/english/python-net/aspose.words.lowcode/mailmergedatasource/_index.md new file mode 100644 index 00000000000..c138d19efa7 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergedatasource/_index.md @@ -0,0 +1,27 @@ +--- +title: MailMergeDataSource class +linktitle: MailMergeDataSource class +articleTitle: MailMergeDataSource class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MailMergeDataSource class. Mail merge data source used for using in [MailMergerContext](../mailmergercontext/)." +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/mailmergedatasource/ +--- + +## MailMergeDataSource class + +Mail merge data source used for using in [MailMergerContext](../mailmergercontext/). + + + +### Methods + +| Name | Description | +| --- | --- | +|[ create(field_names, field_values)](./create/#strlist_objectlist) | Creates Mail Merge Data Source from field names and values arrays. | + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergedatasource/create/_index.md b/english/python-net/aspose.words.lowcode/mailmergedatasource/create/_index.md new file mode 100644 index 00000000000..e0c9f451f5e --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergedatasource/create/_index.md @@ -0,0 +1,31 @@ +--- +title: MailMergeDataSource.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "MailMergeDataSource.create method. Creates Mail Merge Data Source from field names and values arrays." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/mailmergedatasource/create/ +--- + +## create(field_names, field_values) {#strlist_objectlist} + +Creates Mail Merge Data Source from field names and values arrays. + + +```python +def create(self, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| field_names | List[str] | | +| field_values | List[object] | | + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeDataSource](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/__init__/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/__init__/_index.md new file mode 100644 index 00000000000..8a348e3f3ae --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: MailMergeOptions constructor +linktitle: MailMergeOptions constructor +articleTitle: MailMergeOptions constructor +second_title: Aspose.Words for Python +description: "MailMergeOptions constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/mailmergeoptions/__init__/ +--- + +## MailMergeOptions() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/_index.md new file mode 100644 index 00000000000..07a51f1b998 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/_index.md @@ -0,0 +1,59 @@ +--- +title: MailMergeOptions class +linktitle: MailMergeOptions class +articleTitle: MailMergeOptions class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MailMergeOptions class. Represents options for the mail merge functionality." +type: docs +weight: 60 +url: /python-net/aspose.words.lowcode/mailmergeoptions/ +--- + +## MailMergeOptions class + +Represents options for the mail merge functionality. + + +### Constructors +| Name | Description | +| --- | --- | +| [MailMergeOptions()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [cleanup_options](./cleanup_options/) | Gets or sets a set of flags that specify what items should be removed during mail merge. | +| [cleanup_paragraphs_with_punctuation_marks](./cleanup_paragraphs_with_punctuation_marks/) | Gets or sets a value indicating whether paragraphs with punctuation marks are considered as empty and should be removed if the [MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS](../../aspose.words.mailmerging/mailmergecleanupoptions/#REMOVE_EMPTY_PARAGRAPHS) option is specified. | +| [merge_duplicate_regions](./merge_duplicate_regions/) | Gets or sets a value indicating whether all of the document mail merge regions with the name of a data source should be merged while executing of a mail merge with regions against the data source or just the first one. | +| [merge_whole_document](./merge_whole_document/) | Gets or sets a value indicating whether fields in whole document are updated while executing of a mail merge with regions. | +| [preserve_unused_tags](./preserve_unused_tags/) | Gets or sets a value indicating whether the unused "mustache" tags should be preserved. | +| [region_end_tag](./region_end_tag/) | Gets or sets a mail merge region end tag. | +| [region_start_tag](./region_start_tag/) | Gets or sets a mail merge region start tag. | +| [restart_lists_at_each_section](./restart_lists_at_each_section/) | Gets or sets a value indicating whether lists are restarted at each section after executing of a mail merge. | +| [retain_first_section_start](./retain_first_section_start/) | Gets or sets a value indicating whether the section start of the first document section and its copies for subsequent data source rows are retained during mail merge or updated according to MS Word behaviour. | +| [trim_whitespaces](./trim_whitespaces/) | Gets or sets a value indicating whether trailing and leading whitespaces are trimmed from mail merge values. | +| [unconditional_merge_fields_and_regions](./unconditional_merge_fields_and_regions/) | Gets or sets a value indicating whether merge fields and merge regions are merged regardless of the parent IF field's condition. | +| [use_non_merge_fields](./use_non_merge_fields/) | When ``True``, specifies that in addition to MERGEFIELD fields, mail merge is performed into some other types of fields and also into "{{fieldName}}" tags. | +| [use_whole_paragraph_as_region](./use_whole_paragraph_as_region/) | Gets or sets a value indicating whether whole paragraph with **TableStart** or **TableEnd** field or particular range between **TableStart** and **TableEnd** fields should be included into mail merge region. | + +### Examples + +Shows how to do mail merge operation for a single record. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.1.docx', field_names=field_names, field_values=field_values) +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.2.docx', save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values) +mail_merge_options = aw.lowcode.MailMergeOptions() +mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.3.docx', save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values, mail_merge_options=mail_merge_options) +``` + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/cleanup_options/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/cleanup_options/_index.md new file mode 100644 index 00000000000..abe812b8a95 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/cleanup_options/_index.md @@ -0,0 +1,32 @@ +--- +title: MailMergeOptions.cleanup_options property +linktitle: cleanup_options property +articleTitle: cleanup_options property +second_title: Aspose.Words for Python +description: "MailMergeOptions.cleanup_options property. Gets or sets a set of flags that specify what items should be removed during mail merge." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/mailmergeoptions/cleanup_options/ +--- + +## MailMergeOptions.cleanup_options property + +Gets or sets a set of flags that specify what items should be removed during mail merge. + + +```python +@property +def cleanup_options(self) -> aspose.words.mailmerging.MailMergeCleanupOptions: + ... + +@cleanup_options.setter +def cleanup_options(self, value: aspose.words.mailmerging.MailMergeCleanupOptions): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/cleanup_paragraphs_with_punctuation_marks/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/cleanup_paragraphs_with_punctuation_marks/_index.md new file mode 100644 index 00000000000..b55a43fb981 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/cleanup_paragraphs_with_punctuation_marks/_index.md @@ -0,0 +1,61 @@ +--- +title: MailMergeOptions.cleanup_paragraphs_with_punctuation_marks property +linktitle: cleanup_paragraphs_with_punctuation_marks property +articleTitle: cleanup_paragraphs_with_punctuation_marks property +second_title: Aspose.Words for Python +description: "MailMergeOptions.cleanup_paragraphs_with_punctuation_marks property. Gets or sets a value indicating whether paragraphs with punctuation marks are considered as empty and should be removed if the [MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS](../../../aspose.words.mailmerging/mailmergecleanupoptions/#REMOVE_EMPTY_PARAGRAPHS) option is specified." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/mailmergeoptions/cleanup_paragraphs_with_punctuation_marks/ +--- + +## MailMergeOptions.cleanup_paragraphs_with_punctuation_marks property + +Gets or sets a value indicating whether paragraphs with punctuation marks are considered as empty +and should be removed if the [MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS](../../../aspose.words.mailmerging/mailmergecleanupoptions/#REMOVE_EMPTY_PARAGRAPHS) option is specified. + + + +```python +@property +def cleanup_paragraphs_with_punctuation_marks(self) -> bool: + ... + +@cleanup_paragraphs_with_punctuation_marks.setter +def cleanup_paragraphs_with_punctuation_marks(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``True``. + + + +Here is the complete list of cleanable punctuation marks: + +* ! + +* , + +* . + +* : + +* ; + +* ? + +* ¡ + +* ¿ + + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/merge_duplicate_regions/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/merge_duplicate_regions/_index.md new file mode 100644 index 00000000000..2b1fbe1bc0a --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/merge_duplicate_regions/_index.md @@ -0,0 +1,39 @@ +--- +title: MailMergeOptions.merge_duplicate_regions property +linktitle: merge_duplicate_regions property +articleTitle: merge_duplicate_regions property +second_title: Aspose.Words for Python +description: "MailMergeOptions.merge_duplicate_regions property. Gets or sets a value indicating whether all of the document mail merge regions with the name of a data source should be merged while executing of a mail merge with regions against the data source or just the first one." +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/mailmergeoptions/merge_duplicate_regions/ +--- + +## MailMergeOptions.merge_duplicate_regions property + +Gets or sets a value indicating whether all of the document mail merge regions with the name of a data source +should be merged while executing of a mail merge with regions against the data source or just the first one. + + +```python +@property +def merge_duplicate_regions(self) -> bool: + ... + +@merge_duplicate_regions.setter +def merge_duplicate_regions(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``False``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/merge_whole_document/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/merge_whole_document/_index.md new file mode 100644 index 00000000000..d41db8e1340 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/merge_whole_document/_index.md @@ -0,0 +1,38 @@ +--- +title: MailMergeOptions.merge_whole_document property +linktitle: merge_whole_document property +articleTitle: merge_whole_document property +second_title: Aspose.Words for Python +description: "MailMergeOptions.merge_whole_document property. Gets or sets a value indicating whether fields in whole document are updated while executing of a mail merge with regions." +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/mailmergeoptions/merge_whole_document/ +--- + +## MailMergeOptions.merge_whole_document property + +Gets or sets a value indicating whether fields in whole document are updated while executing of a mail merge with regions. + + +```python +@property +def merge_whole_document(self) -> bool: + ... + +@merge_whole_document.setter +def merge_whole_document(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``False``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/preserve_unused_tags/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/preserve_unused_tags/_index.md new file mode 100644 index 00000000000..f7180306d25 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/preserve_unused_tags/_index.md @@ -0,0 +1,39 @@ +--- +title: MailMergeOptions.preserve_unused_tags property +linktitle: preserve_unused_tags property +articleTitle: preserve_unused_tags property +second_title: Aspose.Words for Python +description: "MailMergeOptions.preserve_unused_tags property. Gets or sets a value indicating whether the unused mustache tags should be preserved." +type: docs +weight: 60 +url: /python-net/aspose.words.lowcode/mailmergeoptions/preserve_unused_tags/ +--- + +## MailMergeOptions.preserve_unused_tags property + +Gets or sets a value indicating whether the unused "mustache" tags should be preserved. + + +```python +@property +def preserve_unused_tags(self) -> bool: + ... + +@preserve_unused_tags.setter +def preserve_unused_tags(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``False``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) +* property [MailMergeOptions.use_non_merge_fields](../use_non_merge_fields/) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/region_end_tag/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/region_end_tag/_index.md new file mode 100644 index 00000000000..1e42cd97b17 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/region_end_tag/_index.md @@ -0,0 +1,32 @@ +--- +title: MailMergeOptions.region_end_tag property +linktitle: region_end_tag property +articleTitle: region_end_tag property +second_title: Aspose.Words for Python +description: "MailMergeOptions.region_end_tag property. Gets or sets a mail merge region end tag." +type: docs +weight: 70 +url: /python-net/aspose.words.lowcode/mailmergeoptions/region_end_tag/ +--- + +## MailMergeOptions.region_end_tag property + +Gets or sets a mail merge region end tag. + + +```python +@property +def region_end_tag(self) -> str: + ... + +@region_end_tag.setter +def region_end_tag(self, value: str): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/region_start_tag/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/region_start_tag/_index.md new file mode 100644 index 00000000000..7d5b6066afc --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/region_start_tag/_index.md @@ -0,0 +1,32 @@ +--- +title: MailMergeOptions.region_start_tag property +linktitle: region_start_tag property +articleTitle: region_start_tag property +second_title: Aspose.Words for Python +description: "MailMergeOptions.region_start_tag property. Gets or sets a mail merge region start tag." +type: docs +weight: 80 +url: /python-net/aspose.words.lowcode/mailmergeoptions/region_start_tag/ +--- + +## MailMergeOptions.region_start_tag property + +Gets or sets a mail merge region start tag. + + +```python +@property +def region_start_tag(self) -> str: + ... + +@region_start_tag.setter +def region_start_tag(self, value: str): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/restart_lists_at_each_section/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/restart_lists_at_each_section/_index.md new file mode 100644 index 00000000000..97f1f7acc4c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/restart_lists_at_each_section/_index.md @@ -0,0 +1,38 @@ +--- +title: MailMergeOptions.restart_lists_at_each_section property +linktitle: restart_lists_at_each_section property +articleTitle: restart_lists_at_each_section property +second_title: Aspose.Words for Python +description: "MailMergeOptions.restart_lists_at_each_section property. Gets or sets a value indicating whether lists are restarted at each section after executing of a mail merge." +type: docs +weight: 90 +url: /python-net/aspose.words.lowcode/mailmergeoptions/restart_lists_at_each_section/ +--- + +## MailMergeOptions.restart_lists_at_each_section property + +Gets or sets a value indicating whether lists are restarted at each section after executing of a mail merge. + + +```python +@property +def restart_lists_at_each_section(self) -> bool: + ... + +@restart_lists_at_each_section.setter +def restart_lists_at_each_section(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``True``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/retain_first_section_start/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/retain_first_section_start/_index.md new file mode 100644 index 00000000000..5081771606d --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/retain_first_section_start/_index.md @@ -0,0 +1,39 @@ +--- +title: MailMergeOptions.retain_first_section_start property +linktitle: retain_first_section_start property +articleTitle: retain_first_section_start property +second_title: Aspose.Words for Python +description: "MailMergeOptions.retain_first_section_start property. Gets or sets a value indicating whether the section start of the first document section and its copies for subsequent data source rows are retained during mail merge or updated according to MS Word behaviour." +type: docs +weight: 100 +url: /python-net/aspose.words.lowcode/mailmergeoptions/retain_first_section_start/ +--- + +## MailMergeOptions.retain_first_section_start property + +Gets or sets a value indicating whether the section start of the first document section and its copies for subsequent data source rows +are retained during mail merge or updated according to MS Word behaviour. + + +```python +@property +def retain_first_section_start(self) -> bool: + ... + +@retain_first_section_start.setter +def retain_first_section_start(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``True``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/trim_whitespaces/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/trim_whitespaces/_index.md new file mode 100644 index 00000000000..21f5aada430 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/trim_whitespaces/_index.md @@ -0,0 +1,54 @@ +--- +title: MailMergeOptions.trim_whitespaces property +linktitle: trim_whitespaces property +articleTitle: trim_whitespaces property +second_title: Aspose.Words for Python +description: "MailMergeOptions.trim_whitespaces property. Gets or sets a value indicating whether trailing and leading whitespaces are trimmed from mail merge values." +type: docs +weight: 110 +url: /python-net/aspose.words.lowcode/mailmergeoptions/trim_whitespaces/ +--- + +## MailMergeOptions.trim_whitespaces property + +Gets or sets a value indicating whether trailing and leading whitespaces are trimmed from mail merge values. + + +```python +@property +def trim_whitespaces(self) -> bool: + ... + +@trim_whitespaces.setter +def trim_whitespaces(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``True``. + + + +### Examples + +Shows how to do mail merge operation for a single record. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.1.docx', field_names=field_names, field_values=field_values) +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.2.docx', save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values) +mail_merge_options = aw.lowcode.MailMergeOptions() +mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.3.docx', save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values, mail_merge_options=mail_merge_options) +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/unconditional_merge_fields_and_regions/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/unconditional_merge_fields_and_regions/_index.md new file mode 100644 index 00000000000..e3e4bfd6c37 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/unconditional_merge_fields_and_regions/_index.md @@ -0,0 +1,38 @@ +--- +title: MailMergeOptions.unconditional_merge_fields_and_regions property +linktitle: unconditional_merge_fields_and_regions property +articleTitle: unconditional_merge_fields_and_regions property +second_title: Aspose.Words for Python +description: "MailMergeOptions.unconditional_merge_fields_and_regions property. Gets or sets a value indicating whether merge fields and merge regions are merged regardless of the parent IF field's condition." +type: docs +weight: 120 +url: /python-net/aspose.words.lowcode/mailmergeoptions/unconditional_merge_fields_and_regions/ +--- + +## MailMergeOptions.unconditional_merge_fields_and_regions property + +Gets or sets a value indicating whether merge fields and merge regions are merged regardless of the parent IF field's condition. + + +```python +@property +def unconditional_merge_fields_and_regions(self) -> bool: + ... + +@unconditional_merge_fields_and_regions.setter +def unconditional_merge_fields_and_regions(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``False``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/use_non_merge_fields/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/use_non_merge_fields/_index.md new file mode 100644 index 00000000000..60dab0b478c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/use_non_merge_fields/_index.md @@ -0,0 +1,54 @@ +--- +title: MailMergeOptions.use_non_merge_fields property +linktitle: use_non_merge_fields property +articleTitle: use_non_merge_fields property +second_title: Aspose.Words for Python +description: "MailMergeOptions.use_non_merge_fields property. When ``True``, specifies that in addition to MERGEFIELD fields, mail merge is performed into some other types of fields and also into {{fieldName}} tags." +type: docs +weight: 130 +url: /python-net/aspose.words.lowcode/mailmergeoptions/use_non_merge_fields/ +--- + +## MailMergeOptions.use_non_merge_fields property + +When ``True``, specifies that in addition to MERGEFIELD fields, mail merge is performed into some other types of fields and +also into "{{fieldName}}" tags. + + + +```python +@property +def use_non_merge_fields(self) -> bool: + ... + +@use_non_merge_fields.setter +def use_non_merge_fields(self, value: bool): + ... + +``` + +### Remarks + +Normally, mail merge is only performed into MERGEFIELD fields, but several customers had their reporting +built using other fields and had many documents created this way. To simplify migration (and because this +approach was independently used by several customers) the ability to mail merge into other fields was introduced. + +When [MailMergeOptions.use_non_merge_fields](./) is set to ``True``, Aspose.Words will perform mail merge into the following fields: + +MERGEFIELD FieldName + +MACROBUTTON NOMACRO FieldName + +IF 0 = 0 "{FieldName}" "" + +Also, when [MailMergeOptions.use_non_merge_fields](./) is set to ``True``, Aspose.Words will perform mail merge into text tags +"{{fieldName}}". These are not fields, but just text tags. + + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergeoptions/use_whole_paragraph_as_region/_index.md b/english/python-net/aspose.words.lowcode/mailmergeoptions/use_whole_paragraph_as_region/_index.md new file mode 100644 index 00000000000..b5ba5bfd782 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergeoptions/use_whole_paragraph_as_region/_index.md @@ -0,0 +1,40 @@ +--- +title: MailMergeOptions.use_whole_paragraph_as_region property +linktitle: use_whole_paragraph_as_region property +articleTitle: use_whole_paragraph_as_region property +second_title: Aspose.Words for Python +description: "MailMergeOptions.use_whole_paragraph_as_region property. Gets or sets a value indicating whether whole paragraph with TableStart or TableEnd field or particular range between TableStart and TableEnd fields should be included into mail merge region." +type: docs +weight: 140 +url: /python-net/aspose.words.lowcode/mailmergeoptions/use_whole_paragraph_as_region/ +--- + +## MailMergeOptions.use_whole_paragraph_as_region property + +Gets or sets a value indicating whether whole paragraph with **TableStart** or **TableEnd** field +or particular range between **TableStart** and **TableEnd** fields should be included into mail merge region. + + + +```python +@property +def use_whole_paragraph_as_region(self) -> bool: + ... + +@use_whole_paragraph_as_region.setter +def use_whole_paragraph_as_region(self, value: bool): + ... + +``` + +### Remarks + +The default value is ``True``. + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergeOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmerger/_index.md b/english/python-net/aspose.words.lowcode/mailmerger/_index.md new file mode 100644 index 00000000000..e0d6bbd3b0f --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmerger/_index.md @@ -0,0 +1,54 @@ +--- +title: MailMerger class +linktitle: MailMerger class +articleTitle: MailMerger class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MailMerger class. Provides methods intended to fill template with data using simple mail merge and mail merge with regions operations." +type: docs +weight: 70 +url: /python-net/aspose.words.lowcode/mailmerger/ +--- + +## MailMerger class + +Provides methods intended to fill template with data using simple mail merge and mail merge with regions operations. + + +**Inheritance:** [MailMerger](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ create(context)](./create/#mailmergercontext) | Creates new instance of the mail merger processor. | +|[ execute(input_file_name, output_file_name, field_names, field_values)](./execute/#str_str_strlist_objectlist) | Performs a mail merge operation for a single record. | +|[ execute(input_file_name, output_file_name, save_format, field_names, field_values)](./execute/#str_str_saveformat_strlist_objectlist) | Performs a mail merge operation for a single record. | +|[ execute(input_file_name, output_file_name, save_format, field_names, field_values, mail_merge_options)](./execute/#str_str_saveformat_strlist_objectlist_mailmergeoptions) | Performs a mail merge operation for a single record. | +|[ execute(input_file_name, output_file_name, save_options, field_names, field_values)](./execute/#str_str_saveoptions_strlist_objectlist) | Performs a mail merge operation for a single record. | +|[ execute(input_file_name, output_file_name, save_options, field_names, field_values, mail_merge_options)](./execute/#str_str_saveoptions_strlist_objectlist_mailmergeoptions) | Performs a mail merge operation for a single record. | +|[ execute(input_stream, output_stream, save_format, field_names, field_values)](./execute/#bytesio_bytesio_saveformat_strlist_objectlist) | Performs a mail merge operation for a single record. | +|[ execute(input_stream, output_stream, save_format, field_names, field_values, mail_merge_options)](./execute/#bytesio_bytesio_saveformat_strlist_objectlist_mailmergeoptions) | Performs a mail merge operation for a single record. | +|[ execute(input_stream, output_stream, save_options, field_names, field_values)](./execute/#bytesio_bytesio_saveoptions_strlist_objectlist) | Performs a mail merge operation for a single record. | +|[ execute(input_stream, output_stream, save_options, field_names, field_values, mail_merge_options)](./execute/#bytesio_bytesio_saveoptions_strlist_objectlist_mailmergeoptions) | Performs a mail merge operation for a single record. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ execute_to_images(input_file_name, save_options, field_names, field_values)](./execute_to_images/#str_imagesaveoptions_strlist_objectlist) | Performs a mail merge operation for a single record and renders the result to images. | +|[ execute_to_images(input_file_name, save_options, field_names, field_values, mail_merge_options)](./execute_to_images/#str_imagesaveoptions_strlist_objectlist_mailmergeoptions) | Performs a mail merge operation for a single record and renders the result to images. | +|[ execute_to_images(input_stream, save_options, field_names, field_values)](./execute_to_images/#bytesio_imagesaveoptions_strlist_objectlist) | Performs a mail merge operation for a single record and renders the result to images. | +|[ execute_to_images(input_stream, save_options, field_names, field_values, mail_merge_options)](./execute_to_images/#bytesio_imagesaveoptions_strlist_objectlist_mailmergeoptions) | Performs a mail merge operation for a single record and renders the result to images. | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/mailmerger/create/_index.md b/english/python-net/aspose.words.lowcode/mailmerger/create/_index.md new file mode 100644 index 00000000000..fc44654d015 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmerger/create/_index.md @@ -0,0 +1,59 @@ +--- +title: MailMerger.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "MailMerger.create method. Creates new instance of the mail merger processor." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/mailmerger/create/ +--- + +## create(context) {#mailmergercontext} + +Creates new instance of the mail merger processor. + + +```python +def create(self, context: aspose.words.lowcode.MailMergerContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [MailMergerContext](../../mailmergercontext/) | | + +### Examples + +Shows how to do mail merge operation for a single record using context. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +mail_merger_context = aw.lowcode.MailMergerContext() +mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) +mail_merger_context.mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.create(mail_merger_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.MailMergeContext.docx').execute() +``` + +Shows how to do mail merge operation for a single record from the stream using context. + +```python +# There is a several ways to do mail merge operation using documents from the stream: +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +with system_helper.io.FileStream(MY_DIR + 'Mail merge.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + mail_merger_context = aw.lowcode.MailMergerContext() + mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) + mail_merger_context.mail_merge_options.trim_whitespaces = True + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MailMergeContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.MailMerger.create(mail_merger_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMerger](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmerger/execute/_index.md b/english/python-net/aspose.words.lowcode/mailmerger/execute/_index.md new file mode 100644 index 00000000000..48b46702827 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmerger/execute/_index.md @@ -0,0 +1,303 @@ +--- +title: MailMerger.execute method +linktitle: execute method +articleTitle: execute method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MailMerger.execute method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/mailmerger/execute/ +--- + +## execute(input_file_name, output_file_name, field_names, field_values) {#str_str_strlist_objectlist} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_file_name: str, output_file_name: str, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## execute(input_file_name, output_file_name, save_format, field_names, field_values) {#str_str_saveformat_strlist_objectlist} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## execute(input_file_name, output_file_name, save_format, field_names, field_values, mail_merge_options) {#str_str_saveformat_strlist_objectlist_mailmergeoptions} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, field_names: List[str], field_values: List[object], mail_merge_options: aspose.words.lowcode.MailMergeOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | +| mail_merge_options | [MailMergeOptions](../../mailmergeoptions/) | Mail merge options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## execute(input_file_name, output_file_name, save_options, field_names, field_values) {#str_str_saveoptions_strlist_objectlist} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## execute(input_file_name, output_file_name, save_options, field_names, field_values, mail_merge_options) {#str_str_saveoptions_strlist_objectlist_mailmergeoptions} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, field_names: List[str], field_values: List[object], mail_merge_options: aspose.words.lowcode.MailMergeOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | +| mail_merge_options | [MailMergeOptions](../../mailmergeoptions/) | Mail merge options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## execute(input_stream, output_stream, save_format, field_names, field_values) {#bytesio_bytesio_saveformat_strlist_objectlist} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## execute(input_stream, output_stream, save_format, field_names, field_values, mail_merge_options) {#bytesio_bytesio_saveformat_strlist_objectlist_mailmergeoptions} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, field_names: List[str], field_values: List[object], mail_merge_options: aspose.words.lowcode.MailMergeOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | +| mail_merge_options | [MailMergeOptions](../../mailmergeoptions/) | Mail merge options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## execute(input_stream, output_stream, save_options, field_names, field_values) {#bytesio_bytesio_saveoptions_strlist_objectlist} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## execute(input_stream, output_stream, save_options, field_names, field_values, mail_merge_options) {#bytesio_bytesio_saveoptions_strlist_objectlist_mailmergeoptions} + +Performs a mail merge operation for a single record. + + +```python +def execute(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, field_names: List[str], field_values: List[object], mail_merge_options: aspose.words.lowcode.MailMergeOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | +| mail_merge_options | [MailMergeOptions](../../mailmergeoptions/) | Mail merge options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## execute() {#default} + +Execute the processor action. + + +```python +def execute(self): + ... +``` + +## Examples + +Shows how to do mail merge operation for a single record. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.1.docx', field_names=field_names, field_values=field_values) +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.2.docx', save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values) +mail_merge_options = aw.lowcode.MailMergeOptions() +mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.execute(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.MailMerge.3.docx', save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values, mail_merge_options=mail_merge_options) +``` + +Shows how to do mail merge operation for a single record from the stream. + +```python +# There is a several ways to do mail merge operation using documents from the stream: +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +with system_helper.io.FileStream(MY_DIR + 'Mail merge.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MailMergeStream.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.MailMerger.execute(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MailMergeStream.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + mail_merge_options = aw.lowcode.MailMergeOptions() + mail_merge_options.trim_whitespaces = True + aw.lowcode.MailMerger.execute(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, field_names=field_names, field_values=field_values, mail_merge_options=mail_merge_options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [MailMerger](../../mailmerger/) + diff --git a/english/python-net/aspose.words.lowcode/mailmerger/execute_to_images/_index.md b/english/python-net/aspose.words.lowcode/mailmerger/execute_to_images/_index.md new file mode 100644 index 00000000000..bb26aa2aa93 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmerger/execute_to_images/_index.md @@ -0,0 +1,114 @@ +--- +title: MailMerger.execute_to_images method +linktitle: execute_to_images method +articleTitle: execute_to_images method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MailMerger.execute_to_images method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/mailmerger/execute_to_images/ +--- + +## execute_to_images(input_file_name, save_options, field_names, field_values) {#str_imagesaveoptions_strlist_objectlist} + +Performs a mail merge operation for a single record and renders the result to images. + + +```python +def execute_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +## execute_to_images(input_file_name, save_options, field_names, field_values, mail_merge_options) {#str_imagesaveoptions_strlist_objectlist_mailmergeoptions} + +Performs a mail merge operation for a single record and renders the result to images. + + +```python +def execute_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, field_names: List[str], field_values: List[object], mail_merge_options: aspose.words.lowcode.MailMergeOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | +| mail_merge_options | [MailMergeOptions](../../mailmergeoptions/) | Mail merge options. | + +## execute_to_images(input_stream, save_options, field_names, field_values) {#bytesio_imagesaveoptions_strlist_objectlist} + +Performs a mail merge operation for a single record and renders the result to images. + + +```python +def execute_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | + +## execute_to_images(input_stream, save_options, field_names, field_values, mail_merge_options) {#bytesio_imagesaveoptions_strlist_objectlist_mailmergeoptions} + +Performs a mail merge operation for a single record and renders the result to images. + + +```python +def execute_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, field_names: List[str], field_values: List[object], mail_merge_options: aspose.words.lowcode.MailMergeOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| field_names | List[str] | Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored. | +| field_values | List[object] | Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames. | +| mail_merge_options | [MailMergeOptions](../../mailmergeoptions/) | Mail merge options. | + +## Examples + +Shows how to do mail merge operation for a single record and save result to images. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +images = aw.lowcode.MailMerger.execute_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), field_names=field_names, field_values=field_values) +mail_merge_options = aw.lowcode.MailMergeOptions() +mail_merge_options.trim_whitespaces = True +images = aw.lowcode.MailMerger.execute_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), field_names=field_names, field_values=field_values, mail_merge_options=mail_merge_options) +``` + +Shows how to do mail merge operation for a single record from the stream and save result to images. + +```python +# There is a several ways to do mail merge operation using documents from the stream: +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +with system_helper.io.FileStream(MY_DIR + 'Mail merge.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + images = aw.lowcode.MailMerger.execute_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), field_names=field_names, field_values=field_values) + mail_merge_options = aw.lowcode.MailMergeOptions() + mail_merge_options.trim_whitespaces = True + images = aw.lowcode.MailMerger.execute_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), field_names=field_names, field_values=field_values, mail_merge_options=mail_merge_options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [MailMerger](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/mailmergercontext/__init__/_index.md new file mode 100644 index 00000000000..7f814d0712c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: MailMergerContext constructor +linktitle: MailMergerContext constructor +articleTitle: MailMergerContext constructor +second_title: Aspose.Words for Python +description: "MailMergerContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/mailmergercontext/__init__/ +--- + +## MailMergerContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergercontext/_index.md b/english/python-net/aspose.words.lowcode/mailmergercontext/_index.md new file mode 100644 index 00000000000..1f7c892e1ac --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergercontext/_index.md @@ -0,0 +1,72 @@ +--- +title: MailMergerContext class +linktitle: MailMergerContext class +articleTitle: MailMergerContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MailMergerContext class. Mail merge context." +type: docs +weight: 80 +url: /python-net/aspose.words.lowcode/mailmergercontext/ +--- + +## MailMergerContext class + +Mail merge context. + + +**Inheritance:** [MailMergerContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [MailMergerContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [mail_merge_options](./mail_merge_options/) | Mail merge options. | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Methods + +| Name | Description | +| --- | --- | +|[ set_simple_data_source(field_names, field_values)](./set_simple_data_source/#strlist_objectlist) | Sets data source used to execute simple mail merge. | + +### Examples + +Shows how to do mail merge operation for a single record using context. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +mail_merger_context = aw.lowcode.MailMergerContext() +mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) +mail_merger_context.mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.create(mail_merger_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.MailMergeContext.docx').execute() +``` + +Shows how to do mail merge operation for a single record from the stream using context. + +```python +# There is a several ways to do mail merge operation using documents from the stream: +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +with system_helper.io.FileStream(MY_DIR + 'Mail merge.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + mail_merger_context = aw.lowcode.MailMergerContext() + mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) + mail_merger_context.mail_merge_options.trim_whitespaces = True + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MailMergeContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.MailMerger.create(mail_merger_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/mailmergercontext/mail_merge_options/_index.md b/english/python-net/aspose.words.lowcode/mailmergercontext/mail_merge_options/_index.md new file mode 100644 index 00000000000..e1aef777afd --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergercontext/mail_merge_options/_index.md @@ -0,0 +1,57 @@ +--- +title: MailMergerContext.mail_merge_options property +linktitle: mail_merge_options property +articleTitle: mail_merge_options property +second_title: Aspose.Words for Python +description: "MailMergerContext.mail_merge_options property. Mail merge options." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/mailmergercontext/mail_merge_options/ +--- + +## MailMergerContext.mail_merge_options property + +Mail merge options. + + +```python +@property +def mail_merge_options(self) -> aspose.words.lowcode.MailMergeOptions: + ... + +``` + +### Examples + +Shows how to do mail merge operation for a single record using context. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +mail_merger_context = aw.lowcode.MailMergerContext() +mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) +mail_merger_context.mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.create(mail_merger_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.MailMergeContext.docx').execute() +``` + +Shows how to do mail merge operation for a single record from the stream using context. + +```python +# There is a several ways to do mail merge operation using documents from the stream: +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +with system_helper.io.FileStream(MY_DIR + 'Mail merge.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + mail_merger_context = aw.lowcode.MailMergerContext() + mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) + mail_merger_context.mail_merge_options.trim_whitespaces = True + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MailMergeContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.MailMerger.create(mail_merger_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/mailmergercontext/set_simple_data_source/_index.md b/english/python-net/aspose.words.lowcode/mailmergercontext/set_simple_data_source/_index.md new file mode 100644 index 00000000000..d48c18ee59b --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mailmergercontext/set_simple_data_source/_index.md @@ -0,0 +1,66 @@ +--- +title: MailMergerContext.set_simple_data_source method +linktitle: set_simple_data_source method +articleTitle: set_simple_data_source method +second_title: Aspose.Words for Python +description: "MailMergerContext.set_simple_data_source method. Sets data source used to execute simple mail merge." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/mailmergercontext/set_simple_data_source/ +--- + +## set_simple_data_source(field_names, field_values) {#strlist_objectlist} + +Sets data source used to execute simple mail merge. + + +```python +def set_simple_data_source(self, field_names: List[str], field_values: List[object]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| field_names | List[str] | | +| field_values | List[object] | | + +### Remarks + +If both simple mail merge data source and data source for mail merge with regions are specified, +mail merge with regions is executed first and then simple mail merge is executed. + + +### Examples + +Shows how to do mail merge operation for a single record using context. + +```python +# There is a several ways to do mail merge operation: +doc = MY_DIR + 'Mail merge.doc' +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +mail_merger_context = aw.lowcode.MailMergerContext() +mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) +mail_merger_context.mail_merge_options.trim_whitespaces = True +aw.lowcode.MailMerger.create(mail_merger_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.MailMergeContext.docx').execute() +``` + +Shows how to do mail merge operation for a single record from the stream using context. + +```python +# There is a several ways to do mail merge operation using documents from the stream: +field_names = ['FirstName', 'Location', 'SpecialCharsInName()'] +field_values = ['James Bond', 'London', 'Classified'] +with system_helper.io.FileStream(MY_DIR + 'Mail merge.doc', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + mail_merger_context = aw.lowcode.MailMergerContext() + mail_merger_context.set_simple_data_source(field_names=field_names, field_values=field_values) + mail_merger_context.mail_merge_options.trim_whitespaces = True + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MailMergeContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.MailMerger.create(mail_merger_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MailMergerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/mergeformatmode/_index.md b/english/python-net/aspose.words.lowcode/mergeformatmode/_index.md new file mode 100644 index 00000000000..84e1ab11672 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mergeformatmode/_index.md @@ -0,0 +1,28 @@ +--- +title: MergeFormatMode enumeration +linktitle: MergeFormatMode enumeration +articleTitle: MergeFormatMode enumeration +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MergeFormatMode enumeration. Specifies how formatting is merged when combining multiple documents." +type: docs +weight: 90 +url: /python-net/aspose.words.lowcode/mergeformatmode/ +--- + +## MergeFormatMode enumeration + +Specifies how formatting is merged when combining multiple documents. + + +### Members + +| Name | Description | +| --- | --- | +| MERGE_FORMATTING | Combine the formatting of the merged documents. | +| KEEP_SOURCE_FORMATTING | Means that the source document will retain its original formatting, such as font styles, sizes, colors, indents, and any other formatting elements applied to its content. | +| KEEP_SOURCE_LAYOUT | Preserve the layout of the original documents in the final document. | + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/merger/_index.md b/english/python-net/aspose.words.lowcode/merger/_index.md new file mode 100644 index 00000000000..c03aeb40bec --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/_index.md @@ -0,0 +1,66 @@ +--- +title: Merger class +linktitle: Merger class +articleTitle: Merger class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Merger class. Represents a group of methods intended to merge a variety of different types of documents into a single output document." +type: docs +weight: 100 +url: /python-net/aspose.words.lowcode/merger/ +--- + +## Merger class + +Represents a group of methods intended to merge a variety of different types of documents into a single output document. + + +### Remarks + +The specified input and output files or streams, along with the desired merge and save options, +are used to merge the given input documents into a single output document. + +The merging functionality supports over 35 different file formats. + + + + +**Inheritance:** [Merger](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ create()](./create/#default) | Creates new instance of the mail merger processor. | +|[ create(context)](./create/#mergercontext) | Creates new instance of the mail merger processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ merge(output_file, input_files)](./merge/#str_strlist) | Merges the given input documents into a single output document using specified input and output file names using [MergeFormatMode.KEEP_SOURCE_FORMATTING](../mergeformatmode/#KEEP_SOURCE_FORMATTING). | +|[ merge(output_file, input_files, save_format, merge_format_mode)](./merge/#str_strlist_saveformat_mergeformatmode) | Merges the given input documents into a single output document using specified input output file names and the final document format. | +|[ merge(output_file, input_files, save_options, merge_format_mode)](./merge/#str_strlist_saveoptions_mergeformatmode) | Merges the given input documents into a single output document using specified input output file names and save options. | +|[ merge(output_file, input_files, load_options, save_options, merge_format_mode)](./merge/#str_strlist_loadoptionslist_saveoptions_mergeformatmode) | Merges the given input documents into a single output document using specified input output file names and save options. | +|[ merge(input_files, merge_format_mode)](./merge/#strlist_mergeformatmode) | Merges the given input documents into a single document and returns [Document](../../aspose.words/document/) instance of the final document. | +|[ merge(input_files, load_options, merge_format_mode)](./merge/#strlist_loadoptionslist_mergeformatmode) | Merges the given input documents into a single document and returns [Document](../../aspose.words/document/) instance of the final document. | +|[ merge_docs(input_documents, merge_format_mode)](./merge_docs/#documentlist_mergeformatmode) | Merges the given input documents into a single document and returns [Document](../../aspose.words/document/) instance of the final document. | +|[ merge_streams(output_stream, input_streams, save_format)](./merge_streams/#bytesio_bytesiolist_saveformat) | Merges the given input documents into a single output document using specified input output streams and the final document format. | +|[ merge_streams(output_stream, input_streams, save_options, merge_format_mode)](./merge_streams/#bytesio_bytesiolist_saveoptions_mergeformatmode) | Merges the given input documents into a single output document using specified input output streams and save options. | +|[ merge_streams(output_stream, input_streams, load_options, save_options, merge_format_mode)](./merge_streams/#bytesio_bytesiolist_loadoptionslist_saveoptions_mergeformatmode) | Merges the given input documents into a single output document using specified input output streams and save options. | +|[ merge_streams(input_streams, merge_format_mode)](./merge_streams/#bytesiolist_mergeformatmode) | Merges the given input documents into a single document and returns [Document](../../aspose.words/document/) instance of the final document. | +|[ merge_streams(input_streams, load_options, merge_format_mode)](./merge_streams/#bytesiolist_loadoptionslist_mergeformatmode) | Merges the given input documents into a single document and returns [Document](../../aspose.words/document/) instance of the final document. | +|[ merge_to_images(input_files, save_options, merge_format_mode)](./merge_to_images/#strlist_imagesaveoptions_mergeformatmode) | Merges the given input documents into a single output document using specified input output file names and save options. Renders the output to images. | +|[ merge_to_images_streams(input_streams, save_options, merge_format_mode)](./merge_to_images_streams/#bytesiolist_imagesaveoptions_mergeformatmode) | Merges the given input document streams into a single output document using specified image save options. Renders the output to images. | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/merger/create/_index.md b/english/python-net/aspose.words.lowcode/merger/create/_index.md new file mode 100644 index 00000000000..211a77d8ab0 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/create/_index.md @@ -0,0 +1,89 @@ +--- +title: Merger.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Merger.create method" +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/merger/create/ +--- + +## create() {#default} + +Creates new instance of the mail merger processor. + + +```python +def create(self): + ... +``` + +## create(context) {#mergercontext} + +Creates new instance of the mail merger processor. + + +```python +def create(self, context: aspose.words.lowcode.MergerContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [MergerContext](../../mergercontext/) | | + +## Examples + +Shows how to merge documents into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +context = aw.lowcode.MergerContext() +context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.1.docx').execute() +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +context2 = aw.lowcode.MergerContext() +context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context2).from_file(input=input_doc1, load_options=first_load_options).from_file(input=input_doc2, load_options=second_load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.2.docx', save_format=aw.SaveFormat.DOCX).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +context3 = aw.lowcode.MergerContext() +context3.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context3).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.3.docx', save_options=save_options).execute() +``` + +Shows how to merge documents from stream into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context = aw.lowcode.MergerContext() + context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_options=save_options).execute() + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context2 = aw.lowcode.MergerContext() + context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context2).from_stream(input=first_stream_in, load_options=first_load_options).from_stream(input=second_stream_in, load_options=second_load_options).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Merger](../) + diff --git a/english/python-net/aspose.words.lowcode/merger/merge/_index.md b/english/python-net/aspose.words.lowcode/merger/merge/_index.md new file mode 100644 index 00000000000..c72d4b49260 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/merge/_index.md @@ -0,0 +1,178 @@ +--- +title: Merger.merge method +linktitle: merge method +articleTitle: merge method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Merger.merge method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/merger/merge/ +--- + +## merge(output_file, input_files) {#str_strlist} + +Merges the given input documents into a single output document using specified input +and output file names using [MergeFormatMode.KEEP_SOURCE_FORMATTING](../../mergeformatmode/#KEEP_SOURCE_FORMATTING). + + + +```python +def merge(self, output_file: str, input_files: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_file | str | The output file name. | +| input_files | List[str] | The input file names. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## merge(output_file, input_files, save_format, merge_format_mode) {#str_strlist_saveformat_mergeformatmode} + +Merges the given input documents into a single output document using specified input output file names and the final document format. + + +```python +def merge(self, output_file: str, input_files: List[str], save_format: aspose.words.SaveFormat, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_file | str | The output file name. | +| input_files | List[str] | The input file names. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## merge(output_file, input_files, save_options, merge_format_mode) {#str_strlist_saveoptions_mergeformatmode} + +Merges the given input documents into a single output document using specified input output file names and save options. + + +```python +def merge(self, output_file: str, input_files: List[str], save_options: aspose.words.saving.SaveOptions, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_file | str | The output file name. | +| input_files | List[str] | The input file names. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## merge(output_file, input_files, load_options, save_options, merge_format_mode) {#str_strlist_loadoptionslist_saveoptions_mergeformatmode} + +Merges the given input documents into a single output document using specified input output file names and save options. + + +```python +def merge(self, output_file: str, input_files: List[str], load_options: List[aspose.words.loading.LoadOptions], save_options: aspose.words.saving.SaveOptions, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_file | str | The output file name. | +| input_files | List[str] | The input file names. | +| load_options | List[[LoadOptions](../../../aspose.words.loading/loadoptions/)] | Load options for the input files. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## merge(input_files, merge_format_mode) {#strlist_mergeformatmode} + +Merges the given input documents into a single document and returns [Document](../../../aspose.words/document/) instance of the final document. + + + +```python +def merge(self, input_files: List[str], merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_files | List[str] | The input file names. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +## merge(input_files, load_options, merge_format_mode) {#strlist_loadoptionslist_mergeformatmode} + +Merges the given input documents into a single document and returns [Document](../../../aspose.words/document/) instance of the final document. + + + +```python +def merge(self, input_files: List[str], load_options: List[aspose.words.loading.LoadOptions], merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_files | List[str] | The input file names. | +| load_options | List[[LoadOptions](../../../aspose.words.loading/loadoptions/)] | Load options for the input files. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +## Examples + +Shows how to merge documents into a single output document. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +aw.lowcode.Merger.merge(output_file=ARTIFACTS_DIR + 'LowCode.MergeDocument.1.docx', input_files=[input_doc1, input_doc2]) +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +aw.lowcode.Merger.merge(output_file=ARTIFACTS_DIR + 'LowCode.MergeDocument.2.docx', input_files=[input_doc1, input_doc2], save_options=save_options, merge_format_mode=aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING) +aw.lowcode.Merger.merge(output_file=ARTIFACTS_DIR + 'LowCode.MergeDocument.3.pdf', input_files=[input_doc1, input_doc2], save_format=aw.SaveFormat.PDF, merge_format_mode=aw.lowcode.MergeFormatMode.KEEP_SOURCE_LAYOUT) +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +aw.lowcode.Merger.merge(output_file=ARTIFACTS_DIR + 'LowCode.MergeDocument.4.docx', input_files=[input_doc1, input_doc2], load_options=[first_load_options, second_load_options], save_options=save_options, merge_format_mode=aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING) +doc = aw.lowcode.Merger.merge(input_files=[input_doc1, input_doc2], merge_format_mode=aw.lowcode.MergeFormatMode.MERGE_FORMATTING) +doc.save(file_name=ARTIFACTS_DIR + 'LowCode.MergeDocument.5.docx') +doc = aw.lowcode.Merger.merge(input_files=[input_doc1, input_doc2], load_options=[first_load_options, second_load_options], merge_format_mode=aw.lowcode.MergeFormatMode.MERGE_FORMATTING) +doc.save(file_name=ARTIFACTS_DIR + 'LowCode.MergeDocument.6.docx') +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Merger](../) + diff --git a/english/python-net/aspose.words.lowcode/merger/merge_docs/_index.md b/english/python-net/aspose.words.lowcode/merger/merge_docs/_index.md new file mode 100644 index 00000000000..13975611b40 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/merge_docs/_index.md @@ -0,0 +1,47 @@ +--- +title: Merger.merge_docs method +linktitle: merge_docs method +articleTitle: merge_docs method +second_title: Aspose.Words for Python +description: "Merger.merge_docs method. Merges the given input documents into a single document and returns [Document](../../../aspose.words/document/) instance of the final document." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/merger/merge_docs/ +--- + +## merge_docs(input_documents, merge_format_mode) {#documentlist_mergeformatmode} + +Merges the given input documents into a single document and returns [Document](../../../aspose.words/document/) instance of the final document. + + + +```python +def merge_docs(self, input_documents: List[aspose.words.Document], merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_documents | List[[Document](../../../aspose.words/document/)] | The input documents. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### Examples + +Shows how to merge input documents to a single document instance. + +```python +first_doc = aw.DocumentBuilder() +first_doc.font.size = 16 +first_doc.font.color = aspose.pydrawing.Color.blue +first_doc.write('Hello first word!') +second_doc = aw.DocumentBuilder() +second_doc.write('Hello second word!') +merged_doc = aw.lowcode.Merger.merge_docs(input_documents=[first_doc.document, second_doc.document], merge_format_mode=aw.lowcode.MergeFormatMode.KEEP_SOURCE_LAYOUT) +self.assertEqual('Hello first word!\x0cHello second word!\x0c', merged_doc.get_text()) +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Merger](../) + diff --git a/english/python-net/aspose.words.lowcode/merger/merge_streams/_index.md b/english/python-net/aspose.words.lowcode/merger/merge_streams/_index.md new file mode 100644 index 00000000000..d54fd839ff8 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/merge_streams/_index.md @@ -0,0 +1,153 @@ +--- +title: Merger.merge_streams method +linktitle: merge_streams method +articleTitle: merge_streams method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Merger.merge_streams method" +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/merger/merge_streams/ +--- + +## merge_streams(output_stream, input_streams, save_format) {#bytesio_bytesiolist_saveformat} + +Merges the given input documents into a single output document using specified input output streams and the final document format. + + +```python +def merge_streams(self, output_stream: io.BytesIO, input_streams: List[io.BytesIO], save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_stream | io.BytesIO | The output stream. | +| input_streams | List[io.BytesIO] | The input streams. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## merge_streams(output_stream, input_streams, save_options, merge_format_mode) {#bytesio_bytesiolist_saveoptions_mergeformatmode} + +Merges the given input documents into a single output document using specified input output streams and save options. + + +```python +def merge_streams(self, output_stream: io.BytesIO, input_streams: List[io.BytesIO], save_options: aspose.words.saving.SaveOptions, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_stream | io.BytesIO | The output stream. | +| input_streams | List[io.BytesIO] | The input streams. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## merge_streams(output_stream, input_streams, load_options, save_options, merge_format_mode) {#bytesio_bytesiolist_loadoptionslist_saveoptions_mergeformatmode} + +Merges the given input documents into a single output document using specified input output streams and save options. + + +```python +def merge_streams(self, output_stream: io.BytesIO, input_streams: List[io.BytesIO], load_options: List[aspose.words.loading.LoadOptions], save_options: aspose.words.saving.SaveOptions, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output_stream | io.BytesIO | The output stream. | +| input_streams | List[io.BytesIO] | The input streams. | +| load_options | List[[LoadOptions](../../../aspose.words.loading/loadoptions/)] | Load options for the input files. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## merge_streams(input_streams, merge_format_mode) {#bytesiolist_mergeformatmode} + +Merges the given input documents into a single document and returns [Document](../../../aspose.words/document/) instance of the final document. + + + +```python +def merge_streams(self, input_streams: List[io.BytesIO], merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_streams | List[io.BytesIO] | The input streams. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +## merge_streams(input_streams, load_options, merge_format_mode) {#bytesiolist_loadoptionslist_mergeformatmode} + +Merges the given input documents into a single document and returns [Document](../../../aspose.words/document/) instance of the final document. + + + +```python +def merge_streams(self, input_streams: List[io.BytesIO], load_options: List[aspose.words.loading.LoadOptions], merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_streams | List[io.BytesIO] | The input streams. | +| load_options | List[[LoadOptions](../../../aspose.words.loading/loadoptions/)] | Load options for the input files. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +## Examples + +Shows how to merge documents from stream into a single output document. + +```python +#There is a several ways to merge documents from stream: +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamDocument.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Merger.merge_streams(output_stream=stream_out, input_streams=[first_stream_in, second_stream_in], save_options=save_options, merge_format_mode=aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamDocument.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Merger.merge_streams(output_stream=stream_out, input_streams=[first_stream_in, second_stream_in], save_format=aw.SaveFormat.DOCX) + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamDocument.3.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Merger.merge_streams(output_stream=stream_out, input_streams=[first_stream_in, second_stream_in], load_options=[first_load_options, second_load_options], save_options=save_options, merge_format_mode=aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING) + first_doc = aw.lowcode.Merger.merge_streams(input_streams=[first_stream_in, second_stream_in], merge_format_mode=aw.lowcode.MergeFormatMode.MERGE_FORMATTING) + first_doc.save(file_name=ARTIFACTS_DIR + 'LowCode.MergeStreamDocument.4.docx') + second_doc = aw.lowcode.Merger.merge_streams(input_streams=[first_stream_in, second_stream_in], load_options=[first_load_options, second_load_options], merge_format_mode=aw.lowcode.MergeFormatMode.MERGE_FORMATTING) + second_doc.save(file_name=ARTIFACTS_DIR + 'LowCode.MergeStreamDocument.5.docx') +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Merger](../) + diff --git a/english/python-net/aspose.words.lowcode/merger/merge_to_images/_index.md b/english/python-net/aspose.words.lowcode/merger/merge_to_images/_index.md new file mode 100644 index 00000000000..870dcc9bf81 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/merge_to_images/_index.md @@ -0,0 +1,33 @@ +--- +title: Merger.merge_to_images method +linktitle: merge_to_images method +articleTitle: merge_to_images method +second_title: Aspose.Words for Python +description: "Merger.merge_to_images method. Merges the given input documents into a single output document using specified input output file names and save options" +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/merger/merge_to_images/ +--- + +## merge_to_images(input_files, save_options, merge_format_mode) {#strlist_imagesaveoptions_mergeformatmode} + +Merges the given input documents into a single output document using specified input output file names and save options. +Renders the output to images. + + +```python +def merge_to_images(self, input_files: List[str], save_options: aspose.words.saving.ImageSaveOptions, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_files | List[str] | The input file names. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Merger](../) + diff --git a/english/python-net/aspose.words.lowcode/merger/merge_to_images_streams/_index.md b/english/python-net/aspose.words.lowcode/merger/merge_to_images_streams/_index.md new file mode 100644 index 00000000000..669aa34b543 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/merger/merge_to_images_streams/_index.md @@ -0,0 +1,33 @@ +--- +title: Merger.merge_to_images_streams method +linktitle: merge_to_images_streams method +articleTitle: merge_to_images_streams method +second_title: Aspose.Words for Python +description: "Merger.merge_to_images_streams method. Merges the given input document streams into a single output document using specified image save options" +type: docs +weight: 60 +url: /python-net/aspose.words.lowcode/merger/merge_to_images_streams/ +--- + +## merge_to_images_streams(input_streams, save_options, merge_format_mode) {#bytesiolist_imagesaveoptions_mergeformatmode} + +Merges the given input document streams into a single output document using specified image save options. +Renders the output to images. + + +```python +def merge_to_images_streams(self, input_streams: List[io.BytesIO], save_options: aspose.words.saving.ImageSaveOptions, merge_format_mode: aspose.words.lowcode.MergeFormatMode): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_streams | List[io.BytesIO] | The input file streams. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| merge_format_mode | [MergeFormatMode](../../mergeformatmode/) | Specifies how to merge formatting that clashes. | + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Merger](../) + diff --git a/english/python-net/aspose.words.lowcode/mergercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/mergercontext/__init__/_index.md new file mode 100644 index 00000000000..70a7d6f1882 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mergercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: MergerContext constructor +linktitle: MergerContext constructor +articleTitle: MergerContext constructor +second_title: Aspose.Words for Python +description: "MergerContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/mergercontext/__init__/ +--- + +## MergerContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MergerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/mergercontext/_index.md b/english/python-net/aspose.words.lowcode/mergercontext/_index.md new file mode 100644 index 00000000000..faccecfe8fa --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mergercontext/_index.md @@ -0,0 +1,86 @@ +--- +title: MergerContext class +linktitle: MergerContext class +articleTitle: MergerContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.MergerContext class. Document merger context." +type: docs +weight: 110 +url: /python-net/aspose.words.lowcode/mergercontext/ +--- + +## MergerContext class + +Document merger context. + + +**Inheritance:** [MergerContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [MergerContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [merge_format_mode](./merge_format_mode/) | Specifies how to merge formatting that clashes. | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Examples + +Shows how to merge documents into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +context = aw.lowcode.MergerContext() +context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.1.docx').execute() +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +context2 = aw.lowcode.MergerContext() +context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context2).from_file(input=input_doc1, load_options=first_load_options).from_file(input=input_doc2, load_options=second_load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.2.docx', save_format=aw.SaveFormat.DOCX).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +context3 = aw.lowcode.MergerContext() +context3.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context3).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.3.docx', save_options=save_options).execute() +``` + +Shows how to merge documents from stream into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context = aw.lowcode.MergerContext() + context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_options=save_options).execute() + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context2 = aw.lowcode.MergerContext() + context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context2).from_stream(input=first_stream_in, load_options=first_load_options).from_stream(input=second_stream_in, load_options=second_load_options).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/mergercontext/merge_format_mode/_index.md b/english/python-net/aspose.words.lowcode/mergercontext/merge_format_mode/_index.md new file mode 100644 index 00000000000..7d159ab75a7 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/mergercontext/merge_format_mode/_index.md @@ -0,0 +1,32 @@ +--- +title: MergerContext.merge_format_mode property +linktitle: merge_format_mode property +articleTitle: merge_format_mode property +second_title: Aspose.Words for Python +description: "MergerContext.merge_format_mode property. Specifies how to merge formatting that clashes." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/mergercontext/merge_format_mode/ +--- + +## MergerContext.merge_format_mode property + +Specifies how to merge formatting that clashes. + + +```python +@property +def merge_format_mode(self) -> aspose.words.lowcode.MergeFormatMode: + ... + +@merge_format_mode.setter +def merge_format_mode(self, value: aspose.words.lowcode.MergeFormatMode): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [MergerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/_index.md b/english/python-net/aspose.words.lowcode/processor/_index.md new file mode 100644 index 00000000000..1794e9a7117 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/_index.md @@ -0,0 +1,100 @@ +--- +title: Processor class +linktitle: Processor class +articleTitle: Processor class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Processor class. Processor class for performing different document processing actions." +type: docs +weight: 120 +url: /python-net/aspose.words.lowcode/processor/ +--- + +## Processor class + +Processor class for performing different document processing actions. + + +### Methods + +| Name | Description | +| --- | --- | +|[ execute()](./execute/#default) | Execute the processor action. | +|[ from_file(input)](./from_file/#str) | Specifies input document for processing. | +|[ from_file(input, load_options)](./from_file/#str_loadoptions) | Specifies input document for processing. | +|[ from_stream(input)](./from_stream/#bytesio) | Specifies input document for processing. | +|[ from_stream(input, load_options)](./from_stream/#bytesio_loadoptions) | Specifies input document for processing. | +|[ to_file(output)](./to_file/#str) | Specifies output file for the processor. | +|[ to_file(output, save_options)](./to_file/#str_saveoptions) | Specifies output file for the processor. | +|[ to_file(output, save_format)](./to_file/#str_saveformat) | Specifies output file for the processor. | +|[ to_stream(output, save_options)](./to_stream/#bytesio_saveoptions) | Specifies output stream for the processor. | +|[ to_stream(output, save_format)](./to_stream/#bytesio_saveformat) | Specifies output stream for the processor. | +|[ to_streams(output, save_options)](./to_streams/#unknown_saveoptions) | | +|[ to_streams(output, save_format)](./to_streams/#unknown_saveformat) | | + +### Examples + +Shows how to merge documents into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +context = aw.lowcode.MergerContext() +context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.1.docx').execute() +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +context2 = aw.lowcode.MergerContext() +context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context2).from_file(input=input_doc1, load_options=first_load_options).from_file(input=input_doc2, load_options=second_load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.2.docx', save_format=aw.SaveFormat.DOCX).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +context3 = aw.lowcode.MergerContext() +context3.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context3).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.3.docx', save_options=save_options).execute() +``` + +Shows how to merge documents from stream into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context = aw.lowcode.MergerContext() + context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_options=save_options).execute() + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context2 = aw.lowcode.MergerContext() + context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context2).from_stream(input=first_stream_in, load_options=first_load_options).from_stream(input=second_stream_in, load_options=second_load_options).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +Shows how to convert documents with a single line of code using context. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.1.pdf').execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.2.pdf', save_format=aw.SaveFormat.RTF).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc, load_options=load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.3.docx', save_options=save_options).execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.4.png', save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG)).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/execute/_index.md b/english/python-net/aspose.words.lowcode/processor/execute/_index.md new file mode 100644 index 00000000000..b53ddd1f9d1 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/execute/_index.md @@ -0,0 +1,89 @@ +--- +title: Processor.execute method +linktitle: execute method +articleTitle: execute method +second_title: Aspose.Words for Python +description: "Processor.execute method. Execute the processor action." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/processor/execute/ +--- + +## execute() {#default} + +Execute the processor action. + + +```python +def execute(self): + ... +``` + +### Examples + +Shows how to merge documents into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +context = aw.lowcode.MergerContext() +context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.1.docx').execute() +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +context2 = aw.lowcode.MergerContext() +context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context2).from_file(input=input_doc1, load_options=first_load_options).from_file(input=input_doc2, load_options=second_load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.2.docx', save_format=aw.SaveFormat.DOCX).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +context3 = aw.lowcode.MergerContext() +context3.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context3).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.3.docx', save_options=save_options).execute() +``` + +Shows how to merge documents from stream into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context = aw.lowcode.MergerContext() + context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_options=save_options).execute() + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context2 = aw.lowcode.MergerContext() + context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context2).from_stream(input=first_stream_in, load_options=first_load_options).from_stream(input=second_stream_in, load_options=second_load_options).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +Shows how to convert documents with a single line of code using context. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.1.pdf').execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.2.pdf', save_format=aw.SaveFormat.RTF).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc, load_options=load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.3.docx', save_options=save_options).execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.4.png', save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG)).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Processor](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/from_file/_index.md b/english/python-net/aspose.words.lowcode/processor/from_file/_index.md new file mode 100644 index 00000000000..1424265a774 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/from_file/_index.md @@ -0,0 +1,110 @@ +--- +title: Processor.from_file method +linktitle: from_file method +articleTitle: from_file method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Processor.from_file method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/processor/from_file/ +--- + +## from_file(input) {#str} + +Specifies input document for processing. + + +```python +def from_file(self, input: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input | str | Input document file name. | + +### Remarks + +If the processor accepts only one file as an input, only the last specified file will be processed. +[Merger](../../merger/) processor accepts multiple files as an input, as the result all the specified documents will be merged. +[Converter](../../converter/) processor accepts only one file as an input, so only the last specified file will be converted. + + + +### Returns + +Returns processor with specified input file. + + +## from_file(input, load_options) {#str_loadoptions} + +Specifies input document for processing. + + +```python +def from_file(self, input: str, load_options: aspose.words.loading.LoadOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input | str | Input document file name. | +| load_options | [LoadOptions](../../../aspose.words.loading/loadoptions/) | Optional load options used to load the document. | + +### Remarks + +If the processor accepts only one file as an input, only the last specified file will be processed. +[Merger](../../merger/) processor accepts multiple files as an input, as the result all the specified documents will be merged. +[Converter](../../converter/) processor accepts only one file as an input, so only the last specified file will be converted. + + + +### Returns + +Returns processor with specified input file. + + +## Examples + +Shows how to merge documents into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +context = aw.lowcode.MergerContext() +context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.1.docx').execute() +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +context2 = aw.lowcode.MergerContext() +context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context2).from_file(input=input_doc1, load_options=first_load_options).from_file(input=input_doc2, load_options=second_load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.2.docx', save_format=aw.SaveFormat.DOCX).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +context3 = aw.lowcode.MergerContext() +context3.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context3).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.3.docx', save_options=save_options).execute() +``` + +Shows how to convert documents with a single line of code using context. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.1.pdf').execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.2.pdf', save_format=aw.SaveFormat.RTF).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc, load_options=load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.3.docx', save_options=save_options).execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.4.png', save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG)).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Processor](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/from_stream/_index.md b/english/python-net/aspose.words.lowcode/processor/from_stream/_index.md new file mode 100644 index 00000000000..797f27cabdc --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/from_stream/_index.md @@ -0,0 +1,97 @@ +--- +title: Processor.from_stream method +linktitle: from_stream method +articleTitle: from_stream method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Processor.from_stream method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/processor/from_stream/ +--- + +## from_stream(input) {#bytesio} + +Specifies input document for processing. + + +```python +def from_stream(self, input: io.BytesIO): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input | io.BytesIO | Input document stream. | + +### Remarks + +If the processor accepts only one file as an input, only the last specified file will be processed. +[Merger](../../merger/) processor accepts multiple files as an input, as the result all the specified documents will be merged. +[Converter](../../converter/) processor accepts only one file as an input, so only the last specified file will be converted. + + + +### Returns + +Returns processor with specified input file stream. + + +## from_stream(input, load_options) {#bytesio_loadoptions} + +Specifies input document for processing. + + +```python +def from_stream(self, input: io.BytesIO, load_options: aspose.words.loading.LoadOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input | io.BytesIO | Input document stream. | +| load_options | [LoadOptions](../../../aspose.words.loading/loadoptions/) | Optional load options used to load the document. | + +### Remarks + +If the processor accepts only one file as an input, only the last specified file will be processed. +[Merger](../../merger/) processor accepts multiple files as an input, as the result all the specified documents will be merged. +[Converter](../../converter/) processor accepts only one file as an input, so only the last specified file will be converted. + + + +### Returns + +Returns processor with specified input file stream. + + +## Examples + +Shows how to merge documents from stream into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context = aw.lowcode.MergerContext() + context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_options=save_options).execute() + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context2 = aw.lowcode.MergerContext() + context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context2).from_stream(input=first_stream_in, load_options=first_load_options).from_stream(input=second_stream_in, load_options=second_load_options).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Processor](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/to_file/_index.md b/english/python-net/aspose.words.lowcode/processor/to_file/_index.md new file mode 100644 index 00000000000..105500dc9c2 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/to_file/_index.md @@ -0,0 +1,132 @@ +--- +title: Processor.to_file method +linktitle: to_file method +articleTitle: to_file method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Processor.to_file method" +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/processor/to_file/ +--- + +## to_file(output) {#str} + +Specifies output file for the processor. + + +```python +def to_file(self, output: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | str | Output file name. | + +### Remarks + +If the output consists of multiple files, the specified output file name is used to generate the file name +for each part following the rule: 'outputFile_partIndex.extension'. + + +### Returns + +Returns processor with specified output file. + + +## to_file(output, save_options) {#str_saveoptions} + +Specifies output file for the processor. + + +```python +def to_file(self, output: str, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | str | Output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | Optional save options. If not specified, save format is determined by the file extension. | + +### Remarks + +If the output consists of multiple files, the specified output file name is used to generate the file name +for each part following the rule: 'outputFile_partIndex.extension'. + + +### Returns + +Returns processor with specified output file. + + +## to_file(output, save_format) {#str_saveformat} + +Specifies output file for the processor. + + +```python +def to_file(self, output: str, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | str | Output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | Save format. If not specified, save format is determined by the file extension. | + +### Remarks + +If the output consists of multiple files, the specified output file name is used to generate the file name +for each part following the rule: 'outputFile_partIndex.extension'. + + +### Returns + +Returns processor with specified output file. + + +## Examples + +Shows how to merge documents into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +context = aw.lowcode.MergerContext() +context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.1.docx').execute() +first_load_options = aw.loading.LoadOptions() +first_load_options.ignore_ole_data = True +second_load_options = aw.loading.LoadOptions() +second_load_options.ignore_ole_data = False +context2 = aw.lowcode.MergerContext() +context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context2).from_file(input=input_doc1, load_options=first_load_options).from_file(input=input_doc2, load_options=second_load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.2.docx', save_format=aw.SaveFormat.DOCX).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +context3 = aw.lowcode.MergerContext() +context3.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING +aw.lowcode.Merger.create(context3).from_file(input=input_doc1).from_file(input=input_doc2).to_file(output=ARTIFACTS_DIR + 'LowCode.MergeContextDocuments.3.docx', save_options=save_options).execute() +``` + +Shows how to convert documents with a single line of code using context. + +```python +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.1.pdf').execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.2.pdf', save_format=aw.SaveFormat.RTF).execute() +save_options = aw.saving.OoxmlSaveOptions() +save_options.password = 'Aspose.Words' +load_options = aw.loading.LoadOptions() +load_options.ignore_ole_data = True +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc, load_options=load_options).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.3.docx', save_options=save_options).execute() +aw.lowcode.Converter.create(aw.lowcode.ConverterContext()).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ConvertContext.4.png', save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG)).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Processor](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/to_stream/_index.md b/english/python-net/aspose.words.lowcode/processor/to_stream/_index.md new file mode 100644 index 00000000000..66d450d1907 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/to_stream/_index.md @@ -0,0 +1,92 @@ +--- +title: Processor.to_stream method +linktitle: to_stream method +articleTitle: to_stream method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Processor.to_stream method" +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/processor/to_stream/ +--- + +## to_stream(output, save_options) {#bytesio_saveoptions} + +Specifies output stream for the processor. + + +```python +def to_stream(self, output: io.BytesIO, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | io.BytesIO | Output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | Save options. | + +### Remarks + +If the output consists of multiple files, only the first part will be saved to the specified stream. + + +### Returns + +Returns processor with specified output stream. + + +## to_stream(output, save_format) {#bytesio_saveformat} + +Specifies output stream for the processor. + + +```python +def to_stream(self, output: io.BytesIO, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | io.BytesIO | Output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | Save format. | + +### Remarks + +If the output consists of multiple files, only the first part will be saved to the specified stream. + + +### Returns + +Returns processor with specified output stream. + + +## Examples + +Shows how to merge documents from stream into a single output document using context. + +```python +#There is a several ways to merge documents: +input_doc1 = MY_DIR + 'Big document.docx' +input_doc2 = MY_DIR + 'Tables.docx' +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as first_stream_in: + with system_helper.io.FileStream(MY_DIR + 'Tables.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as second_stream_in: + save_options = aw.saving.OoxmlSaveOptions() + save_options.password = 'Aspose.Words' + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context = aw.lowcode.MergerContext() + context.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context).from_stream(input=first_stream_in).from_stream(input=second_stream_in).to_stream(output=stream_out, save_options=save_options).execute() + first_load_options = aw.loading.LoadOptions() + first_load_options.ignore_ole_data = True + second_load_options = aw.loading.LoadOptions() + second_load_options.ignore_ole_data = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.MergeStreamContextDocuments.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + context2 = aw.lowcode.MergerContext() + context2.merge_format_mode = aw.lowcode.MergeFormatMode.KEEP_SOURCE_FORMATTING + aw.lowcode.Merger.create(context2).from_stream(input=first_stream_in, load_options=first_load_options).from_stream(input=second_stream_in, load_options=second_load_options).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Processor](../) + diff --git a/english/python-net/aspose.words.lowcode/processor/to_streams/_index.md b/english/python-net/aspose.words.lowcode/processor/to_streams/_index.md new file mode 100644 index 00000000000..abd391464d9 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processor/to_streams/_index.md @@ -0,0 +1,40 @@ +--- +title: Processor.to_streams method +linktitle: to_streams method +articleTitle: to_streams method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Processor.to_streams method" +type: docs +weight: 60 +url: /python-net/aspose.words.lowcode/processor/to_streams/ +--- + +## to_streams(output, save_options) {#unknown_saveoptions} + +```python +def to_streams(self, output, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | | | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | | + +## to_streams(output, save_format) {#unknown_saveformat} + +```python +def to_streams(self, output, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| output | | | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | | + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Processor](../) + diff --git a/english/python-net/aspose.words.lowcode/processorcontext/_index.md b/english/python-net/aspose.words.lowcode/processorcontext/_index.md new file mode 100644 index 00000000000..adf0caa2f46 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processorcontext/_index.md @@ -0,0 +1,28 @@ +--- +title: ProcessorContext class +linktitle: ProcessorContext class +articleTitle: ProcessorContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ProcessorContext class. Base class for processor contexts" +type: docs +weight: 130 +url: /python-net/aspose.words.lowcode/processorcontext/ +--- + +## ProcessorContext class + +Base class for processor contexts. Provides properties and options used by the processor to execute processing. + + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](./font_settings/) | Font settings used by the processor. | +| [layout_options](./layout_options/) | Document layout options used by the processor. | +| [warning_callback](./warning_callback/) | Warning callback used by the processor. | + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/processorcontext/font_settings/_index.md b/english/python-net/aspose.words.lowcode/processorcontext/font_settings/_index.md new file mode 100644 index 00000000000..9329be6af65 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processorcontext/font_settings/_index.md @@ -0,0 +1,32 @@ +--- +title: ProcessorContext.font_settings property +linktitle: font_settings property +articleTitle: font_settings property +second_title: Aspose.Words for Python +description: "ProcessorContext.font_settings property. Font settings used by the processor." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/processorcontext/font_settings/ +--- + +## ProcessorContext.font_settings property + +Font settings used by the processor. + + +```python +@property +def font_settings(self) -> aspose.words.fonts.FontSettings: + ... + +@font_settings.setter +def font_settings(self, value: aspose.words.fonts.FontSettings): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ProcessorContext](../) + diff --git a/english/python-net/aspose.words.lowcode/processorcontext/layout_options/_index.md b/english/python-net/aspose.words.lowcode/processorcontext/layout_options/_index.md new file mode 100644 index 00000000000..a3645e87f24 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processorcontext/layout_options/_index.md @@ -0,0 +1,28 @@ +--- +title: ProcessorContext.layout_options property +linktitle: layout_options property +articleTitle: layout_options property +second_title: Aspose.Words for Python +description: "ProcessorContext.layout_options property. Document layout options used by the processor." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/processorcontext/layout_options/ +--- + +## ProcessorContext.layout_options property + +Document layout options used by the processor. + + +```python +@property +def layout_options(self) -> aspose.words.layout.LayoutOptions: + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ProcessorContext](../) + diff --git a/english/python-net/aspose.words.lowcode/processorcontext/warning_callback/_index.md b/english/python-net/aspose.words.lowcode/processorcontext/warning_callback/_index.md new file mode 100644 index 00000000000..2eb8b03fd1c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/processorcontext/warning_callback/_index.md @@ -0,0 +1,32 @@ +--- +title: ProcessorContext.warning_callback property +linktitle: warning_callback property +articleTitle: warning_callback property +second_title: Aspose.Words for Python +description: "ProcessorContext.warning_callback property. Warning callback used by the processor." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/processorcontext/warning_callback/ +--- + +## ProcessorContext.warning_callback property + +Warning callback used by the processor. + + +```python +@property +def warning_callback(self) -> aspose.words.IWarningCallback: + ... + +@warning_callback.setter +def warning_callback(self, value: aspose.words.IWarningCallback): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ProcessorContext](../) + diff --git a/english/python-net/aspose.words.lowcode/replacer/_index.md b/english/python-net/aspose.words.lowcode/replacer/_index.md new file mode 100644 index 00000000000..0e4667000ae --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacer/_index.md @@ -0,0 +1,61 @@ +--- +title: Replacer class +linktitle: Replacer class +articleTitle: Replacer class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Replacer class. Provides methods intended to find and replace text in the document." +type: docs +weight: 140 +url: /python-net/aspose.words.lowcode/replacer/ +--- + +## Replacer class + +Provides methods intended to find and replace text in the document. + + +**Inheritance:** [Replacer](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ create(context)](./create/#replacercontext) | Creates new instance of the replacer processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ replace(input_file_name, output_file_name, pattern, replacement)](./replace/#str_str_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file. | +|[ replace(input_file_name, output_file_name, save_format, pattern, replacement)](./replace/#str_str_saveformat_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. | +|[ replace(input_file_name, output_file_name, save_format, pattern, replacement, options)](./replace/#str_str_saveformat_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. | +|[ replace(input_file_name, output_file_name, save_options, pattern, replacement)](./replace/#str_str_saveoptions_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. | +|[ replace(input_file_name, output_file_name, save_options, pattern, replacement, options)](./replace/#str_str_saveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. | +|[ replace(input_stream, output_stream, save_format, pattern, replacement)](./replace/#bytesio_bytesio_saveformat_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. | +|[ replace(input_stream, output_stream, save_format, pattern, replacement, options)](./replace/#bytesio_bytesio_saveformat_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. | +|[ replace(input_stream, output_stream, save_options, pattern, replacement)](./replace/#bytesio_bytesio_saveoptions_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. | +|[ replace(input_stream, output_stream, save_options, pattern, replacement, options)](./replace/#bytesio_bytesio_saveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. | +|[ replace_regex(input_file_name, output_file_name, pattern, replacement)](./replace_regex/#str_str_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression. | +|[ replace_regex(input_file_name, output_file_name, save_format, pattern, replacement, options)](./replace_regex/#str_str_saveformat_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options. | +|[ replace_regex(input_file_name, output_file_name, save_options, pattern, replacement, options)](./replace_regex/#str_str_saveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options. | +|[ replace_regex(input_stream, output_stream, save_format, pattern, replacement, options)](./replace_regex/#bytesio_bytesio_saveformat_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options. | +|[ replace_regex(input_stream, output_stream, save_options, pattern, replacement, options)](./replace_regex/#bytesio_bytesio_saveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options. | +|[ replace_to_images(input_file_name, save_options, pattern, replacement)](./replace_to_images/#str_imagesaveoptions_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file. Renders output to images. | +|[ replace_to_images(input_file_name, save_options, pattern, replacement, options)](./replace_to_images/#str_imagesaveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file. Renders output to images. | +|[ replace_to_images(input_stream, save_options, pattern, replacement)](./replace_to_images/#bytesio_imagesaveoptions_str_str) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file. Renders output to images. | +|[ replace_to_images(input_stream, save_options, pattern, replacement, options)](./replace_to_images/#bytesio_imagesaveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified character string pattern with a replacement string in the input file. Renders output to images. | +|[ replace_to_images_regex(input_file_name, save_options, pattern, replacement, options)](./replace_to_images_regex/#str_imagesaveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified regular expression pattern with a replacement string in the input file. Renders output to images. | +|[ replace_to_images_regex(input_stream, save_options, pattern, replacement, options)](./replace_to_images_regex/#bytesio_imagesaveoptions_str_str_findreplaceoptions) | Replaces all occurrences of a specified regular expression pattern with a replacement string in the input file. Renders output to images. | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/replacer/create/_index.md b/english/python-net/aspose.words.lowcode/replacer/create/_index.md new file mode 100644 index 00000000000..fabc38e30c2 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacer/create/_index.md @@ -0,0 +1,59 @@ +--- +title: Replacer.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "Replacer.create method. Creates new instance of the replacer processor." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/replacer/create/ +--- + +## create(context) {#replacercontext} + +Creates new instance of the replacer processor. + + +```python +def create(self, context: aspose.words.lowcode.ReplacerContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [ReplacerContext](../../replacercontext/) | | + +### Examples + +Shows how to replace string in the document using context. + +```python +# There is a several ways to replace string in the document: +doc = MY_DIR + 'Footer.docx' +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +replacer_context = aw.lowcode.ReplacerContext() +replacer_context.set_replacement(pattern=pattern, replacement=replacement) +replacer_context.find_replace_options.find_whole_words_only = False +aw.lowcode.Replacer.create(replacer_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ReplaceContext.docx').execute() +``` + +Shows how to replace string in the document using documents from the stream using context. + +```python +# There is a several ways to replace string in the document using documents from the stream: +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +with system_helper.io.FileStream(MY_DIR + 'Footer.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + replacer_context = aw.lowcode.ReplacerContext() + replacer_context.set_replacement(pattern=pattern, replacement=replacement) + replacer_context.find_replace_options.find_whole_words_only = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ReplaceContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Replacer.create(replacer_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Replacer](../) + diff --git a/english/python-net/aspose.words.lowcode/replacer/replace/_index.md b/english/python-net/aspose.words.lowcode/replacer/replace/_index.md new file mode 100644 index 00000000000..5fcf3f02ac7 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacer/replace/_index.md @@ -0,0 +1,338 @@ +--- +title: Replacer.replace method +linktitle: replace method +articleTitle: replace method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Replacer.replace method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/replacer/replace/ +--- + +## replace(input_file_name, output_file_name, pattern, replacement) {#str_str_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file. + + +```python +def replace(self, input_file_name: str, output_file_name: str, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace(input_file_name, output_file_name, save_format, pattern, replacement) {#str_str_saveformat_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. + + +```python +def replace(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace(input_file_name, output_file_name, save_format, pattern, replacement, options) {#str_str_saveformat_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. + + +```python +def replace(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace(input_file_name, output_file_name, save_options, pattern, replacement) {#str_str_saveoptions_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. + + +```python +def replace(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace(input_file_name, output_file_name, save_options, pattern, replacement, options) {#str_str_saveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options. + + +```python +def replace(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace(input_stream, output_stream, save_format, pattern, replacement) {#bytesio_bytesio_saveformat_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. + + +```python +def replace(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +### Returns + +The number of replacements made. + + +## replace(input_stream, output_stream, save_format, pattern, replacement, options) {#bytesio_bytesio_saveformat_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. + + +```python +def replace(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +### Returns + +The number of replacements made. + + +## replace(input_stream, output_stream, save_options, pattern, replacement) {#bytesio_bytesio_saveoptions_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. + + +```python +def replace(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +### Returns + +The number of replacements made. + + +## replace(input_stream, output_stream, save_options, pattern, replacement, options) {#bytesio_bytesio_saveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options. + + +```python +def replace(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +### Returns + +The number of replacements made. + + +## Examples + +Shows how to replace string in the document. + +```python +# There is a several ways to replace string in the document: +doc = MY_DIR + 'Footer.docx' +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +options = aw.replacing.FindReplaceOptions() +options.find_whole_words_only = False +aw.lowcode.Replacer.replace(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.Replace.1.docx', pattern=pattern, replacement=replacement) +aw.lowcode.Replacer.replace(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.Replace.2.docx', save_format=aw.SaveFormat.DOCX, pattern=pattern, replacement=replacement) +aw.lowcode.Replacer.replace(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.Replace.3.docx', save_format=aw.SaveFormat.DOCX, pattern=pattern, replacement=replacement, options=options) +``` + +Shows how to replace string in the document using documents from the stream. + +```python +# There is a several ways to replace string in the document using documents from the stream: +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +with system_helper.io.FileStream(MY_DIR + 'Footer.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ReplaceStream.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Replacer.replace(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, pattern=pattern, replacement=replacement) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ReplaceStream.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + options = aw.replacing.FindReplaceOptions() + options.find_whole_words_only = False + aw.lowcode.Replacer.replace(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, pattern=pattern, replacement=replacement, options=options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Replacer](../) + diff --git a/english/python-net/aspose.words.lowcode/replacer/replace_regex/_index.md b/english/python-net/aspose.words.lowcode/replacer/replace_regex/_index.md new file mode 100644 index 00000000000..d9084566096 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacer/replace_regex/_index.md @@ -0,0 +1,179 @@ +--- +title: Replacer.replace_regex method +linktitle: replace_regex method +articleTitle: replace_regex method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Replacer.replace_regex method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/replacer/replace_regex/ +--- + +## replace_regex(input_file_name, output_file_name, pattern, replacement) {#str_str_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression. + + +```python +def replace_regex(self, input_file_name: str, output_file_name: str, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace_regex(input_file_name, output_file_name, save_format, pattern, replacement, options) {#str_str_saveformat_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options. + + +```python +def replace_regex(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace_regex(input_file_name, output_file_name, save_options, pattern, replacement, options) {#str_str_saveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options. + + +```python +def replace_regex(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +### Returns + +The number of replacements made. + + +## replace_regex(input_stream, output_stream, save_format, pattern, replacement, options) {#bytesio_bytesio_saveformat_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options. + + +```python +def replace_regex(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +### Returns + +The number of replacements made. + + +## replace_regex(input_stream, output_stream, save_options, pattern, replacement, options) {#bytesio_bytesio_saveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options. + + +```python +def replace_regex(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +### Returns + +The number of replacements made. + + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Replacer](../) + diff --git a/english/python-net/aspose.words.lowcode/replacer/replace_to_images/_index.md b/english/python-net/aspose.words.lowcode/replacer/replace_to_images/_index.md new file mode 100644 index 00000000000..0e4a11870c5 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacer/replace_to_images/_index.md @@ -0,0 +1,118 @@ +--- +title: Replacer.replace_to_images method +linktitle: replace_to_images method +articleTitle: replace_to_images method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Replacer.replace_to_images method" +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/replacer/replace_to_images/ +--- + +## replace_to_images(input_file_name, save_options, pattern, replacement) {#str_imagesaveoptions_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file. +Renders output to images. + + +```python +def replace_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +## replace_to_images(input_file_name, save_options, pattern, replacement, options) {#str_imagesaveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file. +Renders output to images. + + +```python +def replace_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +## replace_to_images(input_stream, save_options, pattern, replacement) {#bytesio_imagesaveoptions_str_str} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file. +Renders output to images. + + +```python +def replace_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | + +## replace_to_images(input_stream, save_options, pattern, replacement, options) {#bytesio_imagesaveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified character string pattern with a replacement string in the input file. +Renders output to images. + + +```python +def replace_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| pattern | str | A string to be replaced. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +## Examples + +Shows how to replace string in the document and save result to images. + +```python +# There is a several ways to replace string in the document: +doc = MY_DIR + 'Footer.docx' +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +images = aw.lowcode.Replacer.replace_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), pattern=pattern, replacement=replacement) +options = aw.replacing.FindReplaceOptions() +options.find_whole_words_only = False +images = aw.lowcode.Replacer.replace_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), pattern=pattern, replacement=replacement, options=options) +``` + +Shows how to replace string in the document using documents from the stream and save result to images. + +```python +# There is a several ways to replace string in the document using documents from the stream: +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +with system_helper.io.FileStream(MY_DIR + 'Footer.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + images = aw.lowcode.Replacer.replace_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), pattern=pattern, replacement=replacement) + options = aw.replacing.FindReplaceOptions() + options.find_whole_words_only = False + images = aw.lowcode.Replacer.replace_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), pattern=pattern, replacement=replacement, options=options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Replacer](../) + diff --git a/english/python-net/aspose.words.lowcode/replacer/replace_to_images_regex/_index.md b/english/python-net/aspose.words.lowcode/replacer/replace_to_images_regex/_index.md new file mode 100644 index 00000000000..43d67bc189f --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacer/replace_to_images_regex/_index.md @@ -0,0 +1,54 @@ +--- +title: Replacer.replace_to_images_regex method +linktitle: replace_to_images_regex method +articleTitle: replace_to_images_regex method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Replacer.replace_to_images_regex method" +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/replacer/replace_to_images_regex/ +--- + +## replace_to_images_regex(input_file_name, save_options, pattern, replacement, options) {#str_imagesaveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified regular expression pattern with a replacement string in the input file. +Renders output to images. + + +```python +def replace_to_images_regex(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +## replace_to_images_regex(input_stream, save_options, pattern, replacement, options) {#bytesio_imagesaveoptions_str_str_findreplaceoptions} + +Replaces all occurrences of a specified regular expression pattern with a replacement string in the input file. +Renders output to images. + + +```python +def replace_to_images_regex(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, pattern: str, replacement: str, options: aspose.words.replacing.FindReplaceOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| pattern | str | A regular expression pattern used to find matches. | +| replacement | str | A string to replace all occurrences of pattern. | +| options | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) | [FindReplaceOptions](../../../aspose.words.replacing/findreplaceoptions/) object to specify additional options. | + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Replacer](../) + diff --git a/english/python-net/aspose.words.lowcode/replacercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/replacercontext/__init__/_index.md new file mode 100644 index 00000000000..2120477a2fd --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: ReplacerContext constructor +linktitle: ReplacerContext constructor +articleTitle: ReplacerContext constructor +second_title: Aspose.Words for Python +description: "ReplacerContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/replacercontext/__init__/ +--- + +## ReplacerContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReplacerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/replacercontext/_index.md b/english/python-net/aspose.words.lowcode/replacercontext/_index.md new file mode 100644 index 00000000000..b9a79084259 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacercontext/_index.md @@ -0,0 +1,73 @@ +--- +title: ReplacerContext class +linktitle: ReplacerContext class +articleTitle: ReplacerContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReplacerContext class. Find/replace operation context." +type: docs +weight: 150 +url: /python-net/aspose.words.lowcode/replacercontext/ +--- + +## ReplacerContext class + +Find/replace operation context. + + +**Inheritance:** [ReplacerContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [ReplacerContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [find_replace_options](./find_replace_options/) | Find/replace options. | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Methods + +| Name | Description | +| --- | --- | +|[ set_replacement(pattern, replacement)](./set_replacement/#str_str) | Sets pattern and replacement used by find/replace operation. | +|[ set_replacement_regex(pattern, replacement)](./set_replacement_regex/#str_str) | Sets pattern and replacement used by find/replace operation. | + +### Examples + +Shows how to replace string in the document using context. + +```python +# There is a several ways to replace string in the document: +doc = MY_DIR + 'Footer.docx' +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +replacer_context = aw.lowcode.ReplacerContext() +replacer_context.set_replacement(pattern=pattern, replacement=replacement) +replacer_context.find_replace_options.find_whole_words_only = False +aw.lowcode.Replacer.create(replacer_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ReplaceContext.docx').execute() +``` + +Shows how to replace string in the document using documents from the stream using context. + +```python +# There is a several ways to replace string in the document using documents from the stream: +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +with system_helper.io.FileStream(MY_DIR + 'Footer.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + replacer_context = aw.lowcode.ReplacerContext() + replacer_context.set_replacement(pattern=pattern, replacement=replacement) + replacer_context.find_replace_options.find_whole_words_only = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ReplaceContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Replacer.create(replacer_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/replacercontext/find_replace_options/_index.md b/english/python-net/aspose.words.lowcode/replacercontext/find_replace_options/_index.md new file mode 100644 index 00000000000..ae900cbe7eb --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacercontext/find_replace_options/_index.md @@ -0,0 +1,57 @@ +--- +title: ReplacerContext.find_replace_options property +linktitle: find_replace_options property +articleTitle: find_replace_options property +second_title: Aspose.Words for Python +description: "ReplacerContext.find_replace_options property. Find/replace options." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/replacercontext/find_replace_options/ +--- + +## ReplacerContext.find_replace_options property + +Find/replace options. + + +```python +@property +def find_replace_options(self) -> aspose.words.replacing.FindReplaceOptions: + ... + +``` + +### Examples + +Shows how to replace string in the document using context. + +```python +# There is a several ways to replace string in the document: +doc = MY_DIR + 'Footer.docx' +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +replacer_context = aw.lowcode.ReplacerContext() +replacer_context.set_replacement(pattern=pattern, replacement=replacement) +replacer_context.find_replace_options.find_whole_words_only = False +aw.lowcode.Replacer.create(replacer_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ReplaceContext.docx').execute() +``` + +Shows how to replace string in the document using documents from the stream using context. + +```python +# There is a several ways to replace string in the document using documents from the stream: +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +with system_helper.io.FileStream(MY_DIR + 'Footer.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + replacer_context = aw.lowcode.ReplacerContext() + replacer_context.set_replacement(pattern=pattern, replacement=replacement) + replacer_context.find_replace_options.find_whole_words_only = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ReplaceContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Replacer.create(replacer_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReplacerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/replacercontext/set_replacement/_index.md b/english/python-net/aspose.words.lowcode/replacercontext/set_replacement/_index.md new file mode 100644 index 00000000000..58629c476ae --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacercontext/set_replacement/_index.md @@ -0,0 +1,65 @@ +--- +title: ReplacerContext.set_replacement method +linktitle: set_replacement method +articleTitle: set_replacement method +second_title: Aspose.Words for Python +description: "ReplacerContext.set_replacement method. Sets pattern and replacement used by find/replace operation." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/replacercontext/set_replacement/ +--- + +## set_replacement(pattern, replacement) {#str_str} + +Sets pattern and replacement used by find/replace operation. + + +```python +def set_replacement(self, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| pattern | str | | +| replacement | str | | + +### Remarks + +Using this method overrides previously set pattern and replacement. + + +### Examples + +Shows how to replace string in the document using context. + +```python +# There is a several ways to replace string in the document: +doc = MY_DIR + 'Footer.docx' +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +replacer_context = aw.lowcode.ReplacerContext() +replacer_context.set_replacement(pattern=pattern, replacement=replacement) +replacer_context.find_replace_options.find_whole_words_only = False +aw.lowcode.Replacer.create(replacer_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.ReplaceContext.docx').execute() +``` + +Shows how to replace string in the document using documents from the stream using context. + +```python +# There is a several ways to replace string in the document using documents from the stream: +pattern = '(C)2006 Aspose Pty Ltd.' +replacement = 'Copyright (C) 2024 by Aspose Pty Ltd.' +with system_helper.io.FileStream(MY_DIR + 'Footer.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + replacer_context = aw.lowcode.ReplacerContext() + replacer_context.set_replacement(pattern=pattern, replacement=replacement) + replacer_context.find_replace_options.find_whole_words_only = False + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ReplaceContextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Replacer.create(replacer_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReplacerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/replacercontext/set_replacement_regex/_index.md b/english/python-net/aspose.words.lowcode/replacercontext/set_replacement_regex/_index.md new file mode 100644 index 00000000000..c6d20c0da04 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/replacercontext/set_replacement_regex/_index.md @@ -0,0 +1,36 @@ +--- +title: ReplacerContext.set_replacement_regex method +linktitle: set_replacement_regex method +articleTitle: set_replacement_regex method +second_title: Aspose.Words for Python +description: "ReplacerContext.set_replacement_regex method. Sets pattern and replacement used by find/replace operation." +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/replacercontext/set_replacement_regex/ +--- + +## set_replacement_regex(pattern, replacement) {#str_str} + +Sets pattern and replacement used by find/replace operation. + + +```python +def set_replacement_regex(self, pattern: str, replacement: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| pattern | str | | +| replacement | str | | + +### Remarks + +Using this method overrides previously set pattern and replacement. + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReplacerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilder/_index.md b/english/python-net/aspose.words.lowcode/reportbuilder/_index.md new file mode 100644 index 00000000000..34fc3121dd6 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilder/_index.md @@ -0,0 +1,76 @@ +--- +title: ReportBuilder class +linktitle: ReportBuilder class +articleTitle: ReportBuilder class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReportBuilder class. Provides methods intended to fill template with data using LINQ Reporting Engine." +type: docs +weight: 160 +url: /python-net/aspose.words.lowcode/reportbuilder/ +--- + +## ReportBuilder class + +Provides methods intended to fill template with data using LINQ Reporting Engine. + + +**Inheritance:** [ReportBuilder](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ build_report(input_file_name, output_file_name, data)](./build_report/#str_str_object) | Populates the template document with data from the specified source, generating a completed report with additional options. | +|[ build_report(input_file_name, output_file_name, data, report_builder_options)](./build_report/#str_str_object_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with additional options. | +|[ build_report(input_file_name, output_file_name, save_format, data)](./build_report/#str_str_saveformat_object) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. | +|[ build_report(input_file_name, output_file_name, save_format, data, report_builder_options)](./build_report/#str_str_saveformat_object_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. | +|[ build_report(input_file_name, output_file_name, save_options, data)](./build_report/#str_str_saveoptions_object) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. | +|[ build_report(input_file_name, output_file_name, save_options, data, report_builder_options)](./build_report/#str_str_saveoptions_object_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. | +|[ build_report(input_stream, output_stream, save_format, data)](./build_report/#bytesio_bytesio_saveformat_object) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. | +|[ build_report(input_stream, output_stream, save_format, data, report_builder_options)](./build_report/#bytesio_bytesio_saveformat_object_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. | +|[ build_report(input_stream, output_stream, save_options, data)](./build_report/#bytesio_bytesio_saveoptions_object) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. | +|[ build_report(input_stream, output_stream, save_options, data, report_builder_options)](./build_report/#bytesio_bytesio_saveoptions_object_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. | +|[ build_report(input_file_name, output_file_name, data, data_source_name)](./build_report/#str_str_object_str) | Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. | +|[ build_report(input_file_name, output_file_name, data, data_source_name, report_builder_options)](./build_report/#str_str_object_str_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. | +|[ build_report(input_file_name, output_file_name, save_format, data, data_source_name)](./build_report/#str_str_saveformat_object_str) | Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. | +|[ build_report(input_file_name, output_file_name, save_format, data, data_source_name, report_builder_options)](./build_report/#str_str_saveformat_object_str_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. | +|[ build_report(input_file_name, output_file_name, save_options, data, data_source_name)](./build_report/#str_str_saveoptions_object_str) | Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. | +|[ build_report(input_file_name, output_file_name, save_options, data, data_source_name, report_builder_options)](./build_report/#str_str_saveoptions_object_str_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. | +|[ build_report(input_stream, output_stream, save_format, data, data_source_name)](./build_report/#bytesio_bytesio_saveformat_object_str) | Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. | +|[ build_report(input_stream, output_stream, save_format, data, data_source_name, report_builder_options)](./build_report/#bytesio_bytesio_saveformat_object_str_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. | +|[ build_report(input_stream, output_stream, save_options, data, data_source_name)](./build_report/#bytesio_bytesio_saveoptions_object_str) | Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. | +|[ build_report(input_stream, output_stream, save_options, data, data_source_name, report_builder_options)](./build_report/#bytesio_bytesio_saveoptions_object_str_reportbuilderoptions) | Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. | +|[ build_report(input_file_name, output_file_name, data, data_source_names)](./build_report/#str_str_objectlist_strlist) | Populates the template document with data from multiple sources, generating a completed report with additional options. This overload automatically determines the save format based on the output file extension. | +|[ build_report(input_file_name, output_file_name, data, data_source_names, report_builder_options)](./build_report/#str_str_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources, generating a completed report with additional options. This overload automatically determines the save format based on the output file extension. | +|[ build_report(input_file_name, output_file_name, save_format, data, data_source_names)](./build_report/#str_str_saveformat_objectlist_strlist) | Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. | +|[ build_report(input_file_name, output_file_name, save_format, data, data_source_names, report_builder_options)](./build_report/#str_str_saveformat_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. | +|[ build_report(input_file_name, output_file_name, save_options, data, data_source_names)](./build_report/#str_str_saveoptions_objectlist_strlist) | Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. | +|[ build_report(input_file_name, output_file_name, save_options, data, data_source_names, report_builder_options)](./build_report/#str_str_saveoptions_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. | +|[ build_report(input_stream, output_stream, save_format, data, data_source_names)](./build_report/#bytesio_bytesio_saveformat_objectlist_strlist) | Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. | +|[ build_report(input_stream, output_stream, save_format, data, data_source_names, report_builder_options)](./build_report/#bytesio_bytesio_saveformat_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. | +|[ build_report(input_stream, output_stream, save_options, data, data_source_names)](./build_report/#bytesio_bytesio_saveoptions_objectlist_strlist) | Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. | +|[ build_report(input_stream, output_stream, save_options, data, data_source_names, report_builder_options)](./build_report/#bytesio_bytesio_saveoptions_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. | +|[ build_report_to_images(input_file_name, save_options, data, data_source_names)](./build_report_to_images/#str_imagesaveoptions_objectlist_strlist) | Populates the template document with data from multiple sources. Renders the output to images. | +|[ build_report_to_images(input_file_name, save_options, data, data_source_names, report_builder_options)](./build_report_to_images/#str_imagesaveoptions_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources. Renders the output to images. | +|[ build_report_to_images(input_stream, save_options, data, data_source_names)](./build_report_to_images/#bytesio_imagesaveoptions_objectlist_strlist) | Populates the template document with data from multiple sources. Renders the output to images. | +|[ build_report_to_images(input_stream, save_options, data, data_source_names, report_builder_options)](./build_report_to_images/#bytesio_imagesaveoptions_objectlist_strlist_reportbuilderoptions) | Populates the template document with data from multiple sources. Renders the output to images. | +|[ create()](./create/#default) | Creates new instance of the report builder processor. | +|[ create(context)](./create/#reportbuildercontext) | Creates new instance of the report builder processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilder/build_report/_index.md b/english/python-net/aspose.words.lowcode/reportbuilder/build_report/_index.md new file mode 100644 index 00000000000..e1900beba4c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilder/build_report/_index.md @@ -0,0 +1,827 @@ +--- +title: ReportBuilder.build_report method +linktitle: build_report method +articleTitle: build_report method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReportBuilder.build_report method" +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/reportbuilder/build_report/ +--- + +## build_report(input_file_name, output_file_name, data) {#str_str_object} + +Populates the template document with data from the specified source, generating a completed report with additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, data: object): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| data | object | A data source object. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, data, report_builder_options) {#str_str_object_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, data: object, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| data | object | A data source object. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_format, data) {#str_str_saveformat_object} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, data: object): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_format, data, report_builder_options) {#str_str_saveformat_object_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, data: object, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_options, data) {#str_str_saveoptions_object} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, data: object): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_options, data, report_builder_options) {#str_str_saveoptions_object_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, data: object, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_stream, output_stream, save_format, data) {#bytesio_bytesio_saveformat_object} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, data: object): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_format, data, report_builder_options) {#bytesio_bytesio_saveformat_object_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, data: object, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_options, data) {#bytesio_bytesio_saveoptions_object} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, data: object): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_options, data, report_builder_options) {#bytesio_bytesio_saveoptions_object_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with specified output format and additional options, from input and output streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, data: object, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_file_name, output_file_name, data, data_source_name) {#str_str_object_str} + +Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, data: object, data_source_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, data, data_source_name, report_builder_options) {#str_str_object_str_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, data: object, data_source_name: str, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_format, data, data_source_name) {#str_str_saveformat_object_str} + +Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, data: object, data_source_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_format, data, data_source_name, report_builder_options) {#str_str_saveformat_object_str_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, data: object, data_source_name: str, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_options, data, data_source_name) {#str_str_saveoptions_object_str} + +Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, data: object, data_source_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_options, data, data_source_name, report_builder_options) {#str_str_saveoptions_object_str_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with specified output format, a named data source reference, and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, data: object, data_source_name: str, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_stream, output_stream, save_format, data, data_source_name) {#bytesio_bytesio_saveformat_object_str} + +Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, data: object, data_source_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_format, data, data_source_name, report_builder_options) {#bytesio_bytesio_saveformat_object_str_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, data: object, data_source_name: str, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_options, data, data_source_name) {#bytesio_bytesio_saveoptions_object_str} + +Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, data: object, data_source_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_options, data, data_source_name, report_builder_options) {#bytesio_bytesio_saveoptions_object_str_reportbuilderoptions} + +Populates the template document with data from the specified source, generating a completed report with a named data source reference and additional options. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, data: object, data_source_name: str, report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | object | A data source object. | +| data_source_name | str | A name to reference the data source object in the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_file_name, output_file_name, data, data_source_names) {#str_str_objectlist_strlist} + +Populates the template document with data from multiple sources, generating a completed report with additional options. +This overload automatically determines the save format based on the output file extension. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, data, data_source_names, report_builder_options) {#str_str_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources, generating a completed report with additional options. +This overload automatically determines the save format based on the output file extension. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_format, data, data_source_names) {#str_str_saveformat_objectlist_strlist} + +Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_format, data, data_source_names, report_builder_options) {#str_str_saveformat_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_options, data, data_source_names) {#str_str_saveoptions_objectlist_strlist} + +Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_file_name, output_file_name, save_options, data, data_source_names, report_builder_options) {#str_str_saveoptions_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources, generating a completed report with a specified output format and additional options. + + +```python +def build_report(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## build_report(input_stream, output_stream, save_format, data, data_source_names) {#bytesio_bytesio_saveformat_objectlist_strlist} + +Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_format, data, data_source_names, report_builder_options) {#bytesio_bytesio_saveformat_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The output's save format. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_options, data, data_source_names) {#bytesio_bytesio_saveoptions_objectlist_strlist} + +Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## build_report(input_stream, output_stream, save_options, data, data_source_names, report_builder_options) {#bytesio_bytesio_saveoptions_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources, generating a completed report with specified output format and additional options from the specified input and output file streams. + + +```python +def build_report(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| output_stream | io.BytesIO | The output file stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilder](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilder/build_report_to_images/_index.md b/english/python-net/aspose.words.lowcode/reportbuilder/build_report_to_images/_index.md new file mode 100644 index 00000000000..81f5f54738b --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilder/build_report_to_images/_index.md @@ -0,0 +1,90 @@ +--- +title: ReportBuilder.build_report_to_images method +linktitle: build_report_to_images method +articleTitle: build_report_to_images method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReportBuilder.build_report_to_images method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/reportbuilder/build_report_to_images/ +--- + +## build_report_to_images(input_file_name, save_options, data, data_source_names) {#str_imagesaveoptions_objectlist_strlist} + +Populates the template document with data from multiple sources. +Renders the output to images. + + +```python +def build_report_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +## build_report_to_images(input_file_name, save_options, data, data_source_names, report_builder_options) {#str_imagesaveoptions_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources. +Renders the output to images. + + +```python +def build_report_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +## build_report_to_images(input_stream, save_options, data, data_source_names) {#bytesio_imagesaveoptions_objectlist_strlist} + +Populates the template document with data from multiple sources. +Renders the output to images. + + +```python +def build_report_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, data: List[object], data_source_names: List[str]): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | + +## build_report_to_images(input_stream, save_options, data, data_source_names, report_builder_options) {#bytesio_imagesaveoptions_objectlist_strlist_reportbuilderoptions} + +Populates the template document with data from multiple sources. +Renders the output to images. + + +```python +def build_report_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, data: List[object], data_source_names: List[str], report_builder_options: aspose.words.lowcode.ReportBuilderOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The output's save options. | +| data | List[object] | An array of data source objects. | +| data_source_names | List[str] | An array of names to reference the data source objects within the template. | +| report_builder_options | [ReportBuilderOptions](../../reportbuilderoptions/) | Additional report build options. | + +## See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilder](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilder/create/_index.md b/english/python-net/aspose.words.lowcode/reportbuilder/create/_index.md new file mode 100644 index 00000000000..bfbacad4763 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilder/create/_index.md @@ -0,0 +1,40 @@ +--- +title: ReportBuilder.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReportBuilder.create method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/reportbuilder/create/ +--- + +## create() {#default} + +Creates new instance of the report builder processor. + + +```python +def create(self): + ... +``` + +## create(context) {#reportbuildercontext} + +Creates new instance of the report builder processor. + + +```python +def create(self, context: aspose.words.lowcode.ReportBuilderContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [ReportBuilderContext](../../reportbuildercontext/) | | + +## See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilder](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuildercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/reportbuildercontext/__init__/_index.md new file mode 100644 index 00000000000..5c42dca87f7 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuildercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: ReportBuilderContext constructor +linktitle: ReportBuilderContext constructor +articleTitle: ReportBuilderContext constructor +second_title: Aspose.Words for Python +description: "ReportBuilderContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/reportbuildercontext/__init__/ +--- + +## ReportBuilderContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilderContext](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuildercontext/_index.md b/english/python-net/aspose.words.lowcode/reportbuildercontext/_index.md new file mode 100644 index 00000000000..06a55ab7753 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuildercontext/_index.md @@ -0,0 +1,37 @@ +--- +title: ReportBuilderContext class +linktitle: ReportBuilderContext class +articleTitle: ReportBuilderContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReportBuilderContext class. LINQ Reporting Engine context." +type: docs +weight: 170 +url: /python-net/aspose.words.lowcode/reportbuildercontext/ +--- + +## ReportBuilderContext class + +LINQ Reporting Engine context. + + +**Inheritance:** [ReportBuilderContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [ReportBuilderContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [report_builder_options](./report_builder_options/) | Report build options. | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/reportbuildercontext/report_builder_options/_index.md b/english/python-net/aspose.words.lowcode/reportbuildercontext/report_builder_options/_index.md new file mode 100644 index 00000000000..d6a934c8775 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuildercontext/report_builder_options/_index.md @@ -0,0 +1,28 @@ +--- +title: ReportBuilderContext.report_builder_options property +linktitle: report_builder_options property +articleTitle: report_builder_options property +second_title: Aspose.Words for Python +description: "ReportBuilderContext.report_builder_options property. Report build options." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/reportbuildercontext/report_builder_options/ +--- + +## ReportBuilderContext.report_builder_options property + +Report build options. + + +```python +@property +def report_builder_options(self) -> aspose.words.lowcode.ReportBuilderOptions: + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilderContext](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilderoptions/__init__/_index.md b/english/python-net/aspose.words.lowcode/reportbuilderoptions/__init__/_index.md new file mode 100644 index 00000000000..622af0b3973 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilderoptions/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: ReportBuilderOptions constructor +linktitle: ReportBuilderOptions constructor +articleTitle: ReportBuilderOptions constructor +second_title: Aspose.Words for Python +description: "ReportBuilderOptions constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/reportbuilderoptions/__init__/ +--- + +## ReportBuilderOptions() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilderOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilderoptions/_index.md b/english/python-net/aspose.words.lowcode/reportbuilderoptions/_index.md new file mode 100644 index 00000000000..bed7b261357 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilderoptions/_index.md @@ -0,0 +1,33 @@ +--- +title: ReportBuilderOptions class +linktitle: ReportBuilderOptions class +articleTitle: ReportBuilderOptions class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.ReportBuilderOptions class. Represents options for the LINQ Reporting Engine functionality." +type: docs +weight: 180 +url: /python-net/aspose.words.lowcode/reportbuilderoptions/ +--- + +## ReportBuilderOptions class + +Represents options for the LINQ Reporting Engine functionality. + + +### Constructors +| Name | Description | +| --- | --- | +| [ReportBuilderOptions()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [known_types](./known_types/) | Gets an unordered set (i.e. a collection of unique items) containing objects which fully or partially qualified names can be used within report templates processed by this engine instance to invoke the corresponding types' static members, perform type casts, etc. | +| [missing_member_message](./missing_member_message/) | Gets or sets a string value printed instead of a template expression that represents a plain reference to a missing member of an object. The default value is an empty string. | +| [options](./options/) | Gets or sets a set of flags controlling behavior of this [ReportingEngine](../../aspose.words.reporting/reportingengine/) instance while building a report. | + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilderoptions/known_types/_index.md b/english/python-net/aspose.words.lowcode/reportbuilderoptions/known_types/_index.md new file mode 100644 index 00000000000..0ff72281f18 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilderoptions/known_types/_index.md @@ -0,0 +1,31 @@ +--- +title: ReportBuilderOptions.known_types property +linktitle: known_types property +articleTitle: known_types property +second_title: Aspose.Words for Python +description: "ReportBuilderOptions.known_types property. Gets an unordered set (i.e" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/reportbuilderoptions/known_types/ +--- + +## ReportBuilderOptions.known_types property + +Gets an unordered set (i.e. a collection of unique items) containing objects +which fully or partially qualified names can be used within report templates processed by this engine +instance to invoke the corresponding types' static members, perform type casts, etc. + + + +```python +@property +def known_types(self) -> aspose.words.reporting.KnownTypeSet: + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilderOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilderoptions/missing_member_message/_index.md b/english/python-net/aspose.words.lowcode/reportbuilderoptions/missing_member_message/_index.md new file mode 100644 index 00000000000..a9a454e89f7 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilderoptions/missing_member_message/_index.md @@ -0,0 +1,48 @@ +--- +title: ReportBuilderOptions.missing_member_message property +linktitle: missing_member_message property +articleTitle: missing_member_message property +second_title: Aspose.Words for Python +description: "ReportBuilderOptions.missing_member_message property. Gets or sets a string value printed instead of a template expression that represents a plain reference to a missing member of an object" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/reportbuilderoptions/missing_member_message/ +--- + +## ReportBuilderOptions.missing_member_message property + +Gets or sets a string value printed instead of a template expression that represents a plain reference to +a missing member of an object. The default value is an empty string. + + +```python +@property +def missing_member_message(self) -> str: + ... + +@missing_member_message.setter +def missing_member_message(self, value: str): + ... + +``` + +### Remarks + +The property should be used in conjunction with the [ReportBuildOptions.ALLOW_MISSING_MEMBERS](../../../aspose.words.reporting/reportbuildoptions/#ALLOW_MISSING_MEMBERS) +option. Otherwise, an exception is thrown when a missing member of an object is encountered. + + +The property affects only printing of a template expression representing a plain reference to a missing +object member. For example, printing of a binary operator, one of which operands references a missing +object member, is not affected. + +The value of this property cannot be set to null. + + + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilderOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/reportbuilderoptions/options/_index.md b/english/python-net/aspose.words.lowcode/reportbuilderoptions/options/_index.md new file mode 100644 index 00000000000..9df13c52210 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/reportbuilderoptions/options/_index.md @@ -0,0 +1,34 @@ +--- +title: ReportBuilderOptions.options property +linktitle: options property +articleTitle: options property +second_title: Aspose.Words for Python +description: "ReportBuilderOptions.options property. Gets or sets a set of flags controlling behavior of this [ReportingEngine](../../../aspose.words.reporting/reportingengine/) instance while building a report." +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/reportbuilderoptions/options/ +--- + +## ReportBuilderOptions.options property + +Gets or sets a set of flags controlling behavior of this [ReportingEngine](../../../aspose.words.reporting/reportingengine/) instance +while building a report. + + + +```python +@property +def options(self) -> aspose.words.reporting.ReportBuildOptions: + ... + +@options.setter +def options(self, value: aspose.words.reporting.ReportBuildOptions): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [ReportBuilderOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/signercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/signercontext/__init__/_index.md new file mode 100644 index 00000000000..004dc61f64a --- /dev/null +++ b/english/python-net/aspose.words.lowcode/signercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: SignerContext constructor +linktitle: SignerContext constructor +articleTitle: SignerContext constructor +second_title: Aspose.Words for Python +description: "SignerContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/signercontext/__init__/ +--- + +## SignerContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SignerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/signercontext/_index.md b/english/python-net/aspose.words.lowcode/signercontext/_index.md new file mode 100644 index 00000000000..8f0df949bff --- /dev/null +++ b/english/python-net/aspose.words.lowcode/signercontext/_index.md @@ -0,0 +1,38 @@ +--- +title: SignerContext class +linktitle: SignerContext class +articleTitle: SignerContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.SignerContext class. Document signer context" +type: docs +weight: 190 +url: /python-net/aspose.words.lowcode/signercontext/ +--- + +## SignerContext class + +Document signer context + + +**Inheritance:** [SignerContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [SignerContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [certificate_holder](./certificate_holder/) | CertificateHolder object with certificate that used to sign file. | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [sign_options](./sign_options/) | SignOptions object with various signing options. | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/signercontext/certificate_holder/_index.md b/english/python-net/aspose.words.lowcode/signercontext/certificate_holder/_index.md new file mode 100644 index 00000000000..cc5ae233686 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/signercontext/certificate_holder/_index.md @@ -0,0 +1,37 @@ +--- +title: SignerContext.certificate_holder property +linktitle: certificate_holder property +articleTitle: certificate_holder property +second_title: Aspose.Words for Python +description: "SignerContext.certificate_holder property. CertificateHolder object with certificate that used to sign file." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/signercontext/certificate_holder/ +--- + +## SignerContext.certificate_holder property + +CertificateHolder object with certificate that used to sign file. + + +```python +@property +def certificate_holder(self) -> aspose.words.digitalsignatures.CertificateHolder: + ... + +@certificate_holder.setter +def certificate_holder(self, value: aspose.words.digitalsignatures.CertificateHolder): + ... + +``` + +### Remarks + +The certificate in holder MUST contain private keys and have the X509KeyStorageFlags.Exportable flag set. + + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SignerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/signercontext/sign_options/_index.md b/english/python-net/aspose.words.lowcode/signercontext/sign_options/_index.md new file mode 100644 index 00000000000..3f62ccc4ea4 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/signercontext/sign_options/_index.md @@ -0,0 +1,32 @@ +--- +title: SignerContext.sign_options property +linktitle: sign_options property +articleTitle: sign_options property +second_title: Aspose.Words for Python +description: "SignerContext.sign_options property. SignOptions object with various signing options." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/signercontext/sign_options/ +--- + +## SignerContext.sign_options property + +SignOptions object with various signing options. + + +```python +@property +def sign_options(self) -> aspose.words.digitalsignatures.SignOptions: + ... + +@sign_options.setter +def sign_options(self, value: aspose.words.digitalsignatures.SignOptions): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SignerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/splitcriteria/_index.md b/english/python-net/aspose.words.lowcode/splitcriteria/_index.md new file mode 100644 index 00000000000..ed94ec76587 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitcriteria/_index.md @@ -0,0 +1,40 @@ +--- +title: SplitCriteria enumeration +linktitle: SplitCriteria enumeration +articleTitle: SplitCriteria enumeration +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.SplitCriteria enumeration. Specifies how the document is split into parts." +type: docs +weight: 200 +url: /python-net/aspose.words.lowcode/splitcriteria/ +--- + +## SplitCriteria enumeration + +Specifies how the document is split into parts. + + +### Members + +| Name | Description | +| --- | --- | +| PAGE | Specifies that the document is split into pages. | +| SECTION_BREAK | Specifies that the document is split into parts at a section break of any type. | +| STYLE | Specifies that the document is split into parts at a paragraph formatted using the style specified in [SplitOptions.split_style](../splitoptions/split_style/). | + +### Examples + +Shows how to split document by pages. + +```python +doc = MY_DIR + 'Big document.docx' +options = aw.lowcode.SplitOptions() +options.split_criteria = aw.lowcode.SplitCriteria.PAGE +aw.lowcode.Splitter.split(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SplitDocument.1.docx', options=options) +aw.lowcode.Splitter.split(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SplitDocument.2.docx', save_format=aw.SaveFormat.DOCX, options=options) +``` + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/splitoptions/__init__/_index.md b/english/python-net/aspose.words.lowcode/splitoptions/__init__/_index.md new file mode 100644 index 00000000000..ffa7654faff --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitoptions/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: SplitOptions constructor +linktitle: SplitOptions constructor +articleTitle: SplitOptions constructor +second_title: Aspose.Words for Python +description: "SplitOptions constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/splitoptions/__init__/ +--- + +## SplitOptions() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SplitOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/splitoptions/_index.md b/english/python-net/aspose.words.lowcode/splitoptions/_index.md new file mode 100644 index 00000000000..d9e6b897e6e --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitoptions/_index.md @@ -0,0 +1,32 @@ +--- +title: SplitOptions class +linktitle: SplitOptions class +articleTitle: SplitOptions class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.SplitOptions class. Specifies options how the document is split into parts." +type: docs +weight: 210 +url: /python-net/aspose.words.lowcode/splitoptions/ +--- + +## SplitOptions class + +Specifies options how the document is split into parts. + + +### Constructors +| Name | Description | +| --- | --- | +| [SplitOptions()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [split_criteria](./split_criteria/) | Specifies the criteria for splitting the document into parts. | +| [split_style](./split_style/) | Specifies the paragraph style for splitting the document into parts when [SplitCriteria.STYLE](../splitcriteria/#STYLE) is used. | + +### See Also + +* module [aspose.words.lowcode](../) + diff --git a/english/python-net/aspose.words.lowcode/splitoptions/split_criteria/_index.md b/english/python-net/aspose.words.lowcode/splitoptions/split_criteria/_index.md new file mode 100644 index 00000000000..6e6508d62a7 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitoptions/split_criteria/_index.md @@ -0,0 +1,44 @@ +--- +title: SplitOptions.split_criteria property +linktitle: split_criteria property +articleTitle: split_criteria property +second_title: Aspose.Words for Python +description: "SplitOptions.split_criteria property. Specifies the criteria for splitting the document into parts." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/splitoptions/split_criteria/ +--- + +## SplitOptions.split_criteria property + +Specifies the criteria for splitting the document into parts. + + +```python +@property +def split_criteria(self) -> aspose.words.lowcode.SplitCriteria: + ... + +@split_criteria.setter +def split_criteria(self, value: aspose.words.lowcode.SplitCriteria): + ... + +``` + +### Examples + +Shows how to split document by pages. + +```python +doc = MY_DIR + 'Big document.docx' +options = aw.lowcode.SplitOptions() +options.split_criteria = aw.lowcode.SplitCriteria.PAGE +aw.lowcode.Splitter.split(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SplitDocument.1.docx', options=options) +aw.lowcode.Splitter.split(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SplitDocument.2.docx', save_format=aw.SaveFormat.DOCX, options=options) +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SplitOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/splitoptions/split_style/_index.md b/english/python-net/aspose.words.lowcode/splitoptions/split_style/_index.md new file mode 100644 index 00000000000..8380f4a8e93 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitoptions/split_style/_index.md @@ -0,0 +1,33 @@ +--- +title: SplitOptions.split_style property +linktitle: split_style property +articleTitle: split_style property +second_title: Aspose.Words for Python +description: "SplitOptions.split_style property. Specifies the paragraph style for splitting the document into parts when [SplitCriteria.STYLE](../../splitcriteria/#STYLE) is used." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/splitoptions/split_style/ +--- + +## SplitOptions.split_style property + +Specifies the paragraph style for splitting the document into parts when [SplitCriteria.STYLE](../../splitcriteria/#STYLE) is used. + + + +```python +@property +def split_style(self) -> str: + ... + +@split_style.setter +def split_style(self, value: str): + ... + +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SplitOptions](../) + diff --git a/english/python-net/aspose.words.lowcode/splitter/_index.md b/english/python-net/aspose.words.lowcode/splitter/_index.md new file mode 100644 index 00000000000..336b71c31ad --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitter/_index.md @@ -0,0 +1,56 @@ +--- +title: Splitter class +linktitle: Splitter class +articleTitle: Splitter class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Splitter class. Provides methods intended to split the documents into parts using different criteria." +type: docs +weight: 220 +url: /python-net/aspose.words.lowcode/splitter/ +--- + +## Splitter class + +Provides methods intended to split the documents into parts using different criteria. + + +**Inheritance:** [Splitter](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ create(context)](./create/#splittercontext) | Creates new instance of the splitter processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ extract_pages(input_file_name, output_file_name, start_page_index, page_count)](./extract_pages/#str_str_int_int) | Extracts a specified range of pages from a document file and saves the extracted pages to a new file. The output file format is determined by the extension of the output file name. | +|[ extract_pages(input_file_name, output_file_name, save_format, start_page_index, page_count)](./extract_pages/#str_str_saveformat_int_int) | Extracts a specified range of pages from a document file and saves the extracted pages to a new file using the specified save format. | +|[ extract_pages(input_file_name, output_file_name, save_options, start_page_index, page_count)](./extract_pages/#str_str_saveoptions_int_int) | Extracts a specified range of pages from a document file and saves the extracted pages to a new file using the specified save format. | +|[ extract_pages(input_stream, output_stream, save_format, start_page_index, page_count)](./extract_pages/#bytesio_bytesio_saveformat_int_int) | Extracts a specified range of pages from a document stream and saves the extracted pages to an output stream using the specified save format. | +|[ extract_pages(input_stream, output_stream, save_options, start_page_index, page_count)](./extract_pages/#bytesio_bytesio_saveoptions_int_int) | Extracts a specified range of pages from a document stream and saves the extracted pages to an output stream using the specified save format. | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ remove_blank_pages(input_file_name, output_file_name)](./remove_blank_pages/#str_str) | Removes empty pages from the document and saves the output. Returns a list of page numbers that were removed. | +|[ remove_blank_pages(input_file_name, output_file_name, save_format)](./remove_blank_pages/#str_str_saveformat) | Removes empty pages from the document and saves the output in the specified format. Returns a list of page numbers that were removed. | +|[ remove_blank_pages(input_file_name, output_file_name, save_options)](./remove_blank_pages/#str_str_saveoptions) | Removes empty pages from the document and saves the output in the specified format. Returns a list of page numbers that were removed. | +|[ remove_blank_pages(input_stream, output_stream, save_format)](./remove_blank_pages/#bytesio_bytesio_saveformat) | Removes blank pages from a document provided in an input stream and saves the updated document to an output stream in the specified save format. Returns a list of page numbers that were removed. | +|[ remove_blank_pages(input_stream, output_stream, save_options)](./remove_blank_pages/#bytesio_bytesio_saveoptions) | Removes blank pages from a document provided in an input stream and saves the updated document to an output stream in the specified save format. Returns a list of page numbers that were removed. | +|[ split(input_file_name, output_file_name, options)](./split/#str_str_splitoptions) | Splits a document into multiple parts based on the specified split options and saves the resulting parts to files. The output file format is determined by the extension of the output file name. | +|[ split(input_file_name, output_file_name, save_format, options)](./split/#str_str_saveformat_splitoptions) | Splits a document into multiple parts based on the specified split options and saves the resulting parts to files in the specified save format. | +|[ split(input_file_name, output_file_name, save_options, options)](./split/#str_str_saveoptions_splitoptions) | Splits a document into multiple parts based on the specified split options and saves the resulting parts to files in the specified save format. | +|[ split(input_stream, save_format, options)](./split/#bytesio_saveformat_splitoptions) | Splits a document from an input stream into multiple parts based on the specified split options and returns the resulting parts as an array of streams in the specified save format. | +|[ split(input_stream, save_options, options)](./split/#bytesio_saveoptions_splitoptions) | Splits a document from an input stream into multiple parts based on the specified split options and returns the resulting parts as an array of streams in the specified save format. | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/splitter/create/_index.md b/english/python-net/aspose.words.lowcode/splitter/create/_index.md new file mode 100644 index 00000000000..fde9f28d113 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitter/create/_index.md @@ -0,0 +1,41 @@ +--- +title: Splitter.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "Splitter.create method. Creates new instance of the splitter processor." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/splitter/create/ +--- + +## create(context) {#splittercontext} + +Creates new instance of the splitter processor. + + +```python +def create(self, context: aspose.words.lowcode.SplitterContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [SplitterContext](../../splittercontext/) | | + +### Examples + +Shows how to split document by pages using context. + +```python +doc = MY_DIR + 'Big document.docx' +splitter_context = aw.lowcode.SplitterContext() +splitter_context.split_options.split_criteria = aw.lowcode.SplitCriteria.PAGE +aw.lowcode.Splitter.create(splitter_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.SplitContextDocument.docx').execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Splitter](../) + diff --git a/english/python-net/aspose.words.lowcode/splitter/extract_pages/_index.md b/english/python-net/aspose.words.lowcode/splitter/extract_pages/_index.md new file mode 100644 index 00000000000..a1b9e34214b --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitter/extract_pages/_index.md @@ -0,0 +1,129 @@ +--- +title: Splitter.extract_pages method +linktitle: extract_pages method +articleTitle: extract_pages method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Splitter.extract_pages method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/splitter/extract_pages/ +--- + +## extract_pages(input_file_name, output_file_name, start_page_index, page_count) {#str_str_int_int} + +Extracts a specified range of pages from a document file and saves the extracted pages +to a new file. The output file format is determined by the extension of the output file name. + + +```python +def extract_pages(self, input_file_name: str, output_file_name: str, start_page_index: int, page_count: int): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| start_page_index | int | The zero-based index of the first page to extract. | +| page_count | int | Number of pages to be extracted. | + +## extract_pages(input_file_name, output_file_name, save_format, start_page_index, page_count) {#str_str_saveformat_int_int} + +Extracts a specified range of pages from a document file and saves the extracted pages +to a new file using the specified save format. + + +```python +def extract_pages(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, start_page_index: int, page_count: int): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| start_page_index | int | The zero-based index of the first page to extract. | +| page_count | int | Number of pages to be extracted. | + +## extract_pages(input_file_name, output_file_name, save_options, start_page_index, page_count) {#str_str_saveoptions_int_int} + +Extracts a specified range of pages from a document file and saves the extracted pages +to a new file using the specified save format. + + +```python +def extract_pages(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, start_page_index: int, page_count: int): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| start_page_index | int | The zero-based index of the first page to extract. | +| page_count | int | Number of pages to be extracted. | + +## extract_pages(input_stream, output_stream, save_format, start_page_index, page_count) {#bytesio_bytesio_saveformat_int_int} + +Extracts a specified range of pages from a document stream and saves the extracted pages +to an output stream using the specified save format. + + +```python +def extract_pages(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, start_page_index: int, page_count: int): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| start_page_index | int | The zero-based index of the first page to extract. | +| page_count | int | Number of pages to be extracted. | + +## extract_pages(input_stream, output_stream, save_options, start_page_index, page_count) {#bytesio_bytesio_saveoptions_int_int} + +Extracts a specified range of pages from a document stream and saves the extracted pages +to an output stream using the specified save format. + + +```python +def extract_pages(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, start_page_index: int, page_count: int): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| start_page_index | int | The zero-based index of the first page to extract. | +| page_count | int | Number of pages to be extracted. | + +## Examples + +Shows how to extract pages from the document. + +```python +# There is a several ways to extract pages from the document: +doc = MY_DIR + 'Big document.docx' +aw.lowcode.Splitter.extract_pages(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.ExtractPages.1.docx', start_page_index=0, page_count=2) +aw.lowcode.Splitter.extract_pages(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.ExtractPages.2.docx', save_format=aw.SaveFormat.DOCX, start_page_index=0, page_count=2) +``` + +Shows how to extract pages from the document from the stream. + +```python +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.ExtractPagesStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Splitter.extract_pages(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, start_page_index=0, page_count=2) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Splitter](../) + diff --git a/english/python-net/aspose.words.lowcode/splitter/remove_blank_pages/_index.md b/english/python-net/aspose.words.lowcode/splitter/remove_blank_pages/_index.md new file mode 100644 index 00000000000..7049309c1b5 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitter/remove_blank_pages/_index.md @@ -0,0 +1,141 @@ +--- +title: Splitter.remove_blank_pages method +linktitle: remove_blank_pages method +articleTitle: remove_blank_pages method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Splitter.remove_blank_pages method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/splitter/remove_blank_pages/ +--- + +## remove_blank_pages(input_file_name, output_file_name) {#str_str} + +Removes empty pages from the document and saves the output. Returns a list of page numbers that were removed. + + +```python +def remove_blank_pages(self, input_file_name: str, output_file_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | + +### Returns + +List of page numbers has been considered as blank and removed. + + +## remove_blank_pages(input_file_name, output_file_name, save_format) {#str_str_saveformat} + +Removes empty pages from the document and saves the output in the specified format. Returns a list of page numbers that were removed. + + +```python +def remove_blank_pages(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | + +### Returns + +List of page numbers has been considered as blank and removed. + + +## remove_blank_pages(input_file_name, output_file_name, save_options) {#str_str_saveoptions} + +Removes empty pages from the document and saves the output in the specified format. Returns a list of page numbers that were removed. + + +```python +def remove_blank_pages(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | + +### Returns + +List of page numbers has been considered as blank and removed. + + +## remove_blank_pages(input_stream, output_stream, save_format) {#bytesio_bytesio_saveformat} + +Removes blank pages from a document provided in an input stream and saves the updated document +to an output stream in the specified save format. Returns a list of page numbers that were removed. + + +```python +def remove_blank_pages(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | + +### Returns + +List of page numbers has been considered as blank and removed. + + +## remove_blank_pages(input_stream, output_stream, save_options) {#bytesio_bytesio_saveoptions} + +Removes blank pages from a document provided in an input stream and saves the updated document +to an output stream in the specified save format. Returns a list of page numbers that were removed. + + +```python +def remove_blank_pages(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | + +### Returns + +List of page numbers has been considered as blank and removed. + + +## Examples + +Shows how to remove empty pages from the document. + +```python +# There is a several ways to remove empty pages from the document: +doc = MY_DIR + 'Blank pages.docx' +aw.lowcode.Splitter.remove_blank_pages(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.RemoveBlankPages.1.docx') +aw.lowcode.Splitter.remove_blank_pages(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.RemoveBlankPages.2.docx', save_format=aw.SaveFormat.DOCX) +``` + +Shows how to remove empty pages from the document from the stream. + +```python +with system_helper.io.FileStream(MY_DIR + 'Blank pages.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.RemoveBlankPagesStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Splitter.remove_blank_pages(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Splitter](../) + diff --git a/english/python-net/aspose.words.lowcode/splitter/split/_index.md b/english/python-net/aspose.words.lowcode/splitter/split/_index.md new file mode 100644 index 00000000000..316006af64c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splitter/split/_index.md @@ -0,0 +1,124 @@ +--- +title: Splitter.split method +linktitle: split method +articleTitle: split method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Splitter.split method" +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/splitter/split/ +--- + +## split(input_file_name, output_file_name, options) {#str_str_splitoptions} + +Splits a document into multiple parts based on the specified split options and saves +the resulting parts to files. The output file format is determined by the extension of the output file name. + + +```python +def split(self, input_file_name: str, output_file_name: str, options: aspose.words.lowcode.SplitOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name used to generate file name for document parts using rule "outputFile_partIndex.extension" | +| options | [SplitOptions](../../splitoptions/) | Document split options. | + +## split(input_file_name, output_file_name, save_format, options) {#str_str_saveformat_splitoptions} + +Splits a document into multiple parts based on the specified split options and saves +the resulting parts to files in the specified save format. + + +```python +def split(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, options: aspose.words.lowcode.SplitOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name used to generate file name for document parts using rule "outputFile_partIndex.extension" | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| options | [SplitOptions](../../splitoptions/) | Document split options. | + +## split(input_file_name, output_file_name, save_options, options) {#str_str_saveoptions_splitoptions} + +Splits a document into multiple parts based on the specified split options and saves +the resulting parts to files in the specified save format. + + +```python +def split(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, options: aspose.words.lowcode.SplitOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name used to generate file name for document parts using rule "outputFile_partIndex.extension" | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| options | [SplitOptions](../../splitoptions/) | Document split options. | + +## split(input_stream, save_format, options) {#bytesio_saveformat_splitoptions} + +Splits a document from an input stream into multiple parts based on the specified split options and +returns the resulting parts as an array of streams in the specified save format. + + +```python +def split(self, input_stream: io.BytesIO, save_format: aspose.words.SaveFormat, options: aspose.words.lowcode.SplitOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| options | [SplitOptions](../../splitoptions/) | Document split options. | + +## split(input_stream, save_options, options) {#bytesio_saveoptions_splitoptions} + +Splits a document from an input stream into multiple parts based on the specified split options and +returns the resulting parts as an array of streams in the specified save format. + + +```python +def split(self, input_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, options: aspose.words.lowcode.SplitOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| options | [SplitOptions](../../splitoptions/) | Document split options. | + +## Examples + +Shows how to split document by pages. + +```python +doc = MY_DIR + 'Big document.docx' +options = aw.lowcode.SplitOptions() +options.split_criteria = aw.lowcode.SplitCriteria.PAGE +aw.lowcode.Splitter.split(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SplitDocument.1.docx', options=options) +aw.lowcode.Splitter.split(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SplitDocument.2.docx', save_format=aw.SaveFormat.DOCX, options=options) +``` + +Shows how to split document from the stream by pages. + +```python +with system_helper.io.FileStream(MY_DIR + 'Big document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + options = aw.lowcode.SplitOptions() + options.split_criteria = aw.lowcode.SplitCriteria.PAGE + stream = aw.lowcode.Splitter.split(input_stream=stream_in, save_format=aw.SaveFormat.DOCX, options=options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Splitter](../) + diff --git a/english/python-net/aspose.words.lowcode/splittercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/splittercontext/__init__/_index.md new file mode 100644 index 00000000000..1ce83280a62 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splittercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: SplitterContext constructor +linktitle: SplitterContext constructor +articleTitle: SplitterContext constructor +second_title: Aspose.Words for Python +description: "SplitterContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/splittercontext/__init__/ +--- + +## SplitterContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SplitterContext](../) + diff --git a/english/python-net/aspose.words.lowcode/splittercontext/_index.md b/english/python-net/aspose.words.lowcode/splittercontext/_index.md new file mode 100644 index 00000000000..590b6fcdc38 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splittercontext/_index.md @@ -0,0 +1,48 @@ +--- +title: SplitterContext class +linktitle: SplitterContext class +articleTitle: SplitterContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.SplitterContext class. Document splitter context." +type: docs +weight: 230 +url: /python-net/aspose.words.lowcode/splittercontext/ +--- + +## SplitterContext class + +Document splitter context. + + +**Inheritance:** [SplitterContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [SplitterContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [split_options](./split_options/) | Document split options. | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Examples + +Shows how to split document by pages using context. + +```python +doc = MY_DIR + 'Big document.docx' +splitter_context = aw.lowcode.SplitterContext() +splitter_context.split_options.split_criteria = aw.lowcode.SplitCriteria.PAGE +aw.lowcode.Splitter.create(splitter_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.SplitContextDocument.docx').execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/splittercontext/split_options/_index.md b/english/python-net/aspose.words.lowcode/splittercontext/split_options/_index.md new file mode 100644 index 00000000000..5c64d6346ab --- /dev/null +++ b/english/python-net/aspose.words.lowcode/splittercontext/split_options/_index.md @@ -0,0 +1,39 @@ +--- +title: SplitterContext.split_options property +linktitle: split_options property +articleTitle: split_options property +second_title: Aspose.Words for Python +description: "SplitterContext.split_options property. Document split options." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/splittercontext/split_options/ +--- + +## SplitterContext.split_options property + +Document split options. + + +```python +@property +def split_options(self) -> aspose.words.lowcode.SplitOptions: + ... + +``` + +### Examples + +Shows how to split document by pages using context. + +```python +doc = MY_DIR + 'Big document.docx' +splitter_context = aw.lowcode.SplitterContext() +splitter_context.split_options.split_criteria = aw.lowcode.SplitCriteria.PAGE +aw.lowcode.Splitter.create(splitter_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.SplitContextDocument.docx').execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [SplitterContext](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarker/_index.md b/english/python-net/aspose.words.lowcode/watermarker/_index.md new file mode 100644 index 00000000000..101b836870a --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarker/_index.md @@ -0,0 +1,69 @@ +--- +title: Watermarker class +linktitle: Watermarker class +articleTitle: Watermarker class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Watermarker class. Provides methods intended to insert watermarks into the documents." +type: docs +weight: 240 +url: /python-net/aspose.words.lowcode/watermarker/ +--- + +## Watermarker class + +Provides methods intended to insert watermarks into the documents. + + +**Inheritance:** [Watermarker](./) → [Processor](../processor/) + +### Methods + +| Name | Description | +| --- | --- | +|[ create(context)](./create/#watermarkercontext) | Creates new instance of the watermarker processor. | +|[ execute()](../processor/execute/#default) | Execute the processor action.
(Inherited from [Processor](../processor/)) | +|[ from_file(input)](../processor/from_file/#str) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_file(input, load_options)](../processor/from_file/#str_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input)](../processor/from_stream/#bytesio) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ from_stream(input, load_options)](../processor/from_stream/#bytesio_loadoptions) | Specifies input document for processing.
(Inherited from [Processor](../processor/)) | +|[ set_image(input_file_name, output_file_name, watermark_image_file_name)](./set_image/#str_str_str) | Adds an image watermark into the document. | +|[ set_image(input_file_name, output_file_name, watermark_image_file_name, options)](./set_image/#str_str_str_imagewatermarkoptions) | Adds an image watermark into the document with options. | +|[ set_image(input_file_name, output_file_name, save_format, watermark_image_file_name)](./set_image/#str_str_saveformat_str) | Adds an image watermark into the document with options and specified save format. | +|[ set_image(input_file_name, output_file_name, save_format, watermark_image_file_name, options)](./set_image/#str_str_saveformat_str_imagewatermarkoptions) | Adds an image watermark into the document with options and specified save format. | +|[ set_image(input_file_name, output_file_name, save_options, watermark_image_file_name)](./set_image/#str_str_saveoptions_str) | Adds an image watermark into the document with options and specified save format. | +|[ set_image(input_file_name, output_file_name, save_options, watermark_image_file_name, options)](./set_image/#str_str_saveoptions_str_imagewatermarkoptions) | Adds an image watermark into the document with options and specified save format. | +|[ set_image(input_stream, output_stream, save_format, watermark_image_stream)](./set_image/#bytesio_bytesio_saveformat_bytesio) | | +|[ set_image(input_stream, output_stream, save_format, watermark_image_stream, options)](./set_image/#bytesio_bytesio_saveformat_bytesio_imagewatermarkoptions) | | +|[ set_image(input_stream, output_stream, save_options, watermark_image_stream)](./set_image/#bytesio_bytesio_saveoptions_bytesio) | | +|[ set_image(input_stream, output_stream, save_options, watermark_image_stream, options)](./set_image/#bytesio_bytesio_saveoptions_bytesio_imagewatermarkoptions) | | +|[ set_text(input_file_name, output_file_name, watermark_text)](./set_text/#str_str_str) | Adds a text watermark into the document. | +|[ set_text(input_file_name, output_file_name, watermark_text, options)](./set_text/#str_str_str_textwatermarkoptions) | Adds a text watermark into the document with options. | +|[ set_text(input_file_name, output_file_name, save_format, watermark_text)](./set_text/#str_str_saveformat_str) | Adds a text watermark into the document with options and specified save format. | +|[ set_text(input_file_name, output_file_name, save_format, watermark_text, options)](./set_text/#str_str_saveformat_str_textwatermarkoptions) | Adds a text watermark into the document with options and specified save format. | +|[ set_text(input_file_name, output_file_name, save_options, watermark_text)](./set_text/#str_str_saveoptions_str) | Adds a text watermark into the document with options and specified save format. | +|[ set_text(input_file_name, output_file_name, save_options, watermark_text, options)](./set_text/#str_str_saveoptions_str_textwatermarkoptions) | Adds a text watermark into the document with options and specified save format. | +|[ set_text(input_stream, output_stream, save_format, watermark_text)](./set_text/#bytesio_bytesio_saveformat_str) | Adds a text watermark into the document from streams with options. | +|[ set_text(input_stream, output_stream, save_format, watermark_text, options)](./set_text/#bytesio_bytesio_saveformat_str_textwatermarkoptions) | Adds a text watermark into the document from streams with options. | +|[ set_text(input_stream, output_stream, save_options, watermark_text)](./set_text/#bytesio_bytesio_saveoptions_str) | Adds a text watermark into the document from streams with options. | +|[ set_text(input_stream, output_stream, save_options, watermark_text, options)](./set_text/#bytesio_bytesio_saveoptions_str_textwatermarkoptions) | Adds a text watermark into the document from streams with options. | +|[ set_watermark_to_images(input_file_name, save_options, watermark_text)](./set_watermark_to_images/#str_imagesaveoptions_str) | Adds a text watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_file_name, save_options, watermark_text, options)](./set_watermark_to_images/#str_imagesaveoptions_str_textwatermarkoptions) | Adds a text watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_stream, save_options, watermark_text)](./set_watermark_to_images/#bytesio_imagesaveoptions_str) | Adds a text watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_stream, save_options, watermark_text, options)](./set_watermark_to_images/#bytesio_imagesaveoptions_str_textwatermarkoptions) | Adds a text watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_file_name, save_options, watermark_image_bytes)](./set_watermark_to_images/#str_imagesaveoptions_bytes) | Adds an image watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_file_name, save_options, watermark_image_bytes, options)](./set_watermark_to_images/#str_imagesaveoptions_bytes_imagewatermarkoptions) | Adds an image watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_stream, save_options, watermark_image_stream)](./set_watermark_to_images/#bytesio_imagesaveoptions_bytesio) | Adds an image watermark into the document with options. Renders the output to images. | +|[ set_watermark_to_images(input_stream, save_options, watermark_image_stream, options)](./set_watermark_to_images/#bytesio_imagesaveoptions_bytesio_imagewatermarkoptions) | Adds an image watermark into the document with options. Renders the output to images. | +|[ to_file(output)](../processor/to_file/#str) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_options)](../processor/to_file/#str_saveoptions) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_file(output, save_format)](../processor/to_file/#str_saveformat) | Specifies output file for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_options)](../processor/to_stream/#bytesio_saveoptions) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_stream(output, save_format)](../processor/to_stream/#bytesio_saveformat) | Specifies output stream for the processor.
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_options)](../processor/to_streams/#unknown_saveoptions) |
(Inherited from [Processor](../processor/)) | +|[ to_streams(output, save_format)](../processor/to_streams/#unknown_saveformat) |
(Inherited from [Processor](../processor/)) | + +### See Also + +* module [aspose.words.lowcode](../) +* class [Processor](../processor/) + diff --git a/english/python-net/aspose.words.lowcode/watermarker/create/_index.md b/english/python-net/aspose.words.lowcode/watermarker/create/_index.md new file mode 100644 index 00000000000..1db4b0b4c0f --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarker/create/_index.md @@ -0,0 +1,78 @@ +--- +title: Watermarker.create method +linktitle: create method +articleTitle: create method +second_title: Aspose.Words for Python +description: "Watermarker.create method. Creates new instance of the watermarker processor." +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/watermarker/create/ +--- + +## create(context) {#watermarkercontext} + +Creates new instance of the watermarker processor. + + +```python +def create(self, context: aspose.words.lowcode.WatermarkerContext): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [WatermarkerContext](../../watermarkercontext/) | | + +### Examples + +Shows how to insert watermark text to the document using context. + +```python +doc = MY_DIR + 'Big document.docx' +watermark_text = 'This is a watermark' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.text_watermark = watermark_text +watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextText.docx').execute() +``` + +Shows how to insert watermark text to the document from the stream using context. + +```python +watermark_text = 'This is a watermark' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.text_watermark = watermark_text + watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextTextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +Shows how to insert watermark image to the document using context. + +```python +doc = MY_DIR + 'Document.docx' +watermark_image = IMAGE_DIR + 'Logo.jpg' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) +watermarker_context.image_watermark_options.scale = 50 +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextImage.docx').execute() +``` + +Shows how to insert watermark image to the document from a stream using context. + +```python +watermark_image = IMAGE_DIR + 'Logo.jpg' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) + watermarker_context.image_watermark_options.scale = 50 + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextImageStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [Watermarker](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarker/set_image/_index.md b/english/python-net/aspose.words.lowcode/watermarker/set_image/_index.md new file mode 100644 index 00000000000..be175c3dca6 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarker/set_image/_index.md @@ -0,0 +1,246 @@ +--- +title: Watermarker.set_image method +linktitle: set_image method +articleTitle: set_image method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Watermarker.set_image method" +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/watermarker/set_image/ +--- + +## set_image(input_file_name, output_file_name, watermark_image_file_name) {#str_str_str} + +Adds an image watermark into the document. + + +```python +def set_image(self, input_file_name: str, output_file_name: str, watermark_image_file_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| watermark_image_file_name | str | Image that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_image(input_file_name, output_file_name, watermark_image_file_name, options) {#str_str_str_imagewatermarkoptions} + +Adds an image watermark into the document with options. + + +```python +def set_image(self, input_file_name: str, output_file_name: str, watermark_image_file_name: str, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| watermark_image_file_name | str | Image that is displayed as a watermark. | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | Defines additional options for the image watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_image(input_file_name, output_file_name, save_format, watermark_image_file_name) {#str_str_saveformat_str} + +Adds an image watermark into the document with options and specified save format. + + +```python +def set_image(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, watermark_image_file_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| watermark_image_file_name | str | Image that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_image(input_file_name, output_file_name, save_format, watermark_image_file_name, options) {#str_str_saveformat_str_imagewatermarkoptions} + +Adds an image watermark into the document with options and specified save format. + + +```python +def set_image(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, watermark_image_file_name: str, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| watermark_image_file_name | str | Image that is displayed as a watermark. | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | Defines additional options for the image watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_image(input_file_name, output_file_name, save_options, watermark_image_file_name) {#str_str_saveoptions_str} + +Adds an image watermark into the document with options and specified save format. + + +```python +def set_image(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, watermark_image_file_name: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| watermark_image_file_name | str | Image that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_image(input_file_name, output_file_name, save_options, watermark_image_file_name, options) {#str_str_saveoptions_str_imagewatermarkoptions} + +Adds an image watermark into the document with options and specified save format. + + +```python +def set_image(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, watermark_image_file_name: str, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| watermark_image_file_name | str | Image that is displayed as a watermark. | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | Defines additional options for the image watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_image(input_stream, output_stream, save_format, watermark_image_stream) {#bytesio_bytesio_saveformat_bytesio} + +```python +def set_image(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, watermark_image_stream: io.BytesIO): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | | +| output_stream | io.BytesIO | | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | | +| watermark_image_stream | io.BytesIO | | + +## set_image(input_stream, output_stream, save_format, watermark_image_stream, options) {#bytesio_bytesio_saveformat_bytesio_imagewatermarkoptions} + +```python +def set_image(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, watermark_image_stream: io.BytesIO, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | | +| output_stream | io.BytesIO | | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | | +| watermark_image_stream | io.BytesIO | | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | | + +## set_image(input_stream, output_stream, save_options, watermark_image_stream) {#bytesio_bytesio_saveoptions_bytesio} + +```python +def set_image(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, watermark_image_stream: io.BytesIO): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | | +| output_stream | io.BytesIO | | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | | +| watermark_image_stream | io.BytesIO | | + +## set_image(input_stream, output_stream, save_options, watermark_image_stream, options) {#bytesio_bytesio_saveoptions_bytesio_imagewatermarkoptions} + +```python +def set_image(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, watermark_image_stream: io.BytesIO, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | | +| output_stream | io.BytesIO | | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | | +| watermark_image_stream | io.BytesIO | | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | | + +## Examples + +Shows how to insert watermark image to the document. + +```python +doc = MY_DIR + 'Document.docx' +watermark_image = IMAGE_DIR + 'Logo.jpg' +aw.lowcode.Watermarker.set_image(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SetWatermarkImage.1.docx', watermark_image_file_name=watermark_image) +aw.lowcode.Watermarker.set_image(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SetWatermarkText.2.docx', save_format=aw.SaveFormat.DOCX, watermark_image_file_name=watermark_image) +options = aw.ImageWatermarkOptions() +options.scale = 50 +aw.lowcode.Watermarker.set_image(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SetWatermarkText.3.docx', watermark_image_file_name=watermark_image, options=options) +aw.lowcode.Watermarker.set_image(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.SetWatermarkText.4.docx', save_format=aw.SaveFormat.DOCX, watermark_image_file_name=watermark_image, options=options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Watermarker](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarker/set_text/_index.md b/english/python-net/aspose.words.lowcode/watermarker/set_text/_index.md new file mode 100644 index 00000000000..69e6caaa1ba --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarker/set_text/_index.md @@ -0,0 +1,307 @@ +--- +title: Watermarker.set_text method +linktitle: set_text method +articleTitle: set_text method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Watermarker.set_text method" +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/watermarker/set_text/ +--- + +## set_text(input_file_name, output_file_name, watermark_text) {#str_str_str} + +Adds a text watermark into the document. + + +```python +def set_text(self, input_file_name: str, output_file_name: str, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| watermark_text | str | Text that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_text(input_file_name, output_file_name, watermark_text, options) {#str_str_str_textwatermarkoptions} + +Adds a text watermark into the document with options. + + +```python +def set_text(self, input_file_name: str, output_file_name: str, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_text(input_file_name, output_file_name, save_format, watermark_text) {#str_str_saveformat_str} + +Adds a text watermark into the document with options and specified save format. + + +```python +def set_text(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| watermark_text | str | Text that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_text(input_file_name, output_file_name, save_format, watermark_text, options) {#str_str_saveformat_str_textwatermarkoptions} + +Adds a text watermark into the document with options and specified save format. + + +```python +def set_text(self, input_file_name: str, output_file_name: str, save_format: aspose.words.SaveFormat, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_text(input_file_name, output_file_name, save_options, watermark_text) {#str_str_saveoptions_str} + +Adds a text watermark into the document with options and specified save format. + + +```python +def set_text(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_text(input_file_name, output_file_name, save_options, watermark_text, options) {#str_str_saveoptions_str_textwatermarkoptions} + +Adds a text watermark into the document with options and specified save format. + + +```python +def set_text(self, input_file_name: str, output_file_name: str, save_options: aspose.words.saving.SaveOptions, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| output_file_name | str | The output file name. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF file. + + + + +## set_text(input_stream, output_stream, save_format, watermark_text) {#bytesio_bytesio_saveformat_str} + +Adds a text watermark into the document from streams with options. + + +```python +def set_text(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| watermark_text | str | Text that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## set_text(input_stream, output_stream, save_format, watermark_text, options) {#bytesio_bytesio_saveformat_str_textwatermarkoptions} + +Adds a text watermark into the document from streams with options. + + +```python +def set_text(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_format: aspose.words.SaveFormat, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_format | [SaveFormat](../../../aspose.words/saveformat/) | The save format. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## set_text(input_stream, output_stream, save_options, watermark_text) {#bytesio_bytesio_saveoptions_str} + +Adds a text watermark into the document from streams with options. + + +```python +def set_text(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## set_text(input_stream, output_stream, save_options, watermark_text, options) {#bytesio_bytesio_saveoptions_str_textwatermarkoptions} + +Adds a text watermark into the document from streams with options. + + +```python +def set_text(self, input_stream: io.BytesIO, output_stream: io.BytesIO, save_options: aspose.words.saving.SaveOptions, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| output_stream | io.BytesIO | The output stream. | +| save_options | [SaveOptions](../../../aspose.words.saving/saveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +### Remarks + +If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream. + +If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream. + + + + +## Examples + +Shows how to insert watermark text to the document. + +```python +doc = MY_DIR + 'Big document.docx' +watermark_text = 'This is a watermark' +aw.lowcode.Watermarker.set_text(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.WatermarkText.1.docx', watermark_text=watermark_text) +aw.lowcode.Watermarker.set_text(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.WatermarkText.2.docx', save_format=aw.SaveFormat.DOCX, watermark_text=watermark_text) +watermark_options = aw.TextWatermarkOptions() +watermark_options.color = aspose.pydrawing.Color.red +aw.lowcode.Watermarker.set_text(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.WatermarkText.3.docx', watermark_text=watermark_text, options=watermark_options) +aw.lowcode.Watermarker.set_text(input_file_name=doc, output_file_name=ARTIFACTS_DIR + 'LowCode.WatermarkText.4.docx', save_format=aw.SaveFormat.DOCX, watermark_text=watermark_text, options=watermark_options) +``` + +Shows how to insert watermark text to the document from the stream. + +```python +watermark_text = 'This is a watermark' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkTextStream.1.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.set_text(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, watermark_text=watermark_text) + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkTextStream.2.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + options = aw.TextWatermarkOptions() + options.color = aspose.pydrawing.Color.red + aw.lowcode.Watermarker.set_text(input_stream=stream_in, output_stream=stream_out, save_format=aw.SaveFormat.DOCX, watermark_text=watermark_text, options=options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Watermarker](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarker/set_watermark_to_images/_index.md b/english/python-net/aspose.words.lowcode/watermarker/set_watermark_to_images/_index.md new file mode 100644 index 00000000000..3cef4680b5c --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarker/set_watermark_to_images/_index.md @@ -0,0 +1,195 @@ +--- +title: Watermarker.set_watermark_to_images method +linktitle: set_watermark_to_images method +articleTitle: set_watermark_to_images method +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.Watermarker.set_watermark_to_images method" +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/watermarker/set_watermark_to_images/ +--- + +## set_watermark_to_images(input_file_name, save_options, watermark_text) {#str_imagesaveoptions_str} + +Adds a text watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | + +## set_watermark_to_images(input_file_name, save_options, watermark_text, options) {#str_imagesaveoptions_str_textwatermarkoptions} + +Adds a text watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +## set_watermark_to_images(input_stream, save_options, watermark_text) {#bytesio_imagesaveoptions_str} + +Adds a text watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, watermark_text: str): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | + +## set_watermark_to_images(input_stream, save_options, watermark_text, options) {#bytesio_imagesaveoptions_str_textwatermarkoptions} + +Adds a text watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, watermark_text: str, options: aspose.words.TextWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input file stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_text | str | Text that is displayed as a watermark. | +| options | [TextWatermarkOptions](../../../aspose.words/textwatermarkoptions/) | Defines additional options for the text watermark. | + +## set_watermark_to_images(input_file_name, save_options, watermark_image_bytes) {#str_imagesaveoptions_bytes} + +Adds an image watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, watermark_image_bytes: bytes): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_image_bytes | bytes | Image bytes that is displayed as a watermark. | + +## set_watermark_to_images(input_file_name, save_options, watermark_image_bytes, options) {#str_imagesaveoptions_bytes_imagewatermarkoptions} + +Adds an image watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_file_name: str, save_options: aspose.words.saving.ImageSaveOptions, watermark_image_bytes: bytes, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_file_name | str | The input file name. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_image_bytes | bytes | Image bytes that is displayed as a watermark. | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | Defines additional options for the image watermark. | + +## set_watermark_to_images(input_stream, save_options, watermark_image_stream) {#bytesio_imagesaveoptions_bytesio} + +Adds an image watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, watermark_image_stream: io.BytesIO): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_image_stream | io.BytesIO | Image stream that is displayed as a watermark. | + +## set_watermark_to_images(input_stream, save_options, watermark_image_stream, options) {#bytesio_imagesaveoptions_bytesio_imagewatermarkoptions} + +Adds an image watermark into the document with options. Renders the output to images. + + +```python +def set_watermark_to_images(self, input_stream: io.BytesIO, save_options: aspose.words.saving.ImageSaveOptions, watermark_image_stream: io.BytesIO, options: aspose.words.ImageWatermarkOptions): + ... +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| input_stream | io.BytesIO | The input stream. | +| save_options | [ImageSaveOptions](../../../aspose.words.saving/imagesaveoptions/) | The save options. | +| watermark_image_stream | io.BytesIO | Image stream that is displayed as a watermark. | +| options | [ImageWatermarkOptions](../../../aspose.words/imagewatermarkoptions/) | Defines additional options for the image watermark. | + +## Examples + +Shows how to insert watermark text to the document and save result to images. + +```python +doc = MY_DIR + 'Big document.docx' +watermark_text = 'This is a watermark' +images = aw.lowcode.Watermarker.set_watermark_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_text=watermark_text) +watermark_options = aw.TextWatermarkOptions() +watermark_options.color = aspose.pydrawing.Color.red +images = aw.lowcode.Watermarker.set_watermark_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_text=watermark_text, options=watermark_options) +``` + +Shows how to insert watermark text to the document from the stream and save result to images. + +```python +watermark_text = 'This is a watermark' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + images = aw.lowcode.Watermarker.set_watermark_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_text=watermark_text) + watermark_options = aw.TextWatermarkOptions() + watermark_options.color = aspose.pydrawing.Color.red + images = aw.lowcode.Watermarker.set_watermark_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_text=watermark_text, options=watermark_options) +``` + +Shows how to insert watermark image to the document and save result to images. + +```python +doc = MY_DIR + 'Document.docx' +watermark_image = IMAGE_DIR + 'Logo.jpg' +aw.lowcode.Watermarker.set_watermark_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_image_bytes=system_helper.io.File.read_all_bytes(watermark_image)) +options = aw.ImageWatermarkOptions() +options.scale = 50 +aw.lowcode.Watermarker.set_watermark_to_images(input_file_name=doc, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_image_bytes=system_helper.io.File.read_all_bytes(watermark_image), options=options) +``` + +Shows how to insert watermark image to the document from a stream and save result to images. + +```python +watermark_image = IMAGE_DIR + 'Logo.jpg' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + with system_helper.io.FileStream(watermark_image, system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as image_stream: + aw.lowcode.Watermarker.set_watermark_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_image_stream=image_stream) + options = aw.ImageWatermarkOptions() + options.scale = 50 + aw.lowcode.Watermarker.set_watermark_to_images(input_stream=stream_in, save_options=aw.saving.ImageSaveOptions(aw.SaveFormat.PNG), watermark_image_stream=image_stream, options=options) +``` + +## See Also + +* module [aspose.words.lowcode](../../) +* class [Watermarker](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarkercontext/__init__/_index.md b/english/python-net/aspose.words.lowcode/watermarkercontext/__init__/_index.md new file mode 100644 index 00000000000..857034ce681 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarkercontext/__init__/_index.md @@ -0,0 +1,23 @@ +--- +title: WatermarkerContext constructor +linktitle: WatermarkerContext constructor +articleTitle: WatermarkerContext constructor +second_title: Aspose.Words for Python +description: "WatermarkerContext constructor. " +type: docs +weight: 10 +url: /python-net/aspose.words.lowcode/watermarkercontext/__init__/ +--- + +## WatermarkerContext() {#default} + +```python +def __init__(self): + ... +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [WatermarkerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarkercontext/_index.md b/english/python-net/aspose.words.lowcode/watermarkercontext/_index.md new file mode 100644 index 00000000000..9efc6c15cf6 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarkercontext/_index.md @@ -0,0 +1,88 @@ +--- +title: WatermarkerContext class +linktitle: WatermarkerContext class +articleTitle: WatermarkerContext class +second_title: Aspose.Words for Python +description: "aspose.words.lowcode.WatermarkerContext class. Document watermarker context." +type: docs +weight: 250 +url: /python-net/aspose.words.lowcode/watermarkercontext/ +--- + +## WatermarkerContext class + +Document watermarker context. + + +**Inheritance:** [WatermarkerContext](./) → [ProcessorContext](../processorcontext/) + +### Constructors +| Name | Description | +| --- | --- | +| [WatermarkerContext()](./__init__/#default) | The default constructor. | + +### Properties + +| Name | Description | +| --- | --- | +| [font_settings](../processorcontext/font_settings/) | Font settings used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [image_watermark](./image_watermark/) | Image bytes to be used as a watermark. | +| [image_watermark_options](./image_watermark_options/) | Options for the text watermark. | +| [layout_options](../processorcontext/layout_options/) | Document layout options used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | +| [text_watermark](./text_watermark/) | Text to be used as a watermark. | +| [text_watermark_options](./text_watermark_options/) | Options for the image watermark. | +| [warning_callback](../processorcontext/warning_callback/) | Warning callback used by the processor.
(Inherited from [ProcessorContext](../processorcontext/)) | + +### Examples + +Shows how to insert watermark text to the document using context. + +```python +doc = MY_DIR + 'Big document.docx' +watermark_text = 'This is a watermark' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.text_watermark = watermark_text +watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextText.docx').execute() +``` + +Shows how to insert watermark text to the document from the stream using context. + +```python +watermark_text = 'This is a watermark' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.text_watermark = watermark_text + watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextTextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +Shows how to insert watermark image to the document using context. + +```python +doc = MY_DIR + 'Document.docx' +watermark_image = IMAGE_DIR + 'Logo.jpg' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) +watermarker_context.image_watermark_options.scale = 50 +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextImage.docx').execute() +``` + +Shows how to insert watermark image to the document from a stream using context. + +```python +watermark_image = IMAGE_DIR + 'Logo.jpg' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) + watermarker_context.image_watermark_options.scale = 50 + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextImageStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../) +* class [ProcessorContext](../processorcontext/) + diff --git a/english/python-net/aspose.words.lowcode/watermarkercontext/image_watermark/_index.md b/english/python-net/aspose.words.lowcode/watermarkercontext/image_watermark/_index.md new file mode 100644 index 00000000000..1e1a2ae3fb0 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarkercontext/image_watermark/_index.md @@ -0,0 +1,63 @@ +--- +title: WatermarkerContext.image_watermark property +linktitle: image_watermark property +articleTitle: image_watermark property +second_title: Aspose.Words for Python +description: "WatermarkerContext.image_watermark property. Image bytes to be used as a watermark." +type: docs +weight: 20 +url: /python-net/aspose.words.lowcode/watermarkercontext/image_watermark/ +--- + +## WatermarkerContext.image_watermark property + +Image bytes to be used as a watermark. + + +```python +@property +def image_watermark(self) -> bytes: + ... + +@image_watermark.setter +def image_watermark(self, value: bytes): + ... + +``` + +### Remarks + +If both [WatermarkerContext.image_watermark](./) and [WatermarkerContext.text_watermark](../text_watermark/) are specified, text watermark overrides image watermark. + + + +### Examples + +Shows how to insert watermark image to the document using context. + +```python +doc = MY_DIR + 'Document.docx' +watermark_image = IMAGE_DIR + 'Logo.jpg' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) +watermarker_context.image_watermark_options.scale = 50 +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextImage.docx').execute() +``` + +Shows how to insert watermark image to the document from a stream using context. + +```python +watermark_image = IMAGE_DIR + 'Logo.jpg' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) + watermarker_context.image_watermark_options.scale = 50 + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextImageStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [WatermarkerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarkercontext/image_watermark_options/_index.md b/english/python-net/aspose.words.lowcode/watermarkercontext/image_watermark_options/_index.md new file mode 100644 index 00000000000..0fd1f49b594 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarkercontext/image_watermark_options/_index.md @@ -0,0 +1,53 @@ +--- +title: WatermarkerContext.image_watermark_options property +linktitle: image_watermark_options property +articleTitle: image_watermark_options property +second_title: Aspose.Words for Python +description: "WatermarkerContext.image_watermark_options property. Options for the text watermark." +type: docs +weight: 30 +url: /python-net/aspose.words.lowcode/watermarkercontext/image_watermark_options/ +--- + +## WatermarkerContext.image_watermark_options property + +Options for the text watermark. + + +```python +@property +def image_watermark_options(self) -> aspose.words.ImageWatermarkOptions: + ... + +``` + +### Examples + +Shows how to insert watermark image to the document using context. + +```python +doc = MY_DIR + 'Document.docx' +watermark_image = IMAGE_DIR + 'Logo.jpg' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) +watermarker_context.image_watermark_options.scale = 50 +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextImage.docx').execute() +``` + +Shows how to insert watermark image to the document from a stream using context. + +```python +watermark_image = IMAGE_DIR + 'Logo.jpg' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.image_watermark = system_helper.io.File.read_all_bytes(watermark_image) + watermarker_context.image_watermark_options.scale = 50 + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextImageStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [WatermarkerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarkercontext/text_watermark/_index.md b/english/python-net/aspose.words.lowcode/watermarkercontext/text_watermark/_index.md new file mode 100644 index 00000000000..51ced2f8598 --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarkercontext/text_watermark/_index.md @@ -0,0 +1,63 @@ +--- +title: WatermarkerContext.text_watermark property +linktitle: text_watermark property +articleTitle: text_watermark property +second_title: Aspose.Words for Python +description: "WatermarkerContext.text_watermark property. Text to be used as a watermark." +type: docs +weight: 40 +url: /python-net/aspose.words.lowcode/watermarkercontext/text_watermark/ +--- + +## WatermarkerContext.text_watermark property + +Text to be used as a watermark. + + +```python +@property +def text_watermark(self) -> str: + ... + +@text_watermark.setter +def text_watermark(self, value: str): + ... + +``` + +### Remarks + +If both [WatermarkerContext.image_watermark](../image_watermark/) and [WatermarkerContext.text_watermark](./) are specified, text watermark overrides image watermark. + + + +### Examples + +Shows how to insert watermark text to the document using context. + +```python +doc = MY_DIR + 'Big document.docx' +watermark_text = 'This is a watermark' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.text_watermark = watermark_text +watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextText.docx').execute() +``` + +Shows how to insert watermark text to the document from the stream using context. + +```python +watermark_text = 'This is a watermark' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.text_watermark = watermark_text + watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextTextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [WatermarkerContext](../) + diff --git a/english/python-net/aspose.words.lowcode/watermarkercontext/text_watermark_options/_index.md b/english/python-net/aspose.words.lowcode/watermarkercontext/text_watermark_options/_index.md new file mode 100644 index 00000000000..a102e8562ca --- /dev/null +++ b/english/python-net/aspose.words.lowcode/watermarkercontext/text_watermark_options/_index.md @@ -0,0 +1,53 @@ +--- +title: WatermarkerContext.text_watermark_options property +linktitle: text_watermark_options property +articleTitle: text_watermark_options property +second_title: Aspose.Words for Python +description: "WatermarkerContext.text_watermark_options property. Options for the image watermark." +type: docs +weight: 50 +url: /python-net/aspose.words.lowcode/watermarkercontext/text_watermark_options/ +--- + +## WatermarkerContext.text_watermark_options property + +Options for the image watermark. + + +```python +@property +def text_watermark_options(self) -> aspose.words.TextWatermarkOptions: + ... + +``` + +### Examples + +Shows how to insert watermark text to the document using context. + +```python +doc = MY_DIR + 'Big document.docx' +watermark_text = 'This is a watermark' +watermarker_context = aw.lowcode.WatermarkerContext() +watermarker_context.text_watermark = watermark_text +watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red +aw.lowcode.Watermarker.create(watermarker_context).from_file(input=doc).to_file(output=ARTIFACTS_DIR + 'LowCode.WatermarkContextText.docx').execute() +``` + +Shows how to insert watermark text to the document from the stream using context. + +```python +watermark_text = 'This is a watermark' +with system_helper.io.FileStream(MY_DIR + 'Document.docx', system_helper.io.FileMode.OPEN, system_helper.io.FileAccess.READ) as stream_in: + watermarker_context = aw.lowcode.WatermarkerContext() + watermarker_context.text_watermark = watermark_text + watermarker_context.text_watermark_options.color = aspose.pydrawing.Color.red + with system_helper.io.FileStream(ARTIFACTS_DIR + 'LowCode.WatermarkContextTextStream.docx', system_helper.io.FileMode.CREATE, system_helper.io.FileAccess.READ_WRITE) as stream_out: + aw.lowcode.Watermarker.create(watermarker_context).from_stream(input=stream_in).to_stream(output=stream_out, save_format=aw.SaveFormat.DOCX).execute() +``` + +### See Also + +* module [aspose.words.lowcode](../../) +* class [WatermarkerContext](../) + diff --git a/english/python-net/aspose.words.mailmerging/_index.md b/english/python-net/aspose.words.mailmerging/_index.md index 42670e03594..229946bbaf5 100644 --- a/english/python-net/aspose.words.mailmerging/_index.md +++ b/english/python-net/aspose.words.mailmerging/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.mailmerging module second_title: Aspose.Words for Python description: "The aspose.words.mailmerging module contains classes of the original mail merge reporting engine." type: docs -weight: 160 +weight: 170 url: /python-net/aspose.words.mailmerging/ --- diff --git a/english/python-net/aspose.words.markup/_index.md b/english/python-net/aspose.words.markup/_index.md index c917f1906a1..786851d2f27 100644 --- a/english/python-net/aspose.words.markup/_index.md +++ b/english/python-net/aspose.words.markup/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.markup module second_title: Aspose.Words for Python description: "The aspose.words.markup module contains classes that represent customer defined semantics in a document: smart tags, custom XML and structured document tags (content controls)." type: docs -weight: 170 +weight: 180 url: /python-net/aspose.words.markup/ --- diff --git a/english/python-net/aspose.words.math/_index.md b/english/python-net/aspose.words.math/_index.md index 03c1726cdc0..0e468fe6b07 100644 --- a/english/python-net/aspose.words.math/_index.md +++ b/english/python-net/aspose.words.math/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.math module second_title: Aspose.Words for Python description: "The aspose.words.math module contains classes that represent Office Math elements." type: docs -weight: 180 +weight: 190 url: /python-net/aspose.words.math/ --- diff --git a/english/python-net/aspose.words.notes/_index.md b/english/python-net/aspose.words.notes/_index.md index a1c9fe61ed4..ae63b2f5d09 100644 --- a/english/python-net/aspose.words.notes/_index.md +++ b/english/python-net/aspose.words.notes/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.notes module second_title: Aspose.Words for Python description: "The aspose.words.notes module provides classes to work with Microsoft Word endnotes and footnotes." type: docs -weight: 190 +weight: 200 url: /python-net/aspose.words.notes/ --- diff --git a/english/python-net/aspose.words.properties/_index.md b/english/python-net/aspose.words.properties/_index.md index 4a2c40e2835..3132b46e86e 100644 --- a/english/python-net/aspose.words.properties/_index.md +++ b/english/python-net/aspose.words.properties/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.properties module second_title: Aspose.Words for Python description: "The aspose.words.properties module provides classes to work with custom and built-in document properties such as title, keywords, company etc." type: docs -weight: 200 +weight: 210 url: /python-net/aspose.words.properties/ --- diff --git a/english/python-net/aspose.words.rendering/_index.md b/english/python-net/aspose.words.rendering/_index.md index 12ee34af9d7..faffa3422fe 100644 --- a/english/python-net/aspose.words.rendering/_index.md +++ b/english/python-net/aspose.words.rendering/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.rendering module second_title: Aspose.Words for Python description: "The aspose.words.rendering module provides classes that allow to customize printing or rendering of documents." type: docs -weight: 210 +weight: 220 url: /python-net/aspose.words.rendering/ --- diff --git a/english/python-net/aspose.words.replacing/_index.md b/english/python-net/aspose.words.replacing/_index.md index 72853552821..6cae29d8ab8 100644 --- a/english/python-net/aspose.words.replacing/_index.md +++ b/english/python-net/aspose.words.replacing/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.replacing module second_title: Aspose.Words for Python description: "The aspose.words.replacing module provides classes to manipulate with find/replace operations over the document tree." type: docs -weight: 220 +weight: 230 url: /python-net/aspose.words.replacing/ --- diff --git a/english/python-net/aspose.words.replacing/findreplaceoptions/replacement_format/_index.md b/english/python-net/aspose.words.replacing/findreplaceoptions/replacement_format/_index.md index f5945c44f39..72ea069173d 100644 --- a/english/python-net/aspose.words.replacing/findreplaceoptions/replacement_format/_index.md +++ b/english/python-net/aspose.words.replacing/findreplaceoptions/replacement_format/_index.md @@ -28,7 +28,7 @@ def replacement_format(self, value: aspose.words.replacing.ReplacementFormat): ### Remarks -Has effect only when using in Aspose.Words.LowCode.Replacer +Has effect only when using in [Replacer](../../../aspose.words.lowcode/replacer/) diff --git a/english/python-net/aspose.words.reporting/_index.md b/english/python-net/aspose.words.reporting/_index.md index 02b1f77f3f4..e7ad18f3a08 100644 --- a/english/python-net/aspose.words.reporting/_index.md +++ b/english/python-net/aspose.words.reporting/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.reporting module second_title: Aspose.Words for Python description: "This module contains classes of the Aspose.Words' new reporting engine that supports report templates marked up with a language based on the LINQ Method Syntax." type: docs -weight: 230 +weight: 240 url: /python-net/aspose.words.reporting/ --- diff --git a/english/python-net/aspose.words.saving/_index.md b/english/python-net/aspose.words.saving/_index.md index d35859ad2e3..336b34e9e0e 100644 --- a/english/python-net/aspose.words.saving/_index.md +++ b/english/python-net/aspose.words.saving/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.saving module second_title: Aspose.Words for Python description: "The aspose.words.saving module provides classes and enumerations that allow to specify additional options for saving or converting documents." type: docs -weight: 240 +weight: 250 url: /python-net/aspose.words.saving/ --- diff --git a/english/python-net/aspose.words.settings/_index.md b/english/python-net/aspose.words.settings/_index.md index bf1bf19cfac..4fb729e0c4f 100644 --- a/english/python-net/aspose.words.settings/_index.md +++ b/english/python-net/aspose.words.settings/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.settings module second_title: Aspose.Words for Python description: "The aspose.words.settings module contains classes and enums that are used when specifying various settings and options stored in a document" type: docs -weight: 250 +weight: 260 url: /python-net/aspose.words.settings/ --- diff --git a/english/python-net/aspose.words.shaping/_index.md b/english/python-net/aspose.words.shaping/_index.md index 0a6e3f88fbd..b1035c343a2 100644 --- a/english/python-net/aspose.words.shaping/_index.md +++ b/english/python-net/aspose.words.shaping/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.shaping module second_title: Aspose.Words for Python description: "The aspose.words.shaping module contains classes to provide support for OpenType features using external text shaping engines." type: docs -weight: 260 +weight: 270 url: /python-net/aspose.words.shaping/ --- diff --git a/english/python-net/aspose.words.tables/_index.md b/english/python-net/aspose.words.tables/_index.md index df0880d2b30..8e7e1452481 100644 --- a/english/python-net/aspose.words.tables/_index.md +++ b/english/python-net/aspose.words.tables/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.tables module second_title: Aspose.Words for Python description: "The aspose.words.tables module contains classes that represent tables, rows, cells and their formatting." type: docs -weight: 270 +weight: 280 url: /python-net/aspose.words.tables/ --- diff --git a/english/python-net/aspose.words.themes/_index.md b/english/python-net/aspose.words.themes/_index.md index 765c74f7c84..243b85ebae6 100644 --- a/english/python-net/aspose.words.themes/_index.md +++ b/english/python-net/aspose.words.themes/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.themes module second_title: Aspose.Words for Python description: "The aspose.words.themes module provides classes that allow to access theme information in Microsoft Word documents." type: docs -weight: 280 +weight: 290 url: /python-net/aspose.words.themes/ --- diff --git a/english/python-net/aspose.words.vba/_index.md b/english/python-net/aspose.words.vba/_index.md index 04fed2d3e39..addb3bd97ca 100644 --- a/english/python-net/aspose.words.vba/_index.md +++ b/english/python-net/aspose.words.vba/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.vba module second_title: Aspose.Words for Python description: "The aspose.words.vba module provides classes to work with VBA projects." type: docs -weight: 290 +weight: 300 url: /python-net/aspose.words.vba/ --- diff --git a/english/python-net/aspose.words.webextensions/_index.md b/english/python-net/aspose.words.webextensions/_index.md index 176a64007c4..0290720c680 100644 --- a/english/python-net/aspose.words.webextensions/_index.md +++ b/english/python-net/aspose.words.webextensions/_index.md @@ -5,7 +5,7 @@ articleTitle: aspose.words.webextensions module second_title: Aspose.Words for Python description: "The aspose.words.webextensions module provides classes that allow to customize elements and attributes that extend the XML vocabulary for representing Office Add-ins." type: docs -weight: 300 +weight: 310 url: /python-net/aspose.words.webextensions/ ---