SVGDocument.Save

Save(Url)

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.

public void Save(Url url)
ParameterTypeDescription
urlUrlLocal URL to output file.

Exceptions

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

See Also


Save(string)

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.

public void Save(string path)
ParameterTypeDescription
pathStringLocal path to output file.

Exceptions

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

See Also


Save(ResourceHandler)

Saves the document content and resources using the ResourceHandler.

public void Save(ResourceHandler resourceHandler)
ParameterTypeDescription
resourceHandlerResourceHandlerThe resource handler ResourceHandler.

See Also


Save(string, SVGSaveFormat)

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”.

public void Save(string path, SVGSaveFormat saveFormat)
ParameterTypeDescription
pathStringLocal path to output file.
saveFormatSVGSaveFormatFormat in which document is saved.

Exceptions

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

See Also


Save(ResourceHandlerSVGSaveFormat)

Saves the document content and resources using the ResourceHandler.

public void Save(ResourceHandler resourceHandler, SVGSaveFormat saveFormat)
ParameterTypeDescription
resourceHandlerResourceHandlerThe resource handler ResourceHandler.
saveFormatSVGSaveFormatFormat in which document is saved.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionThrown when the specified saveFormat value is not recognised by the current implementation.

See Also


Save(string, SVGSaveOptions)

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.

public void Save(string path, SVGSaveOptions saveOptions)
ParameterTypeDescription
pathStringAbsolute or relative path of the target .svg file.
saveOptionsSVGSaveOptionsOptions that control plain-SVG serialization.

Exceptions

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

See Also


Save(ResourceHandlerSVGSaveOptions)

Saves the document content and resources using the ResourceHandler.

public void Save(ResourceHandler resourceHandler, SVGSaveOptions saveOptions)
ParameterTypeDescription
resourceHandlerResourceHandlerThe resource handler ResourceHandler.
saveOptionsSVGSaveOptionsSVG save options.

See Also


Save(UrlSVGSaveFormat)

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”.

public void Save(Url url, SVGSaveFormat saveFormat)
ParameterTypeDescription
urlUrlLocal URL to output file.
saveFormatSVGSaveFormatFormat in which document is saved.

Exceptions

exceptioncondition
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 saveFormat value is not recognised by the current implementation.

See Also


Save(UrlSVGSaveOptions)

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

public void Save(Url url, SVGSaveOptions saveOptions)
ParameterTypeDescription
urlUrlLocal path of the target .svg file.
saveOptionsSVGSaveOptionsOptions that control plain-SVG serialization.

Exceptions

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

See Also


Save(UrlSVGZSaveOptions)

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

public void Save(Url url, SVGZSaveOptions saveOptions)
ParameterTypeDescription
urlUrlLocal path of the target .svgz file.
saveOptionsSVGZSaveOptionsOptions that control SVGZ serialization.

Exceptions

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

See Also


Save(ResourceHandlerSVGZSaveOptions)

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

public void Save(ResourceHandler resourceHandler, SVGZSaveOptions saveOptions)
ParameterTypeDescription
resourceHandlerResourceHandlerThe resource handler to manage document resources, such as file system or memory-based storage.
saveOptionsSVGZSaveOptionsOptions that specify additional saving parameters, such as vectorization preferences.

See Also


Save(string, SVGZSaveOptions)

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.

public void Save(string path, SVGZSaveOptions saveOptions)
ParameterTypeDescription
pathStringAbsolute or relative path of the target .svgz file.
saveOptionsSVGZSaveOptionsOptions that control SVGZ serialization.

Exceptions

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

See Also