Property SourceFormat
- Namespace
- DocWright
- Assembly
- DocWright.dll
SourceFormat
Gets or sets how the input stream is interpreted. Defaults to Auto, which sniffs the stream.
public FormatDetection SourceFormat { get; set; }
Property Value
Remarks
Two inputs need this and are otherwise unreachable through the stream entry points. Plain text is never auto-detected — every byte sequence is valid plain text, so a sniff that accepted one would claim every stream no other reader recognized — and Markdown is recognized by the weakest sniff in the registry, so a caller who knows the format should say so rather than depend on a heuristic that the format ahead of it in the probe order could take first.
Honoured by Convert(Stream, Stream, ConvertOptions?),
ConvertAsync(Stream, Stream, ConvertOptions?, CancellationToken),
ConvertToImages(Stream, ImageRenderOptions, ConvertOptions?)
and Load(Stream, FormatDetection, ConvertOptions?),
whose own formatDetection argument wins when it is not Auto.
It does not apply to ConvertPdfToImages(Stream, ImageRenderOptions, ConvertOptions?),
which reads PDF and consults no reader registry, nor to the overloads that take an
already-loaded WordDocument.