DOCX.php
WIKINDX : Bibliographic Management system.
Tags
Table of Contents
Functions
- pkgPaths() : mixed
- Get and set the DOCX package paths, creating the folder in cache/files/
- STARTDOM() : void
- Create and traverse the DOM from the HTML file.
- traverseDOM() : mixed
- Traverse the DOM and produce DOCX code
- nodeAttributes() : array<string|int, mixed>
- Convert attributes
- calculateTwipsWidth() : int
- Calculate table widths in twips from either % or px values
- calculateBorderSize() : int
- Calculate table border size in twips from px values.
- domImageToDocxImage() : void
- Images are renamed and copied to
- domNodeAttributes2Array() : array<string|int, string>
- Convert attributes of a DOMNode to an array of attributes
Functions
pkgPaths()
Get and set the DOCX package paths, creating the folder in cache/files/
pkgPaths(string $method) : mixed
Parameters
- $method : string
STARTDOM()
Create and traverse the DOM from the HTML file.
STARTDOM(string $fDir, string $fName, XMLWriter $xml) : void
Parameters
- $fDir : string
- $fName : string
- $xml : XMLWriter
traverseDOM()
Traverse the DOM and produce DOCX code
traverseDOM(mixed $domNode, XMLWriter $xml) : mixed
Parameters
- $domNode : mixed
- $xml : XMLWriter
nodeAttributes()
Convert attributes
nodeAttributes(DOMNODE $node, XMLWriter $xml) : array<string|int, mixed>
Parameters
- $node : DOMNODE
- $xml : XMLWriter
Return values
array<string|int, mixed>calculateTwipsWidth()
Calculate table widths in twips from either % or px values
calculateTwipsWidth(string $input) : int
Parameters
- $input : string
Return values
intcalculateBorderSize()
Calculate table border size in twips from px values.
calculateBorderSize(string $input) : int
"Specifies the width of the border. Table borders are line borders (see the val attribute below), and so the width is specified in eighths of a point, with a minimum value of two (1/4 of a point) and a maximum value of 96 (twelve points)." From: http://officeopenxml.com/WPtableCellProperties-Borders.php
Parameters
- $input : string
Return values
intdomImageToDocxImage()
Images are renamed and copied to
domImageToDocxImage(DOMNode $domNode, XMLWriter $xml) : void
Parameters
- $domNode : DOMNode
- $xml : XMLWriter
domNodeAttributes2Array()
Convert attributes of a DOMNode to an array of attributes
domNodeAttributes2Array(DOMNode $domNode) : array<string|int, string>
Parameters
- $domNode : DOMNode