directus-extension-texttoanything 1.5.3 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "directus-extension-texttoanything",
3
3
  "description": "Generate PDF`s/QRcodes/Barcodes or use OCR within Directus!",
4
- "version": "1.5.3",
4
+ "version": "1.7.0",
5
5
  "icon": "text_fields",
6
6
  "author": {
7
7
  "name": "Attacler/Bart",
8
- "email": "bart@attacler.com"
8
+ "email": "info@texttoanything.nl"
9
9
  },
10
10
  "license": "MIT",
11
11
  "bugs": {
@@ -72,6 +72,11 @@
72
72
  "name": "settings module",
73
73
  "source": "settingsmodule/src/index.ts"
74
74
  },
75
+ {
76
+ "type": "interface",
77
+ "name": "Online PDF template selector",
78
+ "source": "pdf/PDFOnlineTemplateSelector/src/index.ts"
79
+ },
75
80
  {
76
81
  "type": "interface",
77
82
  "name": "PDF template selector",
package/readme.md CHANGED
@@ -49,6 +49,7 @@ const fileID = await globalThis.TTA.generatePDF({
49
49
  <summary><h3>HTML PDF templates</h3></summary>
50
50
  More info on <a href="https://texttoanything.nl/docs/directus/pdftemplate" target="_blank">the wiki</a>.<br>
51
51
  Since creating a PDF template can be challenging when working solely with strings, this extension also includes a built-in template editor.<br>
52
+ Keep in mind that when using online mode, you will need to link your RapidAPI account <a href="https://texttoanything.nl/docs/dashboard/link-rapid-api-user">see this article for more details</a>
52
53
  <img src="https://texttoanything.nl/img/directus/pdf/templates-editor.png">
53
54
  PDF generation based on a template can be done in 2 ways: <br>
54
55
  <h4>Template to PDF inside Flows</h4>
@@ -59,6 +60,17 @@ const fileID = await globalThis.TTA.generatePDF({
59
60
  const fileID = await globalThis.TTA.generatePDFFromTemplate({
60
61
  template: templateIDHere,
61
62
  templatevariables: { variableOne: "A", variableTwo: "B" },
63
+ mode: "online",
64
+ });
65
+ ```
66
+
67
+ Offline mode will use the templates configured inside of Directus itself:
68
+
69
+ ```js
70
+ const fileID = await globalThis.TTA.generatePDFFromTemplate({
71
+ template: templateIDHere,
72
+ templatevariables: { variableOne: "A", variableTwo: "B" },
73
+ mode: "offline",
62
74
  });
63
75
  ```
64
76