document_part_stream property

DocumentPartSavingArgs.document_part_stream property

Allows to specify the stream where the document part will be saved to.

@property
def document_part_stream(self) -> io.BytesIO:
    ...

@document_part_stream.setter
def document_part_stream(self, value: io.BytesIO):
    ...

Remarks

This property allows you to save document parts to streams instead of files during HTML export.

The default value is None. When this property is None, the document part will be saved to a file specified in the DocumentPartSavingArgs.document_part_file_name property.

When saving to a stream in HTML format is requested by Document.save() or Document.save() and first document part is about to be saved, Aspose.Words suggests here the main output stream initially passed by the caller.

When saving to EPUB format that is a container format based on HTML, DocumentPartSavingArgs.document_part_stream cannot be specified because all subsidiary parts will be encapsulated into a single output package.

See Also