create_pdf
Creates a PDF document from a pdfmake document definition.
Returns a Buffer containing the PDF binary data. Throws an exception if the PDF cannot be created, for example because of an invalid image.
let pdfBuffer = create_pdf(docDefinition);
Example:
let docDefinition = {
content: "Hello World",
};
let pdfBuffer = create_pdf(docDefinition);
The pdf buffer can be used in various ways, for example to send an e-mail with the PDF attached or add a note with a PDF attachment to a Xurrent record.