Appearance
Instance methods
Document properties
Manage document properties for example changing the document name.
getProperty()
Gets document property value
setProperty()
Sets document property value
TIP
To see available properties:
jsx
const document = await window.Cling.document.new()
console.log(document._document._doc)
Document properties - Shorthands
Simplifies managing specific document properties which would otherwise result in bulky code sections using setProperty().
addClient()
Adds a new client which will receive document on next send event.
removeClient()
Removes a client from document.
addReference()
Tag documents in order to find them consistently.
addArticle()
Adds a new article where price and more can be specifed
Block management
Blocks are visible sections in the document and can be partially manipulated using the methods below.
addBlock().pdf()
Adds a rendered PDF to the document
addBlock().answer()
Adds a interactive accept- and deny button to document
removeBlock()
Removes a block from document
State management
save()
Save document
send()
Send document to client
remove()
Remove document, invalidates existing signatures