LoadOptions.TempFolder
LoadOptions TempFolder property. Allows to use temporary files when reading document. By default this property is null and no temporary files are used.
LoadOptions.TempFolder property
Allows to use temporary files when reading document. By default this property is null
and no temporary files are used.
public string TempFolder { get; set; }
Remarks
The folder must exist and be writable, otherwise an exception will be thrown.
Wordize automatically deletes all temporary files when reading is complete.
Examples
Shows how to reduce Wordize memory footprint.
string tempDir = ArtifactsDir + "TempFiles";
// The specified temporary folder must exist in the local file system.
Directory.CreateDirectory(tempDir);
SaveOptions so = SaveOptions.CreateSaveOptions(SaveFormat.Docx);
so.MemoryOptimization = true;
so.TempFolder = tempDir;
LoadOptions lo = new LoadOptions();
lo.TempFolder = tempDir;
Converter.Create()
.From(MyDir + "Simple.docx", lo)
.To(ArtifactsDir + "SaveOptions.MemoryOptimization.docx", so)
.Execute();
See Also
- class LoadOptions
- namespace Wordize.Loading
- assembly Wordize