ResourceSavingArgs class

ResourceSavingArgs class

Provides data for the Aspose.Words.Saving.IResourceSavingCallback.ResourceSaving(Aspose.Words.Saving.ResourceSavingArgs) event. To learn more, visit the Save a Document documentation article.

Remarks

By default, when Aspose.Words saves a document to fixed page HTML or SVG, it saves each resource into a separate file. Aspose.Words uses the document file name and a unique number to generate unique file name for each resource found in the document.

ResourceSavingArgs allows to redefine how resource file names are generated or to completely circumvent saving of resources into files by providing your own stream objects.

To apply your own logic for generating resource file names use the ResourceSavingArgs.resourceFileName property.

To save resources into streams instead of files, use the Aspose.Words.Saving.ResourceSavingArgs.ResourceStream property.

Properties

NameDescription
documentGets the document object that is currently being saved.
keepResourceStreamOpenSpecifies whether Aspose.Words should keep the stream open or close it after saving a resource.
resourceFileNameGets or sets the file name (without path) where the resource will be saved to.
resourceFileUriGets or sets the uniform resource identifier (URI) used to reference the resource file from the document.

See Also