Table of contents
Namespace: Com\Tecnick\Pdf
abstract class HTML extends JavaScript
Extends: JavaScript
Source: src/HTML.php:459
HTML PDF class
Types
THTMLRadiusLength
array{v: float, pct: bool}
THTMLRadiusCorner
array{0: THTMLRadiusLength, 1: THTMLRadiusLength}
THTMLBorderRadius
array{
TL: THTMLRadiusCorner,
TR: THTMLRadiusCorner,
BR: THTMLRadiusCorner,
BL: THTMLRadiusCorner
}
THTMLRadii
array{
TL?: array{0: float, 1: float},
TR?: array{0: float, 1: float},
BR?: array{0: float, 1: float},
BL?: array{0: float, 1: float}
}
THTMLCornerMask
array{TL: bool, TR: bool, BR: bool, BL: bool}
THTMLTableCell
array{
cellx: float,
cellw: float,
colindex: int,
colspan: int,
contenth: float,
valign: string,
bstyles: array<int|string, BorderStyle>,
fillstyle: ?BorderStyle,
radius?: THTMLBorderRadius,
buffer: string,
segbuffers?: array<int, string>,
lastseg?: int,
lastbottom?: float,
minheight?: float
}
THTMLTableRowspanCell
array{
cellx: float,
cellw: float,
colindex: int,
colspan: int,
rowtop: float,
rowsremaining: int,
usedheight: float,
contenth: float,
valign: string,
bstyles: array<int|string, BorderStyle>,
fillstyle: ?BorderStyle,
radius?: THTMLBorderRadius,
buffer: string,
continued?: bool
}
THTMLRowSegment
array{
pid: int,
region: int,
rx: float,
tabletop: float,
top: float,
bottom: float
}
THTMLRowFragment
array{
segments: array<int, THTMLRowSegment>,
thead: string
}
THTMLTableState
array{
originx: float,
originy: float,
captiontopy: float,
width: float,
dir: string,
cols: int,
colwidth: float,
colwidths: array<int, float>,
cellspacingh: float,
cellspacingv: float,
cellpadding: float,
collapse: bool,
hascellborders: bool,
prevrowbottom: array<int, BorderStyle>,
rowtop: float,
rowheight: float,
minheight: float,
domkey: int,
colindex: int,
cells: array<int, THTMLTableCell>,
occupied: array<int, int>,
rowspans: array<int, THTMLTableRowspanCell>,
regionoffset: float,
borderbuf?: string,
frag?: THTMLRowFragment|null,
framecontinued?: bool
}
THTMLTableCellContext
array{
originx: float,
originy: float,
maxwidth: float,
maxheight: float,
lineadvance: float,
linebottom: float,
lineascent: float,
linewordspacing: float,
linewrapped: bool,
rowtop: float,
cellx: float,
cellw: float,
colindex: int,
colspan: int,
padding: array{'T': float, 'R': float, 'B': float, 'L': float},
margin: array{'T': float, 'R': float, 'B': float, 'L': float},
bstyles: array<int|string, BorderStyle>,
fillstyle: ?BorderStyle,
radius?: THTMLBorderRadius,
rowspan: int,
minheight: float,
valign: string,
buffer: string,
frag?: bool,
segindex?: int,
segbuffers?: array<int, string>
}
THTMLAttrib
array{
'align': bool|float|string,
'attribute': array<string, string|array<string, mixed>>,
'caption-top-html'?: string,
'caption-bottom-html'?: string,
'caption-side': string,
'closekey'?: int,
'tableclosekey'?: int,
'baselineoffset'?: float,
'bgcolor': bool|float|string,
'block': bool,
'border-collapse': string,
'border-spacing'?: TCSSBorderSpacing,
'border': array<string, BorderStyle>,
'border-radius'?: THTMLBorderRadius,
'clip': bool,
'cols': int,
'content': string,
'cssdata': array<string, TCSSData>,
'csssel': array<string>,
'clear': string,
'dir': string,
'display': string,
'empty-cells': string,
'elkey': int,
'fgcolor': string,
'fill': bool,
'font-size-adjust': float|string,
'font-stretch': float,
'font-variant': string,
'fontname': string,
'fontsize': float,
'fontstyle': string,
'height': float,
'hide': bool,
'letter-spacing': float,
'line-height': float,
'line-height-absolute'?: float,
'line-height-font-size-basis'?: bool,
'list-style-position': string,
'listtype': string,
'listtypeset': bool,
'float': string,
'margin': array<string, float>,
'opening': bool,
'orphans': int,
'overflow-wrap'?: string,
'page': string,
'padding': array<string, float>,
'parent': int,
'pendingcellpadding'?: float,
'pendingcellspacingh'?: float,
'pendingcellspacingv'?: float,
'pendingcolwidths'?: array<int, float>,
'pendinggrid'?: array<int, array{0: int, 1: int}>,
'position': string,
'quotes': string,
'rows': int,
'self': bool,
'stroke': float,
'strokecolor': string,
'childblockbottom'?: float,
'ctxoriginx'?: float,
'ctxmaxwidth'?: float,
'ctxregionoffset'?: float,
'inlineblocknextx'?: float,
'inlineblockrowy'?: float,
'inlineblockpageid'?: int,
'table-layout': string,
'style': array<string, string>,
'list-style-image'?: string,
'tag': bool,
'text-indent': float,
'text-indent-each-line': bool,
'text-transform': string,
'thead': string,
'trids': array<int>,
'valign': string,
'value': string,
'white-space': string,
'widows': int,
'word-break'?: string,
'word-spacing': float,
'width': float,
'x': float,
'y': float,
}
THTMLSlimNode
array{
'slim': true,
'tag': bool,
'opening': bool,
'value': string,
'parent': int,
'elkey': int,
'stylesrc'?: int,
'dir'?: string,
'hide'?: bool,
'block'?: bool,
'display'?: string,
'margin'?: array<string, float>,
'padding'?: array<string, float>,
}
THTMLDOMNode
THTMLAttrib|THTMLSlimNode
THTMLSharedArrays
array{
'attribute': array<string, array<string, string|array<string, mixed>>>,
'border': array<string, array<string, BorderStyle>>,
'border-radius': array<string, THTMLBorderRadius>,
'border-spacing': array<string, TCSSBorderSpacing>,
'cssdata': array<string, array<string, TCSSData>>,
'csssel': array<string, array<string>>,
'margin': array<string, array<string, float>>,
'padding': array<string, array<string, float>>,
'style': array<string, array<string, string>>,
}
THTMLCSSRule
array{
'k': string,
's': string,
'c': string,
'match': string,
'pseudo': string,
}
THTMLCSSRuleIndex
array{
'css': array<string, string>,
'rules': list<THTMLCSSRule>,
'buckets': array<string, list<int>>,
}
THTMLBlockBuf
array{
openkey: int,
bx: float,
by: float,
bw: float,
buffer: string,
celldepth: int,
decorate: bool,
radius?: THTMLBorderRadius,
split?: bool
}
THTMLTableColHints
array{
colwidths: array<int, float>,
explicit: array<int, bool>,
firstrow: array<int, bool>,
weights: array<int, float>,
hasexplicit: bool,
hascontent: bool
}
THTMLTableColTagHint
array{
hintcol: int,
active: bool,
hascols: bool,
start: int,
span: int,
width: float
}
THTMLEstimateLine
array{
height: float,
inlinewidth: float,
inlineadvance: float,
hasinlinecontent: bool
}
THTMLRenderContext
array{
'cellctx': array{
originx: float,
originy: float,
lineoriginx: float,
maxwidth: float,
maxheight: float,
floatrowleftw: float,
floatrowrightw: float,
floatrowtop: float,
floatrowbottom: float,
lineadvance: float,
linebottom: float,
lineascent: float,
lineascentnolookahead: bool,
linewordspacing: float,
linewrapped: bool,
textindentapplied: bool,
firstlineinset: float,
pendingblockmarginb: float,
activepage?: string,
regionoffset?: float,
basefont: string
},
'currentkey'?: int,
'fontcache': array<string, array<string, mixed>>,
'liststack': array<int, array{
type: string,
count: int,
indent: float
}>,
'tablestack': array<int, THTMLTableState>,
'bcellctx': array<int, THTMLTableCellContext>,
'blockbuf': array<int, THTMLBlockBuf>,
'pageout'?: array<int, array{pid: int, out: string}>,
'linkstack': array<int, array{href: string, desc: string}>,
'listack': array<int, array{
originx: float,
maxwidth: float
}>,
'prelevel': int,
'quotelevel': int,
'dom': array<int, THTMLDOMNode>,
'ancestorcache'?: array<string, array<int, int>>,
'labelforcache'?: array<string, list<int>>,
'idcache'?: array<string, int>,
'inheritcache'?: array<string, array<int, string>>,
'theadheightcache'?: array<string, float>,
'inlinebox'?: array<int, array{started: bool, pending: float}>,
}
THTMLTextLine
array{
originx: float,
offset: float,
available: float,
remaining: float,
follows: bool,
indent: float,
curascent: float,
curheight: float,
ascent: float,
advance: float
}
THTMLTextRender
array{
x: float,
y: float,
w: float,
offset: float,
linespace: float,
align: string,
wordspacing: float,
startx: float,
baseline: float,
defer: bool,
trailjustify: float,
trailspace: float,
lasttrail: float
}
THTMLRtlPiece
array{
key: int,
text: string,
image: bool,
src: string,
width: float,
height: float,
valign: string
}
THTMLRtlSegment
array{
key: int,
text: string,
width: float,
ascent: float,
image: bool,
height: float,
valign: string,
src: string
}
THTMLRtlToken
array{
key: int,
text: string,
width: float,
ascent: float,
space: bool,
image: bool,
height: float,
valign: string,
src: string
}
THTMLRtlUnit
array{
space: bool,
width: float,
parts: array<int, THTMLRtlSegment>
}
THTMLTcpdfObject
array{
tid: string,
width: float,
height: float,
display: string,
valign: string,
halign: string,
alt: string
}
Inherited members
From Attributes
- parseHTMLAttributes(): Parst HTML DOM attributes.
- setHTMLMonospaceFont(): Set the monospaced font used for <pre>, <code> and <tt> elements.
From Base
- BORDERPOS_DEFAULT: The default relative position of the cell origin when the border is centered on the cell edge.
- BORDERPOS_EXTERNAL: The relative position of the cell origin when the border is external to the cell edge.
- BORDERPOS_INTERNAL: The relative position of the cell origin when the border is internal to the cell edge.
- ZEROCELL: Default values for cell.
- ZEROCELLBOUND: Default values for cell boundaries.
- $barcode: Barcode object.
- $cache: Cache object.
- $color: Color object.
- $encrypt: Encrypt object.
- $file: File object.
- $font: Font object.
- $graph: Graph object.
- $image: Image Import object.
- $markupFile: File object for markup-originated resources.
- $page: Page object.
- $pon: Current PDF object number.
- $uniconv: Unicode Convert object.
- defaultFileAllowedPaths(): Returns the default array of allowed file paths.
- defaultMarkupAllowedPaths(): Returns the default array of allowed file paths for markup-originated resources.
- enableDefaultPageContent(): Enable or disable the default page content.
- getWarnings(): Return the conformance warnings raised while the document was rendered.
- initClassObjects(): Initialize dependencies class objects.
- setPDFVersion(): Set the PDF version (check PDF reference for valid values).
- setRTL(): Set the default document language direction.
- toPoints(): Convert user units to internal points unit.
- toUnit(): Convert internal points to user unit.
- toYPoints(): Convert vertical user value to internal points unit.
- toYUnit(): Convert vertical internal points value to user unit.
From Block
- setHtmlVSpace(): Set custom vertical spacing for HTML block tags.
From Cell
- setDefaultCellBorderPos(): Sets the default cell border position.
- setDefaultCellMargin(): Set the default cell margin in user units.
- setDefaultCellPadding(): Set the default cell padding in user units.
From CSS
- addGlobalCSS(): Append CSS content to the global CSS applied as a base stylesheet to all HTML rendering calls.
- resetGlobalCSS(): Reset (clear) the global CSS so no base stylesheet is applied to HTML rendering calls.
- setDefaultCSSBorderSpacing(): Set the default CSS border spacing in user units.
- setDefaultCSSMargin(): Set the default CSS margin in user units.
- setDefaultCSSPadding(): Set the default CSS padding in user units.
- setGlobalCSS(): Set the global CSS content applied as a base stylesheet to all HTML rendering calls.
From Document
- addSVG(): Add a new SVG image and return its object ID.
- getSetSVG(): Get the PDF output string to print the specified SVG object.
From Dom
- strTrim(): Trim the input string.
- strTrimLeft(): Left trim the input string.
- strTrimRight(): Right trim the input string.
- tidyHTML(): Cleanup HTML code (requires HTML Tidy library).
From FormImage
- setHtmlImageImportResize(): Enable or disable HTML raster image downscaling on import.
From JavaScript
- addContentAsEmbeddedFile(): Add string content as an embedded file.
- addEmbeddedFile(): Add an embedded file.
- addFFButton(): Adds an annotation button form field.
- addFFCheckBox(): Adds an annotation checkbox form field.
- addFFComboBox(): Adds an annotation combobox (select) form field.
- addFFListBox(): Adds an annotation listbox (select) form field.
- addFFRadioButton(): Adds an annotation radiobutton form field.
- addFFText(): Adds an annotation text form field.
- addInternalLink(): Defines the page and vertical position an internal link points to.
- addJSButton(): Adds a JavaScript button form field.
- addJSCheckBox(): Adds a JavaScript checkbox form field.
- addJSComboBox(): Adds a JavaScript combobox (select) form field.
- addJSListBox(): Adds a JavaScript listbox (select) form field.
- addJSRadioButton(): Adds a JavaScript radiobutton form field.
- addJSText(): Adds a JavaScript text form field.
- addRawJavaScriptObj(): Add a raw javascript string as new object.
- addXObjectContent(): Add the specified raw PDF content to the XObject template.
- addXObjectExtGStateID(): Add the specified ExtGState ID to the XObject template.
- addXObjectFontID(): Add the specified Font ID to the XObject template.
- addXObjectGradientID(): Add the specified Gradient ID to the XObject template.
- addXObjectImageID(): Add the specified Image ID to the XObject template.
- addXObjectSpotColorID(): Add the specified SpotColor ID to the XObject template.
- addXObjectXObjectID(): Add the specified XObject ID to the XObject template.
- appendRawJavaScript(): Append raw javascript string to the global one.
- exitXObjectTemplate(): Exit from the XObject template mode.
- getDefJSAnnotProp(): Returns the default Javascript Annotation properties.
- getXObjectTemplate(): Returns the PDF code to render the specified XObject template.
- newXObjectTemplate(): Create a new XObject template and return the object id.
- setAnnotation(): Add an annotation and returns the object id.
- setBookmark(): Add a bookmark entry.
- setDefJSAnnotProp(): Set the default Javascript Annotation properties.
- setLink(): Creates a link in the specified area.
- setNamedDestination(): Add a named destination.
From ListMarker
- setULLIDot(): Sets the default symbol to be used as unordered-list (UL) list-item (LI) bullet.
From Render
- addHTMLCell(): Adds an HTML block inside a rectangular cell.
- getHTMLCell(): Returns the PDF code to render an HTML block inside a rectangular cell.
- getLastHTMLCellEnd(): Returns the page and the ordinate (user units) of the bottom of the last block rendered by getHTMLCell() or addHTMLCell().
From Selector
- getHTMLDOMCSSData(): Returns the styles array that apply for the selected HTML tag.
- isValidCSSSelectorForTag(): Returns true if the CSS selector is valid for the selected HTML tag.
From StyleText
- parseHTMLStyleAttributes(): Parse HTML DOM Style attributes.
From TcpdfTag
- serializeHTMLTcpdfTag(): Serialize a method call for a TCPDF tag (<tcpdf data="…" />).
From Text
- addArtifactContent(): Add non-semantic content wrapped as Artifact marked-content.
- addPage(): Add a new page (wrapper function for $this->page->add()).
- addTaggedFigureContent(): Add non-text graphical content as a tagged Figure block in PDF/UA mode.
- addTextCell(): Adds a text block inside a rectangular cell using relative coordinates.
- addTextCellXY(): Adds a text block inside a rectangular cell using absolute page coordinates.
- beginArtifact(): Open an Artifact marked-content block for non-semantic page content.
- beginStructElem(): Open a PDF/UA structure element bracket.
- defaultPageContent(): Sets the page common content like Header and Footer.
- enableHyphenBreaks(): Enable or disable the line break opportunities after the hyphens that join two letters (for example “well-|known”).
- enableIdeographicBreaks(): Enable or disable the line break opportunities around the ideographic characters (Chinese, Japanese and Korean text without spaces).
- enableWordBreakFallback(): Enable or disable the breaking of a word wider than the line between two characters.
- enableZeroWidthBreakPoints(): Enable or disable automatic line breaking points after some non-letter character types.
- endArtifact(): Close an Artifact marked-content block opened by beginArtifact().
- endStructElem(): Close the current PDF/UA structure element bracket.
- getLastBBox(): Returns the last text fragment bounding box as {x, y, w, h} (left, top, width, height).
- getLastCellBBox(): Returns the last Cell bounding box as {x, y, w, h} (left, top, width, height).
- getLastTextBBox(): Returns the last Text bounding box as {x, y, w, h} (left, top, width, height).
- getTextCell(): Returns the PDF code to render a text block inside a rectangular cell.
- getTextLine(): Returns the PDF code to render a single line of text.
- loadTexHyphenPatterns(): Returns an array of hyphenation patterns.
- resumePdfUaTagging(): Resume structure tagging after suspendPdfUaTagging().
- setCurrentPage(): Set the current page number (move to the specified page).
- setTexHyphenPatterns(): Sets the hyphen patterns for text.
- suspendPdfUaTagging(): Suspend structure tagging and marked-content recording.