How to add HTML to Word converting function into any .NET application
News: politics, sport, technologies, health – this is the information necessary for work and life. It is probably some of the most important components of the life of modern society and of each of us in particular. We always try to be well informed about all events, to be aware of everything. Ratings of paper publications are gradually falling, now we prefer to get to know about everything happening around us from Internet. While browsing great spaces of the Net, probably everybody comes across the situation when it is necessary to process requisite information from HTML – page, to read or to print information later offline – news with which you can get familiar at leisure, the information which you can further use as information directory already without addressing the net etc. There can be the situation when you don’t have time to copy requisite information from a site and insert it into WORD-document as you did it before – it is inconvenient or just there is no enough time. You need operatively to process data of an order, or a form entered by a client in an online shop or in an office and to form a document ready for printing.
We tried to take into consideration all these situations! SautinSoft Company presents to your attention HTML to RTF Pro DLL.Net component which allows a developer to create applications converting HTML format into RTF or TXT documents on-the-fly. RTF format is one of the most wide-spread formats for editing office documents because it can be opened on any platform: Windows, Mac, Linux, Android without setting-up additional software support. The use of already ready-made library HTML-to-RTF Pro DLL.Net will allow immediately add functions of HTML conversion to save time and costs for elaboration of such solution. The Component has a lot of useful abilities: it doesn’t require installed Microsoft Word ® (or other text applications). Applications with the use of this component allow users to convert web-pages in any languages: Russian, English, Japanese, Chinese and others. Obtained RTF-files totally keep structure of HTML contents, text display, font, color, style, tables, images of formats GIF, JPEG, BMP, PNG.
Here there is an example given in C# language showing how you can convert HTML document into RTF format:
SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf(); h.PageStyle.PageSize.Letter(); h.ConvertFile(@"c:\News.html", @"c:\News-editable.rtf"); And now let’s convert HTML string into the text in C#: SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf(); h.OutputFormat = SautinSoft.HtmlToRtf.eOutputFormat.TextUnicode; string html = " Alexander Sergeyevich Pushkin was a Russian author of the Romantic era "; string text = h.ConvertString(html);
If you need a new code example or have a question: email us at firstname.lastname@example.org or ask at Online Chat (right-bottom corner of this page) or use the Form below: