Skip to main content

JavaScript Support

Prince supports most of ECMAScript 5th edition, including strict mode, and ECMAScript 6th edition classes. Later editions of ECMAScript are not supported.

The following table shows supported JavaScript objects, methods and properties. For more details, see also JavaScript in Prince.

Objects, methods and properties marked with an asterisk (*) are Prince extensions.

Objects, methods and properties with a line-through are deprecated, support might be removed in a future Prince version.

Toggle (open/close) all properties

window
object
The global object
Array
function
from
function
isArray
function
of
function
prototype
object
concat
function
entries
function
every
function
fill
function
filter
function
find
function
findIndex
function
forEach
function
includes
function
indexOf
function
join
function
keys
function
lastIndexOf
function
map
function
pop
function
push
function
reduce
function
reduceRight
function
reverse
function
shift
function
slice
function
some
function
sort
function
splice
function
toLocaleString
function
toString
function
unshift
function
values
function
length
ArrayBuffer
function
prototype
object
byteLength
slice
function
Attribute
function
prototype
object
attributes
object
childNodes
object
localName
name
namespaceURI
nodeName
nodeType
number
nodeValue
ownerElement
value
Boolean
function
prototype
object
toString
function
valueOf
function
BoxInfo
function
The properties of a box, can be accessed after document conversion has finished - see The Box Tracking API.
prototype
object
baseline
number
borderBottom
number
borderLeft
number
borderRight
number
borderTop
number
children
object
array of child boxes
element
object
DOM element for box (may be null)
floatPosition
string
"TOP" | "BOTTOM"
h
number
height, in pt
marginBottom
number
the used value for the bottom margin
marginLeft
number
the used value for the left margin
marginRight
number
the used value for the right margin
marginTop
number
the used value for the top margin
paddingBottom
number
paddingLeft
number
paddingRight
number
paddingTop
number
pageNum
number
parent
object
parent box
pseudo
string
pseudo-element name or null
src
string
style
object
CSS style object for box
text
string
type
string
"BODY" | "COLUMN" | "FLEXLINE" | "FOOTNOTES" | "FLOATS" | "BOX" | "LINE" | "SPAN" | "TEXT" | "SVG" | "IMAGE"
w
number
width, in pt
x
number
x-coordinate, in pt
y
number
y-coordinate, in pt
BoxInfoChildren
function
prototype
object
item
function
length
CSSStyleDeclaration
function
prototype
object
accentColor
See the property accent-color.
alignContent
See the property align-content.
alignItems
See the property align-items.
alignSelf
See the property align-self.
all
See the property all.
background
See the property background.
backgroundAttachment
See the property background-attachment.
backgroundClip
See the property background-clip.
backgroundColor
See the property background-color.
backgroundImage
See the property background-image.
backgroundImageResolution
See the property background-image-resolution.
backgroundOrigin
See the property background-origin.
backgroundPosition
See the property background-position.
backgroundRepeat
See the property background-repeat.
backgroundSize
See the property background-size.
baselineShift
See the property baseline-shift.
bookmarkLabel
See the property bookmark-label.
bookmarkLevel
See the property bookmark-level.
bookmarkState
See the property bookmark-state.
bookmarkTarget
See the property bookmark-target.
border
See the property border.
borderBottom
See the property border-bottom.
borderBottomColor
See the property border-bottom-color.
borderBottomLeftRadius
See the property border-bottom-left-radius.
borderBottomRightRadius
See the property border-bottom-right-radius.
borderBottomStyle
See the property border-bottom-style.
borderBottomWidth
See the property border-bottom-width.
borderClip
See the property border-clip.
borderCollapse
See the property border-collapse.
borderColor
See the property border-color.
borderLeft
See the property border-left.
borderLeftColor
See the property border-left-color.
borderLeftStyle
See the property border-left-style.
borderLeftWidth
See the property border-left-width.
borderRadius
See the property border-radius.
borderRight
See the property border-right.
borderRightColor
See the property border-right-color.
borderRightStyle
See the property border-right-style.
borderRightWidth
See the property border-right-width.
borderSpacing
See the property border-spacing.
borderStyle
See the property border-style.
borderTop
See the property border-top.
borderTopColor
See the property border-top-color.
borderTopLeftRadius
See the property border-top-left-radius.
borderTopRightRadius
See the property border-top-right-radius.
borderTopStyle
See the property border-top-style.
borderTopWidth
See the property border-top-width.
borderWidth
See the property border-width.
bottom
See the property bottom.
boxDecorationBreak
See the property box-decoration-break.
boxShadow
See the property box-shadow.
boxSizing
See the property box-sizing.
breakAfter
See the property break-after.
breakBefore
See the property break-before.
breakInside
See the property break-inside.
captionPage
See the property caption-page.
captionSide
See the property caption-side.
clear
See the property clear.
clip
See the property clip.
clipPath
See the property clip-path.
clipRule
See the property clip-rule.
color
See the property color.
colorInterpolation
See the property color-interpolation.
colorInterpolationFilters
See the property color-interpolation-filters.
columnBreakAfter
See the property column-break-after.
columnBreakBefore
See the property column-break-before.
columnCount
See the property column-count.
columnFill
See the property column-fill.
columnGap
See the property column-gap.
columnRule
See the property column-rule.
columnRuleColor
See the property column-rule-color.
columnRuleStyle
See the property column-rule-style.
columnRuleWidth
See the property column-rule-width.
columnSpan
See the property column-span.
columnWidth
See the property column-width.
columns
See the property columns.
content
See the property content.
counterIncrement
See the property counter-increment.
counterReset
See the property counter-reset.
counterSet
See the property counter-set.
cssFloat
See the property float.
direction
See the property direction.
display
See the property display.
dominantBaseline
See the property dominant-baseline.
emptyCells
See the property empty-cells.
fill
See the property fill.
fillOpacity
See the property fill-opacity.
fillRule
See the property fill-rule.
filter
See the property filter.
flex
See the property flex.
flexBasis
See the property flex-basis.
flexDirection
See the property flex-direction.
flexFlow
See the property flex-flow.
flexGrow
See the property flex-grow.
flexShrink
See the property flex-shrink.
flexWrap
See the property flex-wrap.
floatDeferColumn
See the property float-defer-column.
floatDeferPage
See the property float-defer-page.
floatModifier
See the property float-modifier.
floatPlacement
See the property float-placement.
floatPolicy
See the property float-policy.
floatReference
See the property float-reference.
floatTail
See the property float-tail.
floodColor
See the property flood-color.
floodOpacity
See the property flood-opacity.
flow
See the property flow.
font
See the property font.
fontFamily
See the property font-family.
fontFeatureSettings
See the property font-feature-settings.
fontKerning
See the property font-kerning.
fontSize
See the property font-size.
fontStretch
See the property font-stretch.
fontStyle
See the property font-style.
fontVariant
See the property font-variant.
fontVariantAlternates
See the property font-variant-alternates.
fontVariantCaps
See the property font-variant-caps.
fontVariantLigatures
See the property font-variant-ligatures.
fontVariantNumeric
See the property font-variant-numeric.
fontVariationSettings
See the property font-variation-settings.
fontWeight
See the property font-weight.
footnoteDisplay
See the property footnote-display.
footnoteStylePosition
See the property footnote-style-position.
gap
See the property gap.
getPropertyValue
function
grid
See the property grid.
gridArea
See the property grid-area.
gridAutoColumns
See the property grid-auto-columns.
gridAutoFlow
See the property grid-auto-flow.
gridAutoRows
See the property grid-auto-rows.
gridColumn
See the property grid-column.
gridColumnEnd
See the property grid-column-end.
gridColumnStart
See the property grid-column-start.
gridRow
See the property grid-row.
gridRowEnd
See the property grid-row-end.
gridRowStart
See the property grid-row-start.
gridTemplate
See the property grid-template.
gridTemplateAreas
See the property grid-template-areas.
gridTemplateColumns
See the property grid-template-columns.
gridTemplateRows
See the property grid-template-rows.
height
See the property height.
hyphenateAfter
See the property hyphenate-after.
hyphenateBefore
See the property hyphenate-before.
hyphenateLines
See the property hyphenate-lines.
hyphenatePatterns
See the property hyphenate-patterns.
hyphens
See the property hyphens.
imageOrientation
See the property image-orientation.
imageResolution
See the property image-resolution.
inset
See the property inset.
insetInside
See the property inset-inside.
insetOutside
See the property inset-outside.
justifyContent
See the property justify-content.
justifyItems
See the property justify-items.
justifySelf
See the property justify-self.
left
See the property left.
letterSpacing
See the property letter-spacing.
lightingColor
See the property lighting-color.
lineHeight
See the property line-height.
lineStackingStrategy
See the property line-stacking-strategy.
link
See the property link.
listStyle
See the property list-style.
listStyleImage
See the property list-style-image.
listStylePosition
See the property list-style-position.
listStyleType
See the property list-style-type.
margin
See the property margin.
marginAlt
See the property margin-alt.
marginBottom
See the property margin-bottom.
marginInside
See the property margin-inside.
marginLeft
See the property margin-left.
marginOutside
See the property margin-outside.
marginRight
See the property margin-right.
marginTop
See the property margin-top.
marker
See the property marker.
markerEnd
See the property marker-end.
markerMid
See the property marker-mid.
markerStart
See the property marker-start.
mask
See the property mask.
maxHeight
See the property max-height.
maxWidth
See the property max-width.
minHeight
See the property min-height.
minWidth
See the property min-width.
objectFit
See the property object-fit.
objectPosition
See the property object-position.
opacity
See the property opacity.
order
See the property order.
orphans
See the property orphans.
outline
See the property outline.
outlineColor
See the property outline-color.
outlineOffset
See the property outline-offset.
outlineStyle
See the property outline-style.
outlineWidth
See the property outline-width.
overflow
See the property overflow.
overflowWrap
See the property overflow-wrap.
padding
See the property padding.
paddingBottom
See the property padding-bottom.
paddingLeft
See the property padding-left.
paddingRight
See the property padding-right.
paddingTop
See the property padding-top.
page
See the property page.
pageBreakAfter
See the property page-break-after.
pageBreakBefore
See the property page-break-before.
pageBreakInside
See the property page-break-inside.
pageGroup
See the property page-group.
placeContent
See the property place-content.
placeItems
See the property place-items.
placeSelf
See the property place-self.
position
See the property position.
princeAltText
See the property -prince-alt-text.
princeBackgroundImageResolution
princeBookmarkLabel
See the property -prince-bookmark-label.
princeBookmarkLevel
See the property -prince-bookmark-level.
princeBookmarkState
See the property -prince-bookmark-state.
princeBookmarkTarget
See the property -prince-bookmark-target.
princeBorderClip
See the property -prince-border-clip.
princeCaptionPage
See the property -prince-caption-page.
princeClear
See the property -prince-clear.
princeExpansionText
See the property -prince-expansion-text.
princeFilterResolution
See the property -prince-filter-resolution.
princeFloatDeferColumn
See the property -prince-float-defer-column.
princeFloatDeferPage
See the property -prince-float-defer-page.
princeFloatModifier
See the property -prince-float-modifier.
princeFloatPlacement
See the property -prince-float-placement.
princeFloatPolicy
See the property -prince-float-policy.
princeFloatReference
See the property -prince-float-reference.
princeFloatTail
See the property -prince-float-tail.
princeFlow
See the property -prince-flow.
princeFootnoteDisplay
See the property -prince-footnote-display.
princeFootnotePolicy
See the property -prince-footnote-policy.
princeHyphenateAfter
See the property -prince-hyphenate-after.
princeHyphenateBefore
See the property -prince-hyphenate-before.
princeHyphenateCharacter
See the property -prince-hyphenate-character.
princeHyphenateLines
See the property -prince-hyphenate-lines.
princeHyphenatePatterns
See the property -prince-hyphenate-patterns.
princeHyphens
See the property -prince-hyphens.
princeImageMagic
See the property -prince-image-magic.
princeImageResolution
See the property -prince-image-resolution.
princeLang
See the property -prince-lang.
princeLineStackingStrategy
princeLinebreakMagic
See the property -prince-linebreak-magic.
princeLink
See the property -prince-link.
princeMarginAlt
See the property -prince-margin-alt.
princeMarginInside
See the property -prince-margin-inside.
princeMarginOutside
See the property -prince-margin-outside.
princePageGroup
See the property -prince-page-group.
princePdfAnnotationAuthor
princePdfAnnotationColor
princePdfAnnotationContents
princePdfAnnotationCreatedate
princePdfAnnotationIcon
See the property -prince-pdf-annotation-icon.
princePdfAnnotationMerge
princePdfAnnotationModifydate
princePdfAnnotationPosition
princePdfAnnotationTitle
princePdfAnnotationType
See the property -prince-pdf-annotation-type.
princePdfColorConversion
princePdfDestination
See the property -prince-pdf-destination.
princePdfForm
See the property -prince-pdf-form.
princePdfFormFieldFontSize
princePdfFormFieldSettings
princePdfLinkType
See the property -prince-pdf-link-type.
princePdfListNumbering
See the property -prince-pdf-list-numbering.
princePdfPageNumbering
See the property -prince-pdf-page-numbering.
princePdfSmartTypography
princePdfTagTitle
See the property -prince-pdf-tag-title.
princePdfTagType
See the property -prince-pdf-tag-type.
princeTabSize
See the property -prince-tab-size.
princeTableBaseline
See the property -prince-table-baseline.
princeTableColumnSpan
See the property -prince-table-column-span.
princeTableRowSpan
See the property -prince-table-row-span.
princeTextAlignAll
See the property -prince-text-align-all.
princeTextJustify
See the property -prince-text-justify.
princeTextReplace
See the property -prince-text-replace.
princeTooltip
See the property -prince-tooltip.
removeProperty
function
right
See the property right.
rowGap
See the property row-gap.
setProperty
function
setPropertyValue
function
stopColor
See the property stop-color.
stopOpacity
See the property stop-opacity.
stringSet
See the property string-set.
stroke
See the property stroke.
strokeDasharray
See the property stroke-dasharray.
strokeDashoffset
See the property stroke-dashoffset.
strokeLinecap
See the property stroke-linecap.
strokeLinejoin
See the property stroke-linejoin.
strokeMiterlimit
See the property stroke-miterlimit.
strokeOpacity
See the property stroke-opacity.
strokeWidth
See the property stroke-width.
tabSize
See the property tab-size.
tableBaseline
See the property table-baseline.
tableColumnSpan
See the property table-column-span.
tableLayout
See the property table-layout.
tableRowSpan
See the property table-row-span.
textAlign
See the property text-align.
textAlignAll
See the property text-align-all.
textAlignLast
See the property text-align-last.
textAnchor
See the property text-anchor.
textDecoration
See the property text-decoration.
textDecorationColor
See the property text-decoration-color.
textDecorationLine
See the property text-decoration-line.
textDecorationStyle
See the property text-decoration-style.
textDecorationThickness
See the property text-decoration-thickness.
textIndent
See the property text-indent.
textJustify
See the property text-justify.
textLineThrough
See the property text-line-through.
textLineThroughColor
See the property text-line-through-color.
textLineThroughStyle
See the property text-line-through-style.
textOverflow
See the property text-overflow.
textOverline
See the property text-overline.
textOverlineColor
See the property text-overline-color.
textOverlineStyle
See the property text-overline-style.
textShadow
See the property text-shadow.
textTransform
See the property text-transform.
textUnderline
See the property text-underline.
textUnderlineColor
See the property text-underline-color.
textUnderlineOffset
See the property text-underline-offset.
textUnderlinePosition
See the property text-underline-position.
textUnderlineStyle
See the property text-underline-style.
top
See the property top.
transform
See the property transform.
transformOrigin
See the property transform-origin.
unicodeBidi
See the property unicode-bidi.
verticalAlign
See the property vertical-align.
visibility
See the property visibility.
whiteSpace
See the property white-space.
widows
See the property widows.
width
See the property width.
wordBreak
See the property word-break.
wordSpacing
See the property word-spacing.
writingMode
See the property writing-mode.
zIndex
See the property z-index.
CanvasRenderingContext2D
function
prototype
object
arc
function
arcTo
function
beginPath
function
bezierCurveTo
function
clearRect
function
clip
function
closePath
function
createImageData
function
createLinearGradient
function
createPattern
function
createRadialGradient
function
customFocusRing
function
drawImage
function
direction
ellipse
function
fill
function
fillRect
function
fillStyle
fillText
function
font
getImageData
function
getLineDash
function
globalAlpha
globalCompositeOperation
string
isPointInPath
function
letterSpacing
lineCap
lineDashOffset
lineJoin
lineTo
function
lineWidth
measureText
function
miterLimit
moveTo
function
putImageData
function
quadraticCurveTo
function
rect
function
resetClip
function
resetTransform
function
restore
function
rotate
function
save
function
scale
function
scrollPathIntoView
function
setLineDash
function
setTransform
function
shadowBlur
undefined
shadowColor
undefined
shadowOffsetX
undefined
shadowOffsetY
undefined
stroke
function
strokeRect
function
strokeStyle
strokeText
function
systemFocusRing
function
textAlign
textBaseline
transform
function
translate
function
wordSpacing
Comment
function
prototype
object
after
function
prototype
object
attributes
object
before
function
prototype
object
childNodes
object
data
length
nextElementSibling
nodeName
string
nodeType
number
nodeValue
previousElementSibling
remove
function
prototype
object
replaceWith
function
prototype
object
CustomEvent
function
prototype
object
DOMException
function
prototype
object
HIERARCHY_REQUEST_ERR
number
INDEX_SIZE_ERR
number
INUSE_ATTRIBUTE_ERR
number
INVALID_CHARACTER_ERR
number
INVALID_STATE_ERR
number
NAMESPACE_ERR
number
NOT_FOUND_ERR
number
NOT_SUPPORTED_ERR
number
NO_MODIFICATION_ALLOWED_ERR
number
SYNTAX_ERR
number
TYPE_MISMATCH_ERR
number
DOMImplementation
function
prototype
object
createDocument
function
createHTMLDocument
function
hasFeature
function
DOMParser
function
prototype
object
parseFromString
function
DOMTokenList
function
prototype
object
add
function
contains
function
item
function
entries
function
keys
function
length
remove
function
replace
function
toggle
function
values
function
DataView
function
prototype
object
getFloat32
function
getFloat64
function
getInt16
function
getInt32
function
getInt8
function
getUint16
function
getUint32
function
getUint8
function
setFloat32
function
setFloat64
function
setInt16
function
setInt32
function
setInt8
function
setUint16
function
setUint32
function
setUint8
function
Date
function
UTC
function
now
function
parse
function
prototype
object
getDate
function
getDay
function
getFullYear
function
getHours
function
getMilliseconds
function
getMinutes
function
getMonth
function
getSeconds
function
getTime
function
getUTCDate
function
getUTCDay
function
getUTCFullYear
function
getUTCHours
function
getUTCMilliseconds
function
getUTCMinutes
function
getUTCMonth
function
getUTCSeconds
function
setDate
function
setFullYear
function
setHours
function
setMilliseconds
function
setMinutes
function
setMonth
function
setSeconds
function
setTime
function
setUTCDate
function
setUTCFullYear
function
setUTCHours
function
setUTCMilliseconds
function
setUTCMinutes
function
setUTCMonth
function
setUTCSeconds
function
toDateString
function
toISOString
function
toString
function
toTimeString
function
toUTCString
function
valueOf
function
Document
function
prototype
object
attributes
object
childElementCount
compatMode
string
createAttribute
function
createAttributeNS
function
createComment
function
createDocumentFragment
function
createElement
function
createElementNS
function
createTextNode
function
documentElement
firstElementChild
getElementById
function
getElementsByClassName
function
getElementsByTagName
function
getElementsByTagNameNS
function
implementation
object
lastElementChild
localName
object
namespaceURI
object
nodeName
string
nodeType
number
querySelector
function
querySelectorAll
function
readyState
DocumentFragment
function
prototype
object
attributes
object
childElementCount
firstElementChild
lastElementChild
localName
object
namespaceURI
object
nodeName
string
nodeType
number
querySelector
function
querySelectorAll
function
Element
function
prototype
object
after
function
append
function
prototype
object
before
function
childElementCount
classList
className
closest
function
prototype
object
firstElementChild
getAttribute
function
getAttributeNS
function
getAttributeNode
function
getAttributeNodeNS
function
getElementsByClassName
function
getElementsByTagName
function
getElementsByTagNameNS
function
getPrinceBoxes
function
A list of JavaScript objects called boxes.
hasAttribute
function
hasAttributeNS
function
id
innerHTML
lastElementChild
localName
matches
function
namespaceURI
nextElementSibling
nodeName
nodeType
number
previousElementSibling
querySelector
function
querySelectorAll
function
remove
function
removeAttribute
function
removeAttributeNS
function
removeAttributeNode
function
replaceWith
function
setAttribute
function
setAttributeNS
function
setAttributeNode
function
setAttributeNodeNS
function
tagName
Error
function
prototype
object
message
string
name
string
toString
function
stack
Event
function
prototype
object
EventTarget
function
prototype
object
addEventListener
function
dispatchEvent
function
removeEventListener
function
Function
function
prototype
function
apply
function
bindnew this object
function
Defines a value for the this object, returns a new function.
  • new this object
    object
