diff --git a/README.md b/README.md new file mode 100644 index 0000000..dbf3d55 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# PDF Builder Operation for Directus + +The โ€œPDF Builder Operationโ€ extension for Directus allows automated generation of PDF files using custom JSON templates. +This operation can be integrated within Directus workflows, allowing the creation of highly customized PDF documents. +Use dynamic values extracted from other operations via `operationKey`, such as `{{read_users_collection.first_name}}`, +to customize the PDF content. + +# Installation + +Refer to the [Official Guide](https://docs.directus.io/extensions/installing-extensions.html) for details on installing +the extension from the Marketplace or manually. + +# Features + +- ๐Ÿ“„ Generate PDF files based on JSON content +- ๐Ÿ”— Add external fonts via URL +- ๐Ÿ”— Add internal fonts via UUID +- ๐Ÿ“ Custom file name and path +- ๐Ÿ—‚๏ธ Store generated PDF files in Directus + +# Usage + +Add the `PDF Builder Operation` via the flow builder and configure the operation with the desired settings. The +operation will generate a PDF file based on the provided JSON content. + +### General Form View + +This view shows the general configuration form for the PDF Builder operation, where you can define the operation key, +permissions, filename, storage, and the JSON template that will be used to generate the PDF. + +![Operation General Form View](screenshots/operation_general_form_view.png) + +### Font URL Configuration + +In this view, you can configure an external font by providing the URL. Ensure that the URL points to a TTF font file, as +only TTF fonts are supported. + +![Operation Font URL Form](screenshots/operation_font_url_form.png) + +### Font UUID Configuration + +This view allows you to select an internal font stored in Directus by using its UUID. The font must be of TTF type, and +the UUID is obtained from the file's URL within Directus. + +![Operation Font UUID Form](screenshots/operation_font_uuid_form.png) \ No newline at end of file diff --git a/package.json b/package.json index a71af93..ce28d8c 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,6 @@ "type": "git", "url": "git+https://github.com/somaromero/directus-extension-pdf-builder.git" }, - "publishConfig": { - "registry": "https://npm.pkg.github.com/" - }, "devDependencies": { "@directus/extensions-sdk": "11.0.9", "vue": "^3.4.34" diff --git a/screenshots/operation_font_url_form.png b/screenshots/operation_font_url_form.png new file mode 100644 index 0000000..63c15f6 Binary files /dev/null and b/screenshots/operation_font_url_form.png differ diff --git a/screenshots/operation_font_uuid_form.png b/screenshots/operation_font_uuid_form.png new file mode 100644 index 0000000..8b2a8c7 Binary files /dev/null and b/screenshots/operation_font_uuid_form.png differ diff --git a/screenshots/operation_general_form_view.png b/screenshots/operation_general_form_view.png new file mode 100644 index 0000000..7c16686 Binary files /dev/null and b/screenshots/operation_general_form_view.png differ