WIKINDX API trunk

DOCX.php

WIKINDX : Bibliographic Management system.

Tags
see
https://wikindx.sourceforge.io/

The WIKINDX SourceForge project

author

The WIKINDX Team

license

https://www.isc.org/licenses/ ISC License

Some of the code here has been inspired by or adapted from PHPWord: https://github.com/PHPOffice/PHPWord

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
int

calculateBorderSize()

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
int

domImageToDocxImage()

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
Return values
array<string|int, string>

        
On this page

Search results