Navigation :
Getting started
-
Client-side
-- Methods
-- Supported browsers
-- Examples
-
Server-side
-- Supported Node.js versions
-- Examples
Fonts
-
Custom fonts (client-side)
--
via Virtual file system (VFS)
--- Building font file via PHP script
--- Building font file via shell script
--
via URL protocol
- Icons
- Standard 14 fonts
Document-definition-object
- Styling
- Columns
- Tables
- Lists
- Headers and footers
- Background-layer
- Margins
- Stack of paragraphs
- Images
- SVGs
- Links
- QR code
- Table of contents
- Watermark
- Page dimensions, orientation and margins
- Document Metadata
- Patterns
- Compression
- Encryption and access privileges
- PDF/A
Options
Background-layer
The background-layer will be added on every page.
var docDefinition = {
background : 'simple text' ,
content : (...)
};
It may contain any other object as well (images, tables, …) or be dynamically generated:
var docDefinition = {
background : function ( currentPage , pageSize ) {
return `page ${ currentPage } with size ${ pageSize . width } x ${ pageSize . height } `
},
content : (...)
};