export_language_to_span_tag property
PdfSaveOptions.export_language_to_span_tag property
Gets or sets a value determining whether or not to create a “Span” tag in the document structure to export the text language.
@property
def export_language_to_span_tag(self) -> bool:
...
@export_language_to_span_tag.setter
def export_language_to_span_tag(self, value: bool):
...
Remarks
Default value is False
and “Lang” attribute is attached to a marked-content sequence in a page content stream.
When the value is True
“Span” tag is created for the text with non-default language
and “Lang” attribute is attached to this tag.
This value is ignored when PdfSaveOptions.export_document_structure is False
.
Examples
Shows how to create a “Span” tag in the document structure to export the text language.
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
builder.writeln('Hello world!')
builder.writeln('Hola mundo!')
save_options = aw.saving.PdfSaveOptions()
save_options.export_document_structure = True
save_options.export_language_to_span_tag = True
doc.save(file_name=ARTIFACTS_DIR + 'PdfSaveOptions.ExportLanguageToSpanTag.pdf', save_options=save_options)
See Also
- module aspose.words.saving
- class PdfSaveOptions