Load from a stream
Leave feedback
When the source document is not a file on disk (e.g., downloaded from a network, read from a database, or received as an upload), you can pass a Stream directly to the MarkdownConverter constructor.
The stream is copied internally, so you may close it immediately after creating the converter.
using System.IO;
using GroupDocs.Markdown;
using Stream stream = File.OpenRead("business-plan.docx");
using var converter = new MarkdownConverter(stream);
converter.Convert("load-stream-example.md");
business-plan.docx is a sample file used in this example. Click here to download it.
;
var loadOptions = new LoadOptions(FileFormat.Docx);
using var converter = new MarkdownConverter(stream, loadOptions);
converter.Convert("load-stream-options.md");
| HOME BASED | | |
| --- | --- | --- |
| | | |
| PROFESSIONAL SERVICES | | |
| | Business Plan | |
| | TABLE OF CONTENTS TOC \o "1-3" \h \z \u HYPERLINK \l "_Toc9437451" Introduction PAGEREF _Toc9437451 \h 3 HYPERLINK \l "_Toc9437452" 1. Executive Summary PAGEREF _Toc9437452 \h 5 HYPERLINK \l "_Toc9437453" 2. Company Overview PAGEREF _Toc9437453 \h 6 HYPERLINK \l "_Toc9437454" 3. Business Description PAGEREF _Toc9437454 \h 7 HYPERLINK \l "_Toc9437
[TRUNCATED]
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.