ConverterContext class
ConverterContext class
Document converter context
Inheritance: ConverterContext → ProcessorContext
Constructors
| Name | Description |
|---|---|
| ConverterContext() | The default constructor. |
Properties
| Name | Description |
|---|---|
| font_settings | Font settings used by the processor. (Inherited from ProcessorContext) |
| layout_options | Document layout options used by the processor. (Inherited from ProcessorContext) |
| warning_callback | Warning callback used by the processor. (Inherited from ProcessorContext) |
Examples
Shows how to convert documents with a single line of code using context.
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