function
var myObj = {};
function myFunc(){return this===myObj;};
var boundFunc = myFunc.bind(myObj);
boundFunc();
true
call
function
caller
object
toString
function
HTMLAnchorElement
function
Represents an HTML anchor element
prototype
object
hash
host
hostname
href
name
password
pathname
port
protocol
search
target
username
HTMLAreaElement
function
Represents an HTML area element
prototype
object
alt
coords
download
hash
host
hostname
href
password
pathname
port
protocol
rel
search
shape
target
username
name
HTMLBRElement
function
Represents an HTML br element
prototype
object
HTMLBaseElement
function
Represents an HTML base element
prototype
object
href
target
HTMLBodyElement
function
Represents an HTML body element
prototype
object
HTMLCanvasElement
function
Represents an HTML canvas element
prototype
object
getContext
function
height
width
HTMLCollection
function
Represents an HTML collection element
prototype
object
item
function
length
namedItem
function
entries
forEach
keys
values
HTMLDListElement
function
Represents an HTML d list element
prototype
object
HTMLDivElement
function
Represents an HTML div element
prototype
object
HTMLDocument
function
Represents an HTML document element
prototype
object
body
head
title
write
function
HTMLElement
function
Represents an HTML element
prototype
object
dataset
dir
lang
title
HTMLHRElement
function
Represents an HTML hr element
prototype
object
HTMLHeadElement
function
Represents an HTML head element
prototype
object
HTMLHeadingElement
function
Represents an HTML heading element
prototype
object
HTMLHtmlElement
function
Represents an HTML html element
prototype
object
HTMLImageElement
function
Represents an HTML image element
prototype
object
alt
height
src
width
HTMLInputElement
function
Represents an HTML input element
prototype
object
checked
disabled
name
type
value
HTMLLIElement
function
Represents an HTML li element
prototype
object
value
HTMLLinkElement
function
Represents an HTML link element
prototype
object
href
hreflang
media
rel
type
HTMLMetaElement
function
Represents an HTML meta element
prototype
object
content
name
HTMLModElement
function
Represents an HTML mod element
prototype
object
cite
HTMLOListElement
function
Represents an HTML o list element
prototype
object
start
type
HTMLOptionElement
function
Represents an HTML option element
prototype
object
disabled
selected
value
HTMLParagraphElement
function
Represents an HTML paragraph element
prototype
object
HTMLPreElement
function
Represents an HTML pre element
prototype
object
HTMLQuoteElement
function
Represents an HTML quote element
prototype
object
cite
HTMLScriptElement
function
Represents an HTML script element
prototype
object
src
type
HTMLSpanElement
function
Represents an HTML span element
prototype
object
HTMLStyleElement
function
Represents an HTML style element
prototype
object
media
type
HTMLTableCaptionElement
function
Represents an HTML table caption element
prototype
object
HTMLTableColElement
function
Represents an HTML table col element
prototype
object
span
HTMLTableDataCellElement
function
Represents an HTML table data cell element
prototype
object
HTMLTableElement
function
Represents an HTML table element
prototype
object
HTMLTableHeaderCellElement
function
Represents an HTML table header cell element
prototype
object
HTMLTableRowElement
function
Represents an HTML table row element
prototype
object
HTMLTableSectionElement
function
Represents an HTML table section element
prototype
object
HTMLTextAreaElement
function
Represents an HTML text area element
prototype
object
HTMLTitleElement
function
Represents an HTML title element
prototype
object
HTMLUListElement
function
Represents an HTML u list element
prototype
object
Image
function
prototype
object
ImageData
function
prototype
object
Infinity
number
The special value Infinity.
Int16Array
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
Int32Array
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
Int8Array
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
JSON
object
parse
function
stringify
function
Log
object
also available as Prince.Log.
dataname, value
function
  • name
    string
  • value
    string
