directus-extension-texttoanything
v1.7.2
Published
Generate PDF`s/QRcodes/Barcodes, use OCR and virusscanner within Directus!
Maintainers
Readme
Directus TextToAnything extension
Introduction
Do you want to create PDFs, barcodes, and QR codes or use OCR within Directus? This extension bundle offers the required operations to achieve that!
The installation process is explained in The site.
Features
const fileID = await globalThis.TTA.generatePDF({
pdfoptions: {
html: "HTML body",
footer: "HTML footer",
footer: "HTML header",
format: "A4",
landscape: false,
margin: 10,
marginRight: 5,
marginLeft: 500,
},
filename: "file.pdf",
});const fileID = await globalThis.TTA.generatePDFFromTemplate({
template: templateIDHere,
templatevariables: { variableOne: "A", variableTwo: "B" },
mode: "online",
});Offline mode will use the templates configured inside of Directus itself:
const fileID = await globalThis.TTA.generatePDFFromTemplate({
template: templateIDHere,
templatevariables: { variableOne: "A", variableTwo: "B" },
mode: "offline",
});const fileID = await globalThis.TTA.generateQRCode({
content: "Your barcode content!",
darkColor: "fff",
lightColor: "000",
margin: 2,
width: 200,
});const fileID = await globalThis.TTA.generateBarCode({
barcodeContent: "Your barcode content!",
barcodeType: "code128",
scale: 2,
height: 10,
includetext: true,
});If there are any questions or bugs, please create an issue. You can also join our Discord if you need direct support.
