save method

save

Saves the document to local file specified by url. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + “_files”. If the specified url ends with “.svgz”, the document will be saved as a compressed SVGZ file.

def save(self, url):
    ...
ParameterTypeDescription
urlUrlLocal URL to output file.

Exceptions

ExceptionDescription
ArgumentExceptionRaised if the specified url is not a valid local file URL.

save

Saves the document to local file specified by path. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + “_files”. If the specified url ends with “.svgz”, the document will be saved as a compressed SVGZ file.

def save(self, path):
    ...
ParameterTypeDescription
pathstrLocal path to output file.

Exceptions

ExceptionDescription
ArgumentExceptionRaised if the specified path is not a valid local file path.

save

Saves the document content and resources using the ResourceHandler.

def save(self, resource_handler):
    ...
ParameterTypeDescription
resource_handleraspose.svg.saving.resourcehandlers.ResourceHandlerThe resource handler ResourceHandler.

save

Saves the document to local file specified by path. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + “_files”.

def save(self, path, save_format):
    ...
ParameterTypeDescription
pathstrLocal path to output file.
save_formataspose.svg.saving.SVGSaveFormatFormat in which document is saved.

Exceptions

ExceptionDescription
ArgumentExceptionRaised if the specified path is not a valid local file path.
ArgumentOutOfRangeExceptionThrown when the specified save_format value is not recognised by the current implementation.

save

Saves the document content and resources using the ResourceHandler.

def save(self, resource_handler, save_format):
    ...
ParameterTypeDescription
resource_handleraspose.svg.saving.resourcehandlers.ResourceHandlerThe resource handler ResourceHandler.
save_formataspose.svg.saving.SVGSaveFormatFormat in which document is saved.

Exceptions

ExceptionDescription
ArgumentOutOfRangeExceptionThrown when the specified save_format value is not recognised by the current implementation.

save

Saves the document as an .svg file to the local path specified by path.
Any external resources are written to a sibling folder named {output_file_name}_files.

def save(self, path, save_options):
    ...
ParameterTypeDescription
pathstrAbsolute or relative path of the target .svg file.
save_optionsaspose.svg.saving.SVGSaveOptionsOptions that control plain-SVG serialization.

Exceptions

ExceptionDescription
ArgumentExceptionThrown if path is not a valid local file path.

save

Saves the document content and resources using the ResourceHandler.

def save(self, resource_handler, save_options):
    ...
ParameterTypeDescription
resource_handleraspose.svg.saving.resourcehandlers.ResourceHandlerThe resource handler ResourceHandler.
save_optionsaspose.svg.saving.SVGSaveOptionsSVG save options.

save

Saves the document to local file specified by url. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + “_files”.

def save(self, url, save_format):
    ...
ParameterTypeDescription
urlUrlLocal URL to output file.
save_formataspose.svg.saving.SVGSaveFormatFormat in which document is saved.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when url does not represent a valid local file location (e.g., it is null, relative, or points to a non-file scheme).
ArgumentOutOfRangeExceptionThrown when the supplied save_format value is not recognised by the current implementation.

save

Saves the document as an .svg file to url. All external resources are placed in a sibling folder named {output_file_name}_files.

def save(self, url, save_options):
    ...
ParameterTypeDescription
urlUrlLocal path of the target .svg file.
save_optionsaspose.svg.saving.SVGSaveOptionsOptions that control plain-SVG serialization.

Exceptions

ExceptionDescription
ArgumentExceptionThrown if url is not a valid local file path.

save

Saves the document as a compressed .svgz file to url. All external resources are placed in a sibling folder named {output_file_name}_files.

def save(self, url, save_options):
    ...
ParameterTypeDescription
urlUrlLocal path of the target .svgz file.
save_optionsaspose.svg.saving.SVGZSaveOptionsOptions that control SVGZ serialization.

Exceptions

ExceptionDescription
ArgumentExceptionThrown if url is not a valid local file path.

save

Saves the document content and associated resources using the specified ResourceHandler.

def save(self, resource_handler, save_options):
    ...
ParameterTypeDescription
resource_handleraspose.svg.saving.resourcehandlers.ResourceHandlerThe resource handler to manage document resources, such as file system or memory-based storage.
save_optionsaspose.svg.saving.SVGZSaveOptionsOptions that specify additional saving parameters, such as vectorization preferences.

save

Saves the document as a compressed .svgz file to the local path specified by path. Any external resources are written to a sibling folder named {output_file_name}_files.

def save(self, path, save_options):
    ...
ParameterTypeDescription
pathstrAbsolute or relative path of the target .svgz file.
save_optionsaspose.svg.saving.SVGZSaveOptionsOptions that control SVGZ serialization.

Exceptions

ExceptionDescription
ArgumentExceptionThrown if path is not a valid local file path.

See Also