debugmessage
function
only available when the --debug command-line option is specified.
  • message
    string
errormessage
function
  • message
    string
infomessage
function
only available when the --verbose command-line option is specified.
  • message
    string
warningmessage
function
  • message
    string
Map
function
prototype
object
clear
function
deletekey
function
  • key
    string
entries
function
forEachcallbackFn, thisArg
function
  • callbackFn
    function
  • thisArg
    argument
getkey
function
  • key
    string
haskey
function
  • key
    string
keys
function
setkey, value
function
  • key
    string
  • value
    string
size
values
function
Math
object
E
number
LN10
number
LN2
number
LOG10E
number
LOG2E
number
PI
number
SQRT1_2
number
SQRT2
number
abs
function
acos
function
acosh
function
asin
function
asinh
function
atan
function
atanh
function
atan2
function
cbrt
function
ceil
function
clz32
function
cos
function
cosh
function
exp
function
expm1
function
floor
function
fround
function
hypot
function
imul
function
log
function
log1p
function
log10
function
log2
function
max
function
min
function
pow
function
random
function
round
function
seedRandom
function
sign
function
sin
function
sinh
function
sqrt
function
tan
function
tanh
function
trunc
function
NaN
number
The special value Not a Number.
NamedNodeMap
function
prototype
object
getNamedItem
function
getNamedItemNS
function
item
function
length
removeNamedItem
function
removeNamedItemNS
function
setNamedItem
function
setNamedItemNS
function
Node
function
ATTRIBUTE_NODE
number
COMMENT_NODE
number
DOCUMENT_FRAGMENT_NODE
number
DOCUMENT_NODE
number
DOCUMENT_POSITION_CONTAINED_BY
number
DOCUMENT_POSITION_CONTAINS
number
DOCUMENT_POSITION_DISCONNECTED
number
DOCUMENT_POSITION_FOLLOWING
number
DOCUMENT_POSITION_PRECEDING
number
ELEMENT_NODE
number
TEXT_NODE
number
prototype
object
ATTRIBUTE_NODE
number
COMMENT_NODE
number
DOCUMENT_FRAGMENT_NODE
number
DOCUMENT_NODE
number
DOCUMENT_POSITION_CONTAINED_BY
number
DOCUMENT_POSITION_CONTAINS
number
DOCUMENT_POSITION_DISCONNECTED
number
DOCUMENT_POSITION_FOLLOWING
number
DOCUMENT_POSITION_PRECEDING
number
ELEMENT_NODE
number
TEXT_NODE
number
appendChild
function
cloneNode
function
compareDocumentPosition
function
contains
function
firstChild
object
hasAttributes
function
hasChildNodes
function
insertBefore
function
lastChild
object
nextSibling
ownerDocument
parentElement
parentNode
previousSibling
removeChild
function
replaceChild
function
textContent
object
NodeList
function
prototype
object
entries
function
forEach
function
item
function
keys
function
length
values
function
Number
function
MAX_SAFE_INTEGER
number
MAX_VALUE
number
MIN_SAFE_INTEGER
number
MIN_VALUE
number
NEGATIVE_INFINITY
number
NaN
number
POSITIVE_INFINITY
number
prototype
object
toExponential
function
toFixed
function
toPrecision
function
toString
function
valueOf
function
Object
function
assign
function
create
function
defineProperties
function
definePropertybase object, property name, descriptor
function
Adds a property to the object and defines certain traits like enumerability.
  • base object
    object
  • property name
    string
  • descriptor
    object
    An object describing the property
