karamokoisrael / directus-extension-flow2pdf

Other
14 stars 3 forks source link

Flow2Pdf

The flow2pdf extension is a bundle that allows directus to print data from flow results and liquid templates.

Requirements

Usage

The extension will add a new interface, endpoint and operation to your directus instance. Find the configurations for each interface type below

Interface Configuration

Interface Configuration

Name Type Default Description
margin number or array 0 PDF margin (in jsPDF units). Can be a single number, [vMargin, hMargin], or [top, left, bottom, right].
pagebreak object {mode: ['css', 'legacy']} Controls the pagebreak behaviour on the page. See Page-breaks below.
image object {type: 'jpeg', quality: 0.95} The image type and quality used to generate the PDF. See Image type and quality below.
enableLinks boolean true If enabled, PDF hyperlinks are automatically added ontop of all anchor tags.
html2canvas object { } Configuration options sent directly to html2canvas (see here for usage).
jsPDF object { } Configuration options sent directly to jsPDF (see here for usage).

API endpoint

If you want to print a pdf from you own app (Vuejs, Reactjs, Angular...), you can use the exposed endpoint flow2pdf/print

Extra