Skip to content

Commit

Permalink
Add screenshots and update README with detailed usage instructions 📸
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloImZomi committed Aug 23, 2024
1 parent 4b8bc80 commit a6acfdc
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Binary file added screenshots/operation_font_url_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/operation_font_uuid_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/operation_general_form_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6acfdc

Please sign in to comment.