Object.defineProperty(Array.prototype, 'myProp',
  {enumerable: false})
entries
function
freeze
function
getOwnPropertyDescriptor
function
getOwnPropertyNames
function
getOwnPropertySymbols
function
getPrototypeOf
function
is
function
isExtensible
function
isFrozen
function
isSealed
function
keys
function
preventExtensions
function
prototype
object
hasOwn
function
__defineGetter__
function
__defineSetter__
function
__lookupGetter__
function
__lookupSetter__
function
__proto__
object
hasOwnProperty
function
isPrototypeOf
function
propertyIsEnumerable
function
toLocaleString
function
toString
function
valueOf
function
seal
function
setPrototypeOf
function
values
function
PDF
object
addAttachment
function
allowAnnotate
boolean
allowAssembly
boolean
allowCopy
boolean
allowCopyForAccessibility
boolean
allowModify
boolean
allowPrint
boolean
artificialFonts
boolean
attachFileURL, description, filename, relationship
function
  • URL
    string
  • description
    string
    Optional second argument to describe the attachment.
  • filename
    string
    Optional third argument to specify the filename to be displayed for the attachment in the PDF.
  • relationship
    string
    Optional fourth argument to specify the AFRelationship value of the attachment.
PDF.attachFile('data.xls', 'Latest sales figures.', 'SalesFigures', 'Data')
author
object
colorConversion
string
"none" | "full"
colorOptions
string
"auto" | "use-true-black" | "use-rich-black". See -prince-pdf-color-options
compress
boolean
creator
object
displayDocTitle
boolean
duplex
string
"auto" | "simplex" | "duplex-flip-short-edge" | "duplex-flip-long-edge"
embedFonts
boolean
encrypt
boolean
fallbackCMYKProfile
object
URL
filterResolution
string
DPI
PDF.filterResolution('128dpi')
forceIdentityEncoding
boolean
keyBits
number
keywords
object
lang
object
objectStreams
boolean
Can be used to disable PDF object streams. Object streams are enabled by default.
openAction
string
Note that Prince passes the provided values verbatim to the PDF viewer, so the user can supply values that Prince doesn't know about, but the viewer does.
PDF.openAction = 'print'
outputIntent
object
URL
ownerPassword
object
pageLayout
string
"single-page" | "one-column" | "two-column[-left/right]"
pageMode
string
"auto" | "show-bookmarks" | "fullscreen" | "show-attachments"
pages
object
A list of page boxes, can be accessed after document conversion has finished.
paperTray
string
"auto " | "pick-tray-by-pdf-size"
printScaling
string
"auto" | "none"
profile
string
One of the supported PDF profiles.
PDF.profile = "PDF/X-3:2003"
script
object
subject
object
subsetFonts
boolean
title
object
userPassword
object
xmp
object
URL
PDF.xmp = 'xmp-data.xmp';
xmpMetadata
boolean
PDF.xmpMetadata = true;
Prince
Log
object
also available as Log.
dataname, value
function
  • name
    string
  • value
    string
