convert method
Contents
[
Hide
]convert(input_file, output_file)
Converts the given input document into the output document using specified input output file names and its extensions.
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. |
convert(input_file, output_file, save_format)
Converts the given input document into the output document using specified input output file names and the final document format.
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 | The save format. |
convert(input_file, output_file, save_options)
Converts the given input document into the output document using specified input output file names and save options.
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 | The save options. |
convert(input_stream, output_stream, save_format)
Converts the given input document into a single output document using specified input and output streams.
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 | The save format. |
convert(input_stream, output_stream, save_options)
Converts the given input document into a single output document using specified input and output streams.
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 | The save options. |
Examples
Shows how to convert documents with a single line of code.
aw.lowcode.Converter.convert(input_file=MY_DIR + 'Document.docx', output_file=ARTIFACTS_DIR + 'LowCode.Convert.pdf')
aw.lowcode.Converter.convert(input_file=MY_DIR + 'Document.docx', output_file=ARTIFACTS_DIR + 'LowCode.Convert.rtf', save_format=aw.SaveFormat.RTF)
save_options = aw.saving.OoxmlSaveOptions()
save_options.password = 'Aspose.Words'
aw.lowcode.Converter.convert(input_file=MY_DIR + 'Document.doc', output_file=ARTIFACTS_DIR + 'LowCode.Convert.docx', save_options=save_options)
See Also
- module aspose.words.lowcode
- class Converter