Page tree
Skip to end of metadata
Go to start of metadata
Icon

HTMLToWord is an open source project from SoftArtisans. It can be downloaded from SourceForge.net.

 

HTMLToWord

Use the HTMLToWord object to insert well-formed HTML (XHTML) text into a WordWriter Document object. You can specify a style to use when inserting text or use the document's default style. You can also specify whether to insert text after a specific element or at the end of a document.

  • HTMLToWord.DebugLogLevelSets the amount of information written to the debug log file. To create a log file, you must also specify the full path of the file in the HTMLToWord.LogFileName property. If no errors occur then HTMLToWord does not generate a log file.
  • HTMLToWord.FormatDelegateUser-assigned delegate method that is called after HTMLToWord inserts an Element into the Word document. The user may implement code to perform additional formatting or post-processing on the Element inserted into the document. If this delegate is not set, HTMLToWord simply continues processing.
  • HTMLToWord.FormatElementDelegateType for user-defined delegate method called by HTMLToWord after inserting an element.
  • HTMLToWord.GetImageDelegateType for user-defined delegate method called by HTMLToWord when an HTML img tag is encountered.
  • HTMLToWord.HTMLInsertPropertiesThe HTMLInsertProperties object is a container for properties that control the behavior of HTMLToWord. You can control how HTMLToWord handles HTML tags that it does not explicitly support, as well as set the default font used when inserting text into the Word document.
  • HTMLToWord.HTMLInsertProperties.AcceptUnknownTagsControls how unknown tags are handled. If set to false, HTMLToWord will throw an HTMLToWordException if it encounters a tag that it does not explicitly know how to handle. If set to true, HTMLToWord will attempt to process the tag. See the IncludeContentsOfUnknownTags for further user-controlable behavior.
  • HTMLToWord.HTMLInsertProperties.DefaultFontSpecifies the font to use when inserting text. This property is temporarily overridden by the tag in the XHTML. If this property is not set, the document's default font is used.
  • HTMLToWord.HTMLInsertProperties.IncludeContentsOfUnknownTagsControls how the contents of unsupported tags are handled. If set to true, the contents of unsupported tags are inserted into the document as text. If set to false, the contents of unsupported tags are ignored.
  • HTMLToWord.HTMLTagActionReturn value from the user-supplied InsertElementDelegate delegate method. Controls how HTMLToWord handles an XHTML tag.
  • HTMLToWord.ImageDelegateUser-assigned delegate method that allows users to provide an implementation for retrieving the contents of an image and passing it back to HTMLToWord for insertion into a document. If not set, then HTMLToWord will not insert images into a document.
  • HTMLToWord.InsertDelegateA user-assigned delegate method that HTMLToWord calls before it processes an XHTML tag. The user may implement code to perform any tasks they desire before passing control back to HTMLToWord. The return value from the delegate method specifies how HTMLToWord should behave. If this property is not set, HTMLToWord will attempt to insert the contents of the XHTML tag.
  • HTMLToWord.InsertElementDelegateType for user-defined delegate method called by HTMLToWord before inserting an element.
  • HTMLToWord.InsertHTML
    • HTMLToWord.InsertHTML(String, Document, Element)Processes the XHTML string and inserts it into the specified Word document as formatted text after the given WordWriter Element using the document's Normal style as the default font. Returns the last Element inserted into the document.
    • HTMLToWord.InsertHTML(String, Document, NamedStyle, Element)Processes the XHTML string and inserts it into the specified Word document as formatted text after the given WordWriter Element using the given NamedStyle. Returns the last Element inserted into the document.
    • HTMLToWord.InsertHTML(String, Document)Processes the XHTML string and inserts it at the end of the specified Word document as formatted text using the document's Normal style as the default font. Returns the last Element inserted into the document.
  • HTMLToWord.InsertPropertiesContains settings that control how unsupported HTML tags are treated and provides an override to the default font used when inserting text into the document.
  • HTMLToWord.LogFileNameThe full path to the HTMLToWord debug log file. To create a log file, you must set the DebugLogLevel parameter to a value other than None.
  • HTMLToWord.LoggingLevelA LoggingLevel value specified the amount of information written to the log file. To create a log file, you must also specify the full path for the file using the LogFileName property.

  • No labels