debugmessage
function
only available when the --debug command-line option is specified.
  • message
    string
errormessage
function
  • message
    string
infomessage
function
only available when the --verbose command-line option is specified.
  • message
    string
warningmessage
function
  • message
    string
addEventListenertype, callback, optional extra options
function
can be called to listen to the complete event on the Prince object. See Event Handling.
  • type
    string
  • callback
    string
  • optional extra options
    string
addScriptFuncname, function
function
exposes an arbitrary JavaScript function to CSS. See Script Functions.
  • name
    string
  • function
    string
convertToBufferJSON, ...optional extra job resources
function
  • JSON
    string
  • ...optional extra job resources
    ArrayBuffers or strings
ArrayBuffer if successful, null if not
convertToFileJSON, OutputFileName, ...optional extra job resources
function
  • JSON
    string
    as specified in the Job description JSON;
  • OutputFileName
    string
  • ...optional extra job resources
    ArrayBuffers or strings
boolean, indicating success
dispatchEvent
function
failStatus
boolean
boolean
pageCount
number
Total number of document pages, can be accessed after document conversion has finished.
registerPostLayoutFuncfunction
function
  • function
    string
removeEventListener
function
trackBoxes
boolean
  • boolean
oncomplete
The complete event is fired when all layout is finished (and after the last repeated layout, if this was requested), just before the PDF is output, so that it can cancel the PDF output by triggering a fail-safe if necessary, or log information about the PDF like the page count.
ProgressEvent
function
prototype
object
Proxytarget, handler
function
  • target
    object
  • handler
    object
