HtmlSaveOptions.ResourceFolder
HtmlSaveOptions.ResourceFolder property
Specifies a physical folder where all resources like images, fonts, and external CSS are saved when a document is exported to HTML. Default is an empty string.
public string ResourceFolder { get; set; }
Remarks
ResourceFolder
is the simplest way to specify a folder where all resources should be written. Another way is to use individual properties FontsFolder
, ImagesFolder
, and CssStyleSheetFileName
.
ResourceFolder
has a lower priority than folders specified via FontsFolder
, ImagesFolder
, and CssStyleSheetFileName
. For example, if both ResourceFolder
and FontsFolder
are specified, fonts will be saved to FontsFolder
, while images and CSS will be saved to ResourceFolder
.
If the folder specified by ResourceFolder
doesn’t exist, it will be created automatically.
Examples
Shows how to configure folder where external resource are stored while exporting document to HTML.
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.ResourceFolder = ArtifactsDir + "resources";
htmlSaveOptions.ImagesFolderAlias = "resources";
htmlSaveOptions.ExportFontResources = true;
htmlSaveOptions.CssStyleSheetType = HtmlCssStyleSheetType.External;
Converter.Create()
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "HtmlSaveOptions.ResourceFolder.html", htmlSaveOptions)
.Execute();
See Also
- class HtmlSaveOptions
- namespace Wordize.Saving
- assembly Wordize