Menu

## Htmldoc
in package

Htmldoc.php : 18

Convert HTML to MS Word file

##### Tags

see
  https://www.kotchasan.com/

### Table of Contents

$docFile : string
  Document file name
$htmlBody : string
  HTML body
$htmlHead : string
  HTML header
__construct() : mixed
  Class Constructor
createDoc() : mixed
  Create a MS Word document from HTML
setDocFileName() : $this
  Set the document file name
parseHtml() : mixed
  Parse HTML source
render() : string
  Render the Word document

### Properties

#### $docFile

Htmldoc.php : 25

Document file name

`private string $docFile`

#### $htmlBody

Htmldoc.php : 32

HTML body

`private string $htmlBody`

#### $htmlHead

Htmldoc.php : 39

HTML header

`private string $htmlHead`

### Methods

#### __construct()

Htmldoc.php : 44

Class Constructor

`public __construct() : mixed`

##### Return values

mixed —

#### createDoc()

Htmldoc.php : 57

Create a MS Word document from HTML

`public createDoc(string $html[, string $file = '' ]) : mixed`

##### Parameters

$html : string

  HTML content

$file : string = ''

  Document file name

##### Return values

mixed —

#### setDocFileName()

Htmldoc.php : 78

Set the document file name

`public setDocFileName(string $docfile) : $this`

##### Parameters

$docfile : string

##### Return values

$this —

#### parseHtml()

Htmldoc.php : 96

Parse HTML source

`private parseHtml(string $html, string $file) : mixed`

##### Parameters

$html : string

  HTML content

$file : string

  Document file name

##### Return values

mixed —

#### render()

Htmldoc.php : 131

Render the Word document

`private render() : string`

##### Return values

string —

## Search results