' Let's save our document to a MemoryStream.įile.WriteAllBytes(fileHtmlFixed, fileData)ĭc.Save(ms, New HtmlFlowingSaveOptions())įile. I have created a program that merges files and I have decided to output the results as an HTML document so that it is legible. ' Assume we already have a document 'dc'.ĭc.("Hey Guys and Girls!") ' There variables are necessary only for demonstration purposes.ĭim fileHtmlFixed As String = "Fixed-as-stream.html"ĭim fileHtmlFlowing As String = "Flowing-as-stream.html" ''' Creates a new document and saves it as HTML documents (in the Fixed and Flowing modes) using MemoryStream. Open the results for demonstration purposes. ListExportMode = HtmlListExportMode.ByHtmlTags String fileHtmlFixed = fileHtmlFlowing = Save to HTML file: HtmlFixed.ĭc.Save(fileHtmlFixed, new HtmlFixedSaveOptions()ĭc.Save(fileHtmlFlowing, new HtmlFlowingSaveOptions() String inputFile = dc = DocumentCore.Load(inputFile) / Open an existing document and saves it as HTML files (in the Fixed and Flowing modes). Using (MemoryStream ms = new MemoryStream())ĭc.Save(ms, new HtmlFlowingSaveOptions()) Let's save our document to a MemoryStream. In HTML flowing mode the component renders HTML as a flow document without any absolute In HTML fixed mode the component renders HTML markup using absolutely positioned elements. Options which affects to the saving process. In HtmlFixedSaveOptions or HtmlFlowingSaveOptions you can also set various Specify HtmlFixedSaveOptions or HtmlFlowingSaveOptions as 2nd new HtmlFixedSaveOptions()) The file format will be detected automatically from the file extension: not rely on the file extension and guarantee that the file contents is really HTML, you may How to save a document in HTML format C# and VB.Net
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |