The .NET Interface makes it possible for Docx to HTML Converter of OSDC V11.0 to function through .NET applications developed using Visual Basic.NET, Visual C#.NET and similar programs.
Windows version
Linux version
CAUTION: | You cannot have both Docx to HTML Converter of OSDC V11.0 and another version of Docx to HTML Converter installed on your machine when the NET interface is used. It is necessary to uninstall one version, or only set the path of Docx to HTML Converter you want to use by deleting the unwanted path from the environment variables. |
---|
Docx to HTML Converter .NET component is not registered automatically to the global assembly cache (GAC). It is necessary to create the path either by putting the .NET component in the current folder of the application, or by creating an application configuration file.
.NET Component File Name | for .NET 8 | SbhDotNetMCtl.dll |
---|
The following classes are contained in the .NET component:
Name | Functions |
---|---|
SbhObj | Docx to HTML Converter of OSDC V11.0 class (itself). SbhObj Example for C# SbhObj asbh = new();
try {
// some process
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
|
SbhObj Class provides the following methods:
Name | Return Value | Arguments | Functions |
---|---|---|---|
execute | None | None | Executes the conversion and outputs to the destination specified in setDocumentURI . |
setDocumentURI | None | newVal : string | Specify the input file name. |
setOutputFilePath | None | newVal : string | Specify the output file name. |
clrSettings | None | None | Cleares option settings. |
lodeSettings | None | newVal : string | Loads specified option setting file. |
setEnableXHTML | None | newVal : bool | Specifies the grammar for tag output. newValIf "true", specified XML grammar. If "faulse", specified HTML grammar. |
setViewportContent | None | content : string | Specifies to output the meta tag in the following format in the <head>. <meta name="viewport" content=" Content specified in ‘content’"> |
setEnableENDL | None | newVal : bool | Specifies whether to output a line break at the end of the block tag. newValIf "true", specifies output. If "faulse", specifies. |
setEnableEmptyParagraph | None | newVal : bool | blank lines (lines with line breaks only) in Word. newValIf "true", ignored blank lines. If "faulse", outputs empty <p> tags as many as the number of blank lines. |
setEnableNonRefId | None | newVal : bool | While editing in Word, a lot of IDs that are not internally deleted may be created. Specifies whether these internally unreferenced IDs should be removed in HTML output. |
setEnableImgWidth | None | newVal : bool | Specifies whether to output the width of the image. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setEnableHeadingStrong | None | newVal : bool | Specifies whether to ignore the emphasis specified in the heading style. newValIf "true", specifies to ignore. If "faulse", specifies to output. |
setEnableEmbedimage | None | newVal : bool | Specifies whether to embed the image in the body HTML as a data URL. newValIf "true", specifies to embed the image. If "faulse", specifies images are output to the image folder. |
setEnableMathML | None | newVal : bool | Specifies whether to output to <img> tags in MathML format for formulas edited in the Word Equation Editor. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setXmlMathML | None | newVal : bool | Specifies whether to output to MathML formatted markup for formulas edited in the Word Equation Editor. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setOMath | None | newVal : bool | Specifies whether to output to Word's own Office Math format for formulas edited in the Word Equation Editor. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setThroughImage | None | newVal : bool | Specifies whether to output the image in its original format inserted into Word. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setEnablePStyle | None | newVal : bool | Specifies whether to output the style name of the paragraph by setting it as the value of the class attribute. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setEnableCitation | None | newVal : bool | Specifies whether to outputs the value of tag in the Citation field by setting it as the value of the href attribute of the <a> tag. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setTextColor | None | newVal : bool | Specifies whether to outputs the color specified for the text as <span style="color:color value">. newValIf "true", specifies to output. If "faulse", specifies not to output. |
setItalic | None | newVal : int | Specifies the output method when italics are specified for text.
newVal
Italic output method. 0 : Do not output. (default) 1 : Output as <i>tag. 2 : Output as <span style="font-style:italic"> |
setUnderline | None | newVal : int | Specifies the output method when underline is specified for text.
newVal
underline output method. 0 : Do not output. (default) 1 : Output as <u>tag. 2 : Output as <span style="text-decoration-line:underline;"> |
setLinethrough | None | newVal : int | Specifies the output method when strikethrough is specified for text.
newVal
strikethrough output method. 0 : Do not output. (default) 1 : Output as <del>tag. 2 : Output as <span style="text-decoration-line: line-through;"> |
setEncoding | None | newVal : string | Specifies the character code (encoding method) of the HTML file. (default : "UTF-8") |
setDefstyle | None | newVal : bool | Specifies whether to output the <style> element (element specifying the default CSS style) in <head>. newValIf "true", specifies not to output. If "faulse", specifies to output. |
setSpaceIndent | None | newVal : bool | Specifies whether to convert the indentation to a a single full-width space when one or more characters of indentation are specified at the beginning of the paragraph. newValIf "true", specifies to convert. If "faulse", specifies not to convert. |
setOutputBR | None | newVal : bool | Specifies whether to output <br> tags at the end of paragraphs instead of enclosing them in <p> tags. It is invalid when XML grammar is specified in tag output. newValIf "true", specifies to output <br> tags. If "faulse", specifies to output <p> tags. |
setFileimages | None | newVal : bool | Specifies how to name the folder that stores image files. newValIf "true", specifies as "destination_file_name.image". If "faulse", specifies as "image". |
setCSS | None | uri : string media : string |
Specifies the CSS file to link. uriSpecifies the CSS file path. mediaYou can optionally specify media. |
setJS | None | newVal : string | Place the script tag in <head> and specify the path (URL) of the JavaScript file in its src attribute. newValSpecified the path of the JavaScript file. |
saveSettings | None | newVal : string | Specify the path of the option setting file. |
setTablestyle | None | newVal : bool | Specifies whether to output the table-style. newValIf "true", specifies to output. If "faulse", specifies not to output. |