revocable
function
RangeError
function
prototype
object
message
string
name
string
ReferenceError
function
prototype
object
message
string
name
string
Reflect
object
apply
function
construct
function
defineProperty
function
deleteProperty
function
get
function
getOwnPropertyDescriptor
function
getPrototypeOf
function
has
function
isExtensible
function
ownKeys
function
preventExtensions
function
set
function
setPrototypeOf
function
RegExp
function
prototype
object
exec
function
test
function
toString
function
SVGException
function
prototype
object
SVG_INVALID_VALUE_ERR
number
SVG_MATRIX_NOT_INVERTABLE
number
SVGMatrix
function
prototype
object
a
b
c
d
e
f
flipX
function
flipY
function
inverse
function
multiply
function
rotate
function
rotateFromVector
function
scale
function
scaleNonUniform
function
skewX
function
skewY
function
translate
function
Set
function
prototype
object
add
function
clear
function
delete
function
entries
function
forEach
function
has
function
keys
function
size
values
function
String
function
fromCharCode
function
fromCodePoint
function
prototype
object
charAt
function
charCodeAt
function
codePointAt
function
concat
function
endsWith
function
includes
function
indexOf
function
lastIndexOf
function
localeCompare
function
match
function
repeat
function
replace
function
search
function
slice
function
split
function
startsWith
function
substr
function
substring
function
toLocaleLowerCase
function
toLocaleUpperCase
function
toLowerCase
function
toString
function
toUpperCase
function
trim
function
valueOf
function
length
raw
function
Symbol
function
for
function
hasInstance
symbol
isConcatSpreadable
symbol
iterator
symbol
keyFor
function
match
symbol
prototype
object
toString
function
valueOf
function
replace
symbol
search
symbol
species
symbol
split
symbol
toPrimitive
symbol
toStringTag
symbol
unscopables
symbol
SyntaxError
function
prototype
object
message
string
name
string
Text
function
prototype
object
after
function
attributes
object
before
function
childNodes
object
data
length
nextElementSibling
nodeName
string
nodeType
number
nodeValue
previousElementSibling
remove
function
replaceWith
function
splitText
function
TextMetrics
function
prototype
object
TypeError
function
prototype
object
message
string
name
string
URIError
function
prototype
object
message
string
name
string
Uint16Array
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
Uint32Array
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
Uint8Array
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
Uint8ClampedArray
function
BYTES_PER_ELEMENT
number
from
function
prototype
object
BYTES_PER_ELEMENT
number
length
set
function
subarray
function
XMLHttpRequest
function
DONE
number
HEADERS_RECEIVED
number
LOADING
number
OPENED
number
UNSENT
number
prototype
object
DONE
number
HEADERS_RECEIVED
number
LOADING
number
OPENED
number
UNSENT
number
getAllResponseHeaders
function
getResponseHeader
function
open
function
readyState
response
responseText
responseType
send
function
setRequestHeader
function
status
addEventListener
function
alert
function
clearTimeout
function
console
object
error
function
info
function
log
function
warn
function
decodeURIURI
function
Decodes a Uniform Resource Identifier (URI).
  • URI
    string
    A complete URI
string
decodeURIComponentURI
function
Decodes a Uniform Resource Identifier (URI) component.
  • URI
    string
    A component of a URI
string
dispatchEvent
function
encodeURIURI
function
Encodes a Uniform Resource Identifier (URI).
  • URI
    string
    A complete URI
string
encodeURIComponentURI
function
Encodes a Uniform Resource Identifier (URI) component.
  • URI
    string
    A component of a URI
string
escapestring
function
Computes a new string by replacing certain characters with a hexadecimal escape sequence.
  • string
    string
    String to escape
string
evalsource
function
Evaluates text as JavaScript source code.
  • source
    string
    Code to evaluate
Result of evaluation
frames
object
getComputedStyle
function
hasOwnPropertyproperty
function
Returns a boolean indicating whether the object has the specified property.
  • property
    string
    The property to test
boolean
isFinite
function
Determines whether the passed value is a finite number.
boolean
isNaN
function
Checks if the argument's value is the special Not a Number value.
boolean
isNaN(parseInt('hello'))
true
isPrototypeOf
function
Checks if an object exists in another object's prototype chain.
boolean
length
number
location
object
navigator
object
appName
string
appVersion
string
onLine
boolean
platform
string
userAgent
string
parent
object
_is_root
parseFloat
function
Turns input into a floating point number.
number
parseFloat('1.5')
1.5
parseIntvalue, radix
function
Turns input into an integer number.
  • value
    string
  • radix
    number
    Indicates number base, for example 10 to parse input as a decimal value, 16 for hex values.
number
parseInt('50')
50
propertyIsEnumerable
function
Returns a Boolean indicating whether the specified property is enumerable.
boolean
removeEventListener
function
self
object
_is_root
setTimeout
function
toLocaleString
function
Converts an object to a string with a language sensitive representation of said string.
string
toString
function
Converts an object to a string.
string
top
object
_is_root
undefined
undefined
Represents the special value undefined.
unescapestring
function
Computes a new string by replacing hexadecimal escape sequences with the characters they represent.
  • string
    string
    String to unescape
string
valueOf
function
Returns the primitive value an object.
primitive value
window
object
_is_root