[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"marketplace-site-banners":3,"github-stars":9,"@cesarechazu\u002Fdirectus-extension-generate-pdf":115},[4],{"id":5,"icon":6,"content":7,"link":8,"include_paths":6,"exclude_paths":6},"5cf2f5f6-aecf-4395-8c23-69de326fdf02",null,"AI Assistant: Query Your Data, Update Content + More","https:\u002F\u002Fdirectus.com\u002Fai",{"id":10,"node_id":11,"name":12,"full_name":13,"private":14,"owner":15,"html_url":33,"description":34,"fork":14,"url":35,"forks_url":36,"keys_url":37,"collaborators_url":38,"teams_url":39,"hooks_url":40,"issue_events_url":41,"events_url":42,"assignees_url":43,"branches_url":44,"tags_url":45,"blobs_url":46,"git_tags_url":47,"git_refs_url":48,"trees_url":49,"statuses_url":50,"languages_url":51,"stargazers_url":52,"contributors_url":53,"subscribers_url":54,"subscription_url":55,"commits_url":56,"git_commits_url":57,"comments_url":58,"issue_comment_url":59,"contents_url":60,"compare_url":61,"merges_url":62,"archive_url":63,"downloads_url":64,"issues_url":65,"pulls_url":66,"milestones_url":67,"notifications_url":68,"labels_url":69,"releases_url":70,"deployments_url":71,"created_at":72,"updated_at":73,"pushed_at":74,"git_url":75,"ssh_url":76,"clone_url":77,"svn_url":33,"homepage":78,"size":79,"stargazers_count":80,"watchers_count":80,"language":81,"has_issues":82,"has_projects":82,"has_downloads":14,"has_wiki":14,"has_pages":14,"has_discussions":82,"forks_count":83,"mirror_url":6,"archived":14,"disabled":14,"open_issues_count":84,"license":85,"allow_forking":82,"is_template":14,"web_commit_signoff_required":14,"has_pull_requests":82,"pull_request_creation_policy":90,"topics":91,"visibility":32,"forks":83,"open_issues":84,"watchers":80,"default_branch":111,"temp_clone_token":6,"custom_properties":112,"organization":113,"network_count":83,"subscribers_count":114},7122594,"MDEwOlJlcG9zaXRvcnk3MTIyNTk0","directus","directus\u002Fdirectus",false,{"login":12,"id":16,"node_id":17,"avatar_url":18,"gravatar_id":19,"url":20,"html_url":21,"followers_url":22,"following_url":23,"gists_url":24,"starred_url":25,"subscriptions_url":26,"organizations_url":27,"repos_url":28,"events_url":29,"received_events_url":30,"type":31,"user_view_type":32,"site_admin":14},15967950,"MDEyOk9yZ2FuaXphdGlvbjE1OTY3OTUw","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15967950?v=4","","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus","https:\u002F\u002Fgithub.com\u002Fdirectus","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Ffollowers","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Ffollowing{\u002Fother_user}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fgists{\u002Fgist_id}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fstarred{\u002Fowner}{\u002Frepo}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fsubscriptions","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Forgs","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Frepos","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fevents{\u002Fprivacy}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Freceived_events","Organization","public","https:\u002F\u002Fgithub.com\u002Fdirectus\u002Fdirectus","The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fforks","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fkeys{\u002Fkey_id}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcollaborators{\u002Fcollaborator}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fteams","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fhooks","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fissues\u002Fevents{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fevents","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fassignees{\u002Fuser}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fbranches{\u002Fbranch}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Ftags","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Fblobs{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Ftags{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Frefs{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Ftrees{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fstatuses\u002F{sha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Flanguages","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fstargazers","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcontributors","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fsubscribers","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fsubscription","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcommits{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Fcommits{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcomments{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fissues\u002Fcomments{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcontents\u002F{+path}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcompare\u002F{base}...{head}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fmerges","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002F{archive_format}{\u002Fref}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fdownloads","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fissues{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fpulls{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fmilestones{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fnotifications{?since,all,participating}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Flabels{\u002Fname}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Freleases{\u002Fid}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fdeployments","2012-12-12T01:35:36Z","2026-10-24T00:18:42Z","2026-10-23T22:30:19Z","git:\u002F\u002Fgithub.com\u002Fdirectus\u002Fdirectus.git","git@github.com:directus\u002Fdirectus.git","https:\u002F\u002Fgithub.com\u002Fdirectus\u002Fdirectus.git","https:\u002F\u002Fdirectus.com",454959,38625,"TypeScript",true,4980,351,{"key":86,"name":87,"spdx_id":88,"url":6,"node_id":89},"other","Other","NOASSERTION","MDc6TGljZW5zZTA=","all",[92,93,94,95,96,97,12,98,99,100,101,102,103,104,105,106,107,108,109,110],"api","app","cms","composable","data-visualization","database","graphql","headless-cms","javascript","mariadb","mssql","mysql","no-code","node","postgresql","sql","sqlite","typescript","vue","main",{},{"login":12,"id":16,"node_id":17,"avatar_url":18,"gravatar_id":19,"url":20,"html_url":21,"followers_url":22,"following_url":23,"gists_url":24,"starred_url":25,"subscriptions_url":26,"organizations_url":27,"repos_url":28,"events_url":29,"received_events_url":30,"type":31,"user_view_type":32,"site_admin":14},346,{"name":116,"description":117,"verified":14,"id":118,"readme":119,"type":120,"publisher":121,"last_updated":126,"host_version":127,"downloads":128,"total_downloads":129,"sandbox":14,"license":130,"versions":131,"formatted_name":176,"formatted_readme":177,"formatted_description":117,"featured_image":178,"images":179,"repository_url":136,"recent_downloads_7_days":129,"recent_downloads_30_days":129},"@cesarechazu\u002Fdirectus-extension-generate-pdf","Directus Flow operation to generate generic PDFs from JSON using pdfme","209a3887-ae63-4839-872f-faa63428c915","# Generate PDF\n\nDirectus Flow operation that generates PDF files from JSON templates using [`pdfme`](https:\u002F\u002Fpdfme.com\u002F).\n\n## Flow Operation\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Fedit_operation.jpg\" alt=\"Generate PDF flow operation\" width=\"472\">\n\n## Features\n\n- Generic [`pdfme`](https:\u002F\u002Fpdfme.com\u002F) template rendering from JSON\n- `template.basePdf` is the source of truth for page size and margins\n- Optional full-page backgrounds through a single `background_image` value\n- Output to Directus Files or raw base64 response\n- Dot notation support in schema names, for example `user.first_name`\n- Built-in local `Roboto-Bold` registration from `fonts\u002FRoboto-Bold.ttf`\n- Built-in plugins for text, images, shapes, dates, form controls, tables, and barcodes\n\n## Installation\n\nLocal extension:\n\n```bash\ncd extensions\u002Fdirectus-extension-generate-pdf\nnpm install\n```\n\nThen restart Directus so it reloads the extension.\n\nTo rebuild the published extension files after changing `src\u002F`:\n\n```bash\nnpm run build\n```\n\n## Operation\n\n- Extension package: `@cesarechazu\u002Fdirectus-extension-generate-pdf`\n- Operation ID: `generate-pdf-operation`\n- Display name: `Generate PDF`\n\n## Inputs\n\n- `template`: [`pdfme`](https:\u002F\u002Fpdfme.com\u002F) template object\n- `inputs`: object or array of objects used by template fields\n- `generate_options`: optional object passed to [`pdfme.generate()`](https:\u002F\u002Fpdfme.com\u002F)\n- `background_image`: optional image source used as full-page background. Accepts `data:image\u002F...`, a same-host `\u002Fassets\u002F\u003Cfile_id>` URL, or a Directus file ID\n- `filename`: output filename\n- `title`: Directus file title\n- `storage`: Directus storage adapter\n- `folder`: optional Directus folder\n- `store_file`: store the PDF in Directus Files, defaults to `true`\n- `return_base64`: include PDF base64 in the operation response, defaults to `false`\n\n## Response\n\n- `file_id`: Directus file ID when the PDF is stored\n- `filename`: generated filename\n- `title`: Directus file title used for the stored asset\n- `storage`: Directus storage adapter used for the output\n- `stored`: whether the PDF was uploaded to Directus Files\n- `folder`: Directus folder ID when provided\n- `asset_url`: asset URL when the file was stored and `PUBLIC_URL` is configured\n- `mime_type`: always `application\u002Fpdf`\n- `bytes`: generated PDF size in bytes\n- `pages`: number of generated pages (based on `inputs`)\n- `warnings`: non-fatal warnings collected during generation\n- `base64`: optional PDF base64 when `return_base64` is `true`\n\n## Supported Schema Types\n\n- Text: `text`, `multiVariableText`\n- Media: `image`, `svg`\n- Layout and shapes: `table`, `line`, `rectangle`, `ellipse`\n- Date and time: `dateTime`, `date`, `time`\n- Form controls: `select`, `radioGroup`, `checkbox`\n- Barcodes: `qrcode`, `japanpost`, `ean13`, `ean8`, `code39`, `code128`, `nw7`, `itf14`, `upca`, `upce`, `gs1datamatrix`, `pdf417`\n\n\n## Notes\n\n- Page size and margins must be defined in `template.basePdf`.\n- This operation does not override page size or margins with separate fields.\n- `generate_options` is for PDF metadata, color mode, and fonts. It does not control page size, margins, or schema positions.\n- `background_image` accepts `data:image\u002F...`, a URL on the same host as Directus `PUBLIC_URL` under `\u002Fassets\u002F`, or a Directus file ID **(recommended)**.\n- URLs on other hosts are rejected. In this version, external background images must be uploaded to Directus first and then referenced by asset URL or file ID.\n- Background images are validated as supported image files (`png`, `jpeg`, `webp`, `gif`) before being embedded.\n- If a background is provided and `basePdf` is blank-object mode, it is inserted as a full-page static background.\n- If a schema name is `user.first_name`, the operation can resolve it from nested input data such as `{ \"user\": { \"first_name\": \"John\" } }`.\n\n## Fonts\n\n- Default fallback font is `Roboto`.\n- `Roboto-Bold` is auto-registered from `fonts\u002FRoboto-Bold.ttf` when the file is present.\n- You can still define custom fonts in `generate_options.font`.\n\n## Hello PDF Example\n\nTemplate:\n\n```json\n{\n  \"basePdf\": {\n    \"width\": 210,\n    \"height\": 297,\n    \"padding\": [10, 10, 10, 10]\n  },\n  \"schemas\": [\n    [\n      {\n        \"name\": \"highlight_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 42 },\n        \"width\": 170,\n        \"height\": 42,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#0F172A\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"title\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 20, \"y\": 24 },\n        \"width\": 120,\n        \"height\": 12,\n        \"fontSize\": 24,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"body\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 26, \"y\": 52 },\n        \"width\": 170,\n        \"height\": 24,\n        \"fontSize\": 12\n      },\n      {\n        \"name\": \"separator\",\n        \"type\": \"line\",\n        \"position\": { \"x\": 20, \"y\": 96 },\n        \"width\": 170,\n        \"height\": 1,\n        \"color\": \"#CBD5E1\"\n      },\n      {\n        \"name\": \"qr_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 20, \"y\": 104 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"QR\"\n      },\n      {\n        \"name\": \"qr_code\",\n        \"type\": \"qrcode\",\n        \"position\": { \"x\": 20, \"y\": 112 },\n        \"width\": 30,\n        \"height\": 30,\n        \"content\": \"https:\u002F\u002Fdirectus.io\u002Fdocs\",\n        \"backgroundColor\": \"#FFFFFF\",\n        \"barColor\": \"#111827\"\n      },\n      {\n        \"name\": \"ean_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 60, \"y\": 104 },\n        \"width\": 90,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"EAN-13\"\n      },\n      {\n        \"name\": \"ean_code\",\n        \"type\": \"ean13\",\n        \"position\": { \"x\": 60, \"y\": 112 },\n        \"width\": 90,\n        \"height\": 18,\n        \"content\": \"2112345678900\",\n        \"backgroundColor\": \"#FFFFFF\",\n        \"barColor\": \"#111827\",\n        \"textColor\": \"#111827\",\n        \"includetext\": true\n      },\n      {\n        \"name\": \"footer\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 20, \"y\": 150 },\n        \"width\": 170,\n        \"height\": 10,\n        \"fontSize\": 10\n      }\n    ]\n  ]\n}\n```\n\nInputs:\n\n```json\n{\n  \"title\": \"Hello PDF\",\n  \"body\": \"This document shows text, a shape, a divider line, a QR code, and an EAN-13 barcode generated from JSON.\",\n  \"qr_code\": \"https:\u002F\u002Fdirectus.io\u002Fdocs\",\n  \"ean_code\": \"2112345678900\",\n  \"footer\": \"Useful for receipts, labels, certificates, or simple printable layouts.\"\n}\n```\n\n## Example Result\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Fdemo.jpg\" alt=\"Generate PDF demo\" width=\"370\">\n\nMulti-page inputs:\n\n```json\n[\n  { \"title\": \"Page 1\", \"body\": \"First page\" },\n  { \"title\": \"Page 2\", \"body\": \"Second page\" }\n]\n```\n\n## Invoice Example\n\nTemplate:\n\n\u003Cdetails>\n  \u003Csummary>Show Template JSON\u003C\u002Fsummary>\n\n```json\n{\n  \"basePdf\": {\n    \"width\": 210,\n    \"height\": 297,\n    \"padding\": [10, 10, 10, 10]\n  },\n  \"schemas\": [\n    [\n      {\n        \"name\": \"header_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 18 },\n        \"width\": 170,\n        \"height\": 28,\n        \"borderWidth\": 0,\n        \"borderColor\": \"#0F172A\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"invoice_title\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 24 },\n        \"width\": 80,\n        \"height\": 12,\n        \"fontSize\": 22,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"INVOICE\"\n      },\n      {\n        \"name\": \"company_name\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 34 },\n        \"width\": 70,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Example Labs LLC\"\n      },\n      {\n        \"name\": \"invoice_number_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 132, \"y\": 24 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Number\"\n      },\n      {\n        \"name\": \"invoice_number\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 160, \"y\": 24 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"issue_date_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 132, \"y\": 32 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Date\"\n      },\n      {\n        \"name\": \"issue_date\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 160, \"y\": 32 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"due_date_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 132, \"y\": 40 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Due\"\n      },\n      {\n        \"name\": \"due_date\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 160, \"y\": 40 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"customer_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 56 },\n        \"width\": 82,\n        \"height\": 42,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#CBD5E1\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"seller_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 108, \"y\": 56 },\n        \"width\": 82,\n        \"height\": 42,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#CBD5E1\",\n        \"color\": \"#FFFFFF\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"bill_to_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 60 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"Bill To\"\n      },\n      {\n        \"name\": \"customer_name\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 68 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 12,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"customer_tax_id\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 78 },\n        \"width\": 70,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"customer_address\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 86 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 8\n      },\n      {\n        \"name\": \"from_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 60 },\n        \"width\": 20,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"From\"\n      },\n      {\n        \"name\": \"seller_name\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 68 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 11,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"seller_tax_id\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 78 },\n        \"width\": 70,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"seller_address\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 86 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 8\n      },\n      {\n        \"name\": \"items_header_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 108 },\n        \"width\": 170,\n        \"height\": 10,\n        \"borderWidth\": 0,\n        \"borderColor\": \"#E2E8F0\",\n        \"color\": \"#E2E8F0\",\n        \"radius\": 1\n      },\n      {\n        \"name\": \"items_header_line\",\n        \"type\": \"line\",\n        \"position\": { \"x\": 20, \"y\": 118 },\n        \"width\": 170,\n        \"height\": 1,\n        \"color\": \"#CBD5E1\"\n      },\n      {\n        \"name\": \"description_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 111 },\n        \"width\": 78,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Description\"\n      },\n      {\n        \"name\": \"qty_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 110, \"y\": 111 },\n        \"width\": 15,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Qty\"\n      },\n      {\n        \"name\": \"price_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 111 },\n        \"width\": 20,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Price\"\n      },\n      {\n        \"name\": \"discount_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 150, \"y\": 111 },\n        \"width\": 16,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Disc.\"\n      },\n      {\n        \"name\": \"total_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 170, \"y\": 111 },\n        \"width\": 18,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Total\"\n      },\n      {\n        \"name\": \"invoice_items\",\n        \"type\": \"table\",\n        \"position\": { \"x\": 20, \"y\": 120 },\n        \"width\": 170,\n        \"height\": 64,\n        \"content\": \"[]\",\n        \"showHead\": false,\n        \"repeatHead\": false,\n        \"head\": [\"Description\", \"Qty\", \"Price\", \"Disc.\", \"Total\"],\n        \"headWidthPercentages\": [50, 12, 14, 10, 14],\n        \"tableStyles\": {\n          \"borderColor\": \"#CBD5E1\",\n          \"borderWidth\": 0.2\n        },\n        \"headStyles\": {\n          \"fontName\": \"Roboto-Bold\",\n          \"alignment\": \"left\",\n          \"verticalAlignment\": \"middle\",\n          \"fontSize\": 8,\n          \"lineHeight\": 1,\n          \"characterSpacing\": 0,\n          \"fontColor\": \"#0F172A\",\n          \"backgroundColor\": \"#E2E8F0\",\n          \"borderColor\": \"#CBD5E1\",\n          \"borderWidth\": { \"top\": 0, \"right\": 0, \"bottom\": 0, \"left\": 0 },\n          \"padding\": { \"top\": 2, \"right\": 2, \"bottom\": 2, \"left\": 2 }\n        },\n        \"bodyStyles\": {\n          \"fontName\": \"Roboto\",\n          \"alignment\": \"left\",\n          \"verticalAlignment\": \"middle\",\n          \"fontSize\": 8,\n          \"lineHeight\": 1,\n          \"characterSpacing\": 0,\n          \"fontColor\": \"#111827\",\n          \"backgroundColor\": \"#FFFFFF\",\n          \"alternateBackgroundColor\": \"#F8FAFC\",\n          \"borderColor\": \"#E2E8F0\",\n          \"borderWidth\": { \"top\": 0, \"right\": 0, \"bottom\": 0.1, \"left\": 0 },\n          \"padding\": { \"top\": 2, \"right\": 2, \"bottom\": 2, \"left\": 2 }\n        },\n        \"columnStyles\": {\n          \"alignment\": {\n            \"1\": \"center\",\n            \"2\": \"right\",\n            \"3\": \"right\",\n            \"4\": \"right\"\n          }\n        }\n      },\n      {\n        \"name\": \"totals_line\",\n        \"type\": \"line\",\n        \"position\": { \"x\": 120, \"y\": 194 },\n        \"width\": 70,\n        \"height\": 1,\n        \"color\": \"#CBD5E1\"\n      },\n      {\n        \"name\": \"subtotal_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 200 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Subtotal\"\n      },\n      {\n        \"name\": \"subtotal\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 200 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"discount_total_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 208 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Discount\"\n      },\n      {\n        \"name\": \"discount_total\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 208 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"tax_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 216 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Tax\"\n      },\n      {\n        \"name\": \"tax\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 216 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"total_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 226 },\n        \"width\": 30,\n        \"height\": 7,\n        \"fontSize\": 10,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"total\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 226 },\n        \"width\": 25,\n        \"height\": 7,\n        \"fontSize\": 10,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"payment_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 244 },\n        \"width\": 170,\n        \"height\": 34,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#CBD5E1\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"payment_note\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 250 },\n        \"width\": 116,\n        \"height\": 12,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"bank_reference\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 264 },\n        \"width\": 116,\n        \"height\": 8,\n        \"fontSize\": 8\n      },\n      {\n        \"name\": \"payment_qr\",\n        \"type\": \"qrcode\",\n        \"position\": { \"x\": 150, \"y\": 250 },\n        \"width\": 24,\n        \"height\": 24,\n        \"backgroundColor\": \"#FFFFFF\",\n        \"barColor\": \"#111827\"\n      }\n    ]\n  ]\n}\n```\n\n\u003C\u002Fdetails>\n\nInputs:\n\n\u003Cdetails>\n  \u003Csummary>Show Inputs JSON\u003C\u002Fsummary>\n\n```json\n{\n  \"invoice_number\": \"INV-0001\",\n  \"issue_date\": \"2026-02-28\",\n  \"due_date\": \"2026-03-15\",\n  \"customer_name\": \"Ada Lovelace\",\n  \"customer_tax_id\": \"Tax ID: 20-12345678-9\",\n  \"customer_address\": \"12 Analytical Engine St, London\",\n  \"seller_name\": \"Example Labs LLC\",\n  \"seller_tax_id\": \"VAT ID: GB-99887766\",\n  \"seller_address\": \"42 Computing Ave, Manchester\",\n  \"invoice_items\": [\n    [\"Discovery workshop and architecture review\", \"1\", \"$600.00\", \"$0.00\", \"$600.00\"],\n    [\"Custom flow development\", \"8\", \"$120.00\", \"$80.00\", \"$880.00\"],\n    [\"PDF template implementation\", \"3\", \"$150.00\", \"$0.00\", \"$450.00\"],\n    [\"QA and browser validation\", \"2\", \"$90.00\", \"$0.00\", \"$180.00\"],\n    [\"Deployment and handoff session\", \"1\", \"$220.00\", \"$20.00\", \"$200.00\"]\n  ],\n  \"subtotal\": \"$2,310.00\",\n  \"discount_total\": \"$100.00\",\n  \"tax\": \"$464.10\",\n  \"total_label\": \"Total\",\n  \"total\": \"$2,674.10\",\n  \"payment_note\": \"Please transfer the balance before the due date. Scan the QR to open the payment portal or use the bank reference below.\",\n  \"bank_reference\": \"Reference: INV-0001 | IBAN: GB82 WEST 1234 5698 7654 32\",\n  \"payment_qr\": \"https:\u002F\u002Fpay.example.com\u002Finvoices\u002FINV-0001\"\n}\n```\n\n\u003C\u002Fdetails>\n\n## Invoice example result\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Finvoice_example.jpg\" alt=\"Invoice example result\" width=\"400\">\n\n## Generate Options Example\n\n```json\n{\n  \"title\": \"Invoice INV-0001\",\n  \"subject\": \"Professional services invoice\",\n  \"author\": \"Example Labs LLC\",\n  \"creator\": \"Directus Flow: Generate PDF\",\n  \"producer\": \"pdfme\",\n  \"keywords\": [\"invoice\", \"directus\", \"billing\", \"pdf\"],\n  \"colorType\": \"rgb\",\n  \"lang\": \"en\"\n}\n```\n\n## License\n\nMIT (`MIT`)\n","operation",{"username":122,"verified":14,"id":123,"github_username":122,"github_name":124,"github_blog":19,"github_bio":6,"github_location":6,"github_company":6,"github_avatar_url":125},"cesarechazu","a3f3ea2e-9dbd-4ad5-a92c-b9e673f9b7dd","Cesar Mauricio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22593033?v=4","2026-03-01T12:33:02.689Z","^11.0.0",[],0,"MIT",[132,145,153,160,168],{"version":133,"package":118,"publisher":123,"type":120,"host_version":127,"publish_date":134,"verified":14,"id":135,"url_repository":136,"url_homepage":137,"url_bugs":138,"file_count":139,"unpacked_size":140,"bundled":141,"maintainers":142,"sandbox":14,"sandbox_requested_scopes":6,"license":144},"1.0.3","2026-03-01T02:20:54.675Z","662e1cc5-d185-4d96-9927-b89f8a7831a4","https:\u002F\u002Fgithub.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf.git","https:\u002F\u002Fgithub.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf#readme","https:\u002F\u002Fgithub.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fissues",7,243546,[],[143],13834,"GPL-3.0-or-later",{"version":146,"package":118,"publisher":123,"type":120,"host_version":127,"publish_date":147,"verified":14,"id":148,"url_repository":136,"url_homepage":137,"url_bugs":138,"file_count":139,"unpacked_size":149,"bundled":150,"maintainers":151,"sandbox":14,"sandbox_requested_scopes":6,"license":144},"1.0.0","2026-03-01T00:49:59.917Z","b763d1d7-13c4-4e81-bfe7-9b6d2605b8ed",242619,[],[152],13833,{"version":154,"package":118,"publisher":123,"type":120,"host_version":127,"publish_date":126,"verified":14,"id":155,"url_repository":136,"url_homepage":137,"url_bugs":138,"file_count":139,"unpacked_size":156,"bundled":157,"maintainers":158,"sandbox":14,"sandbox_requested_scopes":6,"license":130},"1.0.6","bb8b1058-9923-49fa-947e-ce1af80e3c26",9945346,[],[159],13838,{"version":161,"package":118,"publisher":123,"type":120,"host_version":127,"publish_date":162,"verified":14,"id":163,"url_repository":136,"url_homepage":137,"url_bugs":138,"file_count":139,"unpacked_size":164,"bundled":165,"maintainers":166,"sandbox":14,"sandbox_requested_scopes":6,"license":130},"1.0.5","2026-03-01T12:30:29.218Z","c208670b-b0cb-42f2-a6c9-1feae8d9f21e",9945077,[],[167],13837,{"version":169,"package":118,"publisher":123,"type":120,"host_version":127,"publish_date":170,"verified":14,"id":171,"url_repository":136,"url_homepage":137,"url_bugs":138,"file_count":139,"unpacked_size":172,"bundled":173,"maintainers":174,"sandbox":14,"sandbox_requested_scopes":6,"license":130},"1.0.4","2026-03-01T02:43:01.405Z","ccb9bbb4-59d7-4296-b0e3-3a10a6c03dcc",209764,[],[175],13835,"Generate PDF","\u003Ch1>Generate PDF\u003C\u002Fh1>\n\u003Cp>Directus Flow operation that generates PDF files from JSON templates using \u003Ca href=\"https:\u002F\u002Fpdfme.com\u002F\">\u003Ccode>pdfme\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2>Flow Operation\u003C\u002Fh2>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Fedit_operation.jpg\" alt=\"Generate PDF flow operation\">\n\u003Ch2>Features\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Generic \u003Ca href=\"https:\u002F\u002Fpdfme.com\u002F\">\u003Ccode>pdfme\u003C\u002Fcode>\u003C\u002Fa> template rendering from JSON\u003C\u002Fli>\n\u003Cli>\u003Ccode>template.basePdf\u003C\u002Fcode> is the source of truth for page size and margins\u003C\u002Fli>\n\u003Cli>Optional full-page backgrounds through a single \u003Ccode>background_image\u003C\u002Fcode> value\u003C\u002Fli>\n\u003Cli>Output to Directus Files or raw base64 response\u003C\u002Fli>\n\u003Cli>Dot notation support in schema names, for example \u003Ccode>user.first_name\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Built-in local \u003Ccode>Roboto-Bold\u003C\u002Fcode> registration from \u003Ccode>fonts\u002FRoboto-Bold.ttf\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Built-in plugins for text, images, shapes, dates, form controls, tables, and barcodes\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Installation\u003C\u002Fh2>\n\u003Cp>Local extension:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">cd extensions\u002Fdirectus-extension-generate-pdf\nnpm install\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Then restart Directus so it reloads the extension.\u003C\u002Fp>\n\u003Cp>To rebuild the published extension files after changing \u003Ccode>src\u002F\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">npm run build\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Operation\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Extension package: \u003Ccode>@cesarechazu\u002Fdirectus-extension-generate-pdf\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Operation ID: \u003Ccode>generate-pdf-operation\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Display name: \u003Ccode>Generate PDF\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Inputs\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ccode>template\u003C\u002Fcode>: \u003Ca href=\"https:\u002F\u002Fpdfme.com\u002F\">\u003Ccode>pdfme\u003C\u002Fcode>\u003C\u002Fa> template object\u003C\u002Fli>\n\u003Cli>\u003Ccode>inputs\u003C\u002Fcode>: object or array of objects used by template fields\u003C\u002Fli>\n\u003Cli>\u003Ccode>generate_options\u003C\u002Fcode>: optional object passed to \u003Ca href=\"https:\u002F\u002Fpdfme.com\u002F\">\u003Ccode>pdfme.generate()\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ccode>background_image\u003C\u002Fcode>: optional image source used as full-page background. Accepts \u003Ccode>data:image\u002F...\u003C\u002Fcode>, a same-host \u003Ccode>\u002Fassets\u002F&lt;file_id&gt;\u003C\u002Fcode> URL, or a Directus file ID\u003C\u002Fli>\n\u003Cli>\u003Ccode>filename\u003C\u002Fcode>: output filename\u003C\u002Fli>\n\u003Cli>\u003Ccode>title\u003C\u002Fcode>: Directus file title\u003C\u002Fli>\n\u003Cli>\u003Ccode>storage\u003C\u002Fcode>: Directus storage adapter\u003C\u002Fli>\n\u003Cli>\u003Ccode>folder\u003C\u002Fcode>: optional Directus folder\u003C\u002Fli>\n\u003Cli>\u003Ccode>store_file\u003C\u002Fcode>: store the PDF in Directus Files, defaults to \u003Ccode>true\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>return_base64\u003C\u002Fcode>: include PDF base64 in the operation response, defaults to \u003Ccode>false\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Response\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ccode>file_id\u003C\u002Fcode>: Directus file ID when the PDF is stored\u003C\u002Fli>\n\u003Cli>\u003Ccode>filename\u003C\u002Fcode>: generated filename\u003C\u002Fli>\n\u003Cli>\u003Ccode>title\u003C\u002Fcode>: Directus file title used for the stored asset\u003C\u002Fli>\n\u003Cli>\u003Ccode>storage\u003C\u002Fcode>: Directus storage adapter used for the output\u003C\u002Fli>\n\u003Cli>\u003Ccode>stored\u003C\u002Fcode>: whether the PDF was uploaded to Directus Files\u003C\u002Fli>\n\u003Cli>\u003Ccode>folder\u003C\u002Fcode>: Directus folder ID when provided\u003C\u002Fli>\n\u003Cli>\u003Ccode>asset_url\u003C\u002Fcode>: asset URL when the file was stored and \u003Ccode>PUBLIC_URL\u003C\u002Fcode> is configured\u003C\u002Fli>\n\u003Cli>\u003Ccode>mime_type\u003C\u002Fcode>: always \u003Ccode>application\u002Fpdf\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>bytes\u003C\u002Fcode>: generated PDF size in bytes\u003C\u002Fli>\n\u003Cli>\u003Ccode>pages\u003C\u002Fcode>: number of generated pages (based on \u003Ccode>inputs\u003C\u002Fcode>)\u003C\u002Fli>\n\u003Cli>\u003Ccode>warnings\u003C\u002Fcode>: non-fatal warnings collected during generation\u003C\u002Fli>\n\u003Cli>\u003Ccode>base64\u003C\u002Fcode>: optional PDF base64 when \u003Ccode>return_base64\u003C\u002Fcode> is \u003Ccode>true\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Supported Schema Types\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Text: \u003Ccode>text\u003C\u002Fcode>, \u003Ccode>multiVariableText\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Media: \u003Ccode>image\u003C\u002Fcode>, \u003Ccode>svg\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Layout and shapes: \u003Ccode>table\u003C\u002Fcode>, \u003Ccode>line\u003C\u002Fcode>, \u003Ccode>rectangle\u003C\u002Fcode>, \u003Ccode>ellipse\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Date and time: \u003Ccode>dateTime\u003C\u002Fcode>, \u003Ccode>date\u003C\u002Fcode>, \u003Ccode>time\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Form controls: \u003Ccode>select\u003C\u002Fcode>, \u003Ccode>radioGroup\u003C\u002Fcode>, \u003Ccode>checkbox\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Barcodes: \u003Ccode>qrcode\u003C\u002Fcode>, \u003Ccode>japanpost\u003C\u002Fcode>, \u003Ccode>ean13\u003C\u002Fcode>, \u003Ccode>ean8\u003C\u002Fcode>, \u003Ccode>code39\u003C\u002Fcode>, \u003Ccode>code128\u003C\u002Fcode>, \u003Ccode>nw7\u003C\u002Fcode>, \u003Ccode>itf14\u003C\u002Fcode>, \u003Ccode>upca\u003C\u002Fcode>, \u003Ccode>upce\u003C\u002Fcode>, \u003Ccode>gs1datamatrix\u003C\u002Fcode>, \u003Ccode>pdf417\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Notes\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Page size and margins must be defined in \u003Ccode>template.basePdf\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>This operation does not override page size or margins with separate fields.\u003C\u002Fli>\n\u003Cli>\u003Ccode>generate_options\u003C\u002Fcode> is for PDF metadata, color mode, and fonts. It does not control page size, margins, or schema positions.\u003C\u002Fli>\n\u003Cli>\u003Ccode>background_image\u003C\u002Fcode> accepts \u003Ccode>data:image\u002F...\u003C\u002Fcode>, a URL on the same host as Directus \u003Ccode>PUBLIC_URL\u003C\u002Fcode> under \u003Ccode>\u002Fassets\u002F\u003C\u002Fcode>, or a Directus file ID \u003Cstrong>(recommended)\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>URLs on other hosts are rejected. In this version, external background images must be uploaded to Directus first and then referenced by asset URL or file ID.\u003C\u002Fli>\n\u003Cli>Background images are validated as supported image files (\u003Ccode>png\u003C\u002Fcode>, \u003Ccode>jpeg\u003C\u002Fcode>, \u003Ccode>webp\u003C\u002Fcode>, \u003Ccode>gif\u003C\u002Fcode>) before being embedded.\u003C\u002Fli>\n\u003Cli>If a background is provided and \u003Ccode>basePdf\u003C\u002Fcode> is blank-object mode, it is inserted as a full-page static background.\u003C\u002Fli>\n\u003Cli>If a schema name is \u003Ccode>user.first_name\u003C\u002Fcode>, the operation can resolve it from nested input data such as \u003Ccode>{ \"user\": { \"first_name\": \"John\" } }\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Fonts\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Default fallback font is \u003Ccode>Roboto\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>Roboto-Bold\u003C\u002Fcode> is auto-registered from \u003Ccode>fonts\u002FRoboto-Bold.ttf\u003C\u002Fcode> when the file is present.\u003C\u002Fli>\n\u003Cli>You can still define custom fonts in \u003Ccode>generate_options.font\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Hello PDF Example\u003C\u002Fh2>\n\u003Cp>Template:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"basePdf\": {\n    \"width\": 210,\n    \"height\": 297,\n    \"padding\": [10, 10, 10, 10]\n  },\n  \"schemas\": [\n    [\n      {\n        \"name\": \"highlight_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 42 },\n        \"width\": 170,\n        \"height\": 42,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#0F172A\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"title\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 20, \"y\": 24 },\n        \"width\": 120,\n        \"height\": 12,\n        \"fontSize\": 24,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"body\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 26, \"y\": 52 },\n        \"width\": 170,\n        \"height\": 24,\n        \"fontSize\": 12\n      },\n      {\n        \"name\": \"separator\",\n        \"type\": \"line\",\n        \"position\": { \"x\": 20, \"y\": 96 },\n        \"width\": 170,\n        \"height\": 1,\n        \"color\": \"#CBD5E1\"\n      },\n      {\n        \"name\": \"qr_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 20, \"y\": 104 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"QR\"\n      },\n      {\n        \"name\": \"qr_code\",\n        \"type\": \"qrcode\",\n        \"position\": { \"x\": 20, \"y\": 112 },\n        \"width\": 30,\n        \"height\": 30,\n        \"content\": \"https:\u002F\u002Fdirectus.io\u002Fdocs\",\n        \"backgroundColor\": \"#FFFFFF\",\n        \"barColor\": \"#111827\"\n      },\n      {\n        \"name\": \"ean_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 60, \"y\": 104 },\n        \"width\": 90,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"EAN-13\"\n      },\n      {\n        \"name\": \"ean_code\",\n        \"type\": \"ean13\",\n        \"position\": { \"x\": 60, \"y\": 112 },\n        \"width\": 90,\n        \"height\": 18,\n        \"content\": \"2112345678900\",\n        \"backgroundColor\": \"#FFFFFF\",\n        \"barColor\": \"#111827\",\n        \"textColor\": \"#111827\",\n        \"includetext\": true\n      },\n      {\n        \"name\": \"footer\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 20, \"y\": 150 },\n        \"width\": 170,\n        \"height\": 10,\n        \"fontSize\": 10\n      }\n    ]\n  ]\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Inputs:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"title\": \"Hello PDF\",\n  \"body\": \"This document shows text, a shape, a divider line, a QR code, and an EAN-13 barcode generated from JSON.\",\n  \"qr_code\": \"https:\u002F\u002Fdirectus.io\u002Fdocs\",\n  \"ean_code\": \"2112345678900\",\n  \"footer\": \"Useful for receipts, labels, certificates, or simple printable layouts.\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Example Result\u003C\u002Fh2>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Fdemo.jpg\" alt=\"Generate PDF demo\">\n\u003Cp>Multi-page inputs:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">[\n  { \"title\": \"Page 1\", \"body\": \"First page\" },\n  { \"title\": \"Page 2\", \"body\": \"Second page\" }\n]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Invoice Example\u003C\u002Fh2>\n\u003Cp>Template:\u003C\u002Fp>\n\n  Show Template JSON\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"basePdf\": {\n    \"width\": 210,\n    \"height\": 297,\n    \"padding\": [10, 10, 10, 10]\n  },\n  \"schemas\": [\n    [\n      {\n        \"name\": \"header_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 18 },\n        \"width\": 170,\n        \"height\": 28,\n        \"borderWidth\": 0,\n        \"borderColor\": \"#0F172A\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"invoice_title\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 24 },\n        \"width\": 80,\n        \"height\": 12,\n        \"fontSize\": 22,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"INVOICE\"\n      },\n      {\n        \"name\": \"company_name\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 34 },\n        \"width\": 70,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Example Labs LLC\"\n      },\n      {\n        \"name\": \"invoice_number_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 132, \"y\": 24 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Number\"\n      },\n      {\n        \"name\": \"invoice_number\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 160, \"y\": 24 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"issue_date_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 132, \"y\": 32 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Date\"\n      },\n      {\n        \"name\": \"issue_date\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 160, \"y\": 32 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"due_date_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 132, \"y\": 40 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Due\"\n      },\n      {\n        \"name\": \"due_date\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 160, \"y\": 40 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"customer_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 56 },\n        \"width\": 82,\n        \"height\": 42,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#CBD5E1\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"seller_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 108, \"y\": 56 },\n        \"width\": 82,\n        \"height\": 42,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#CBD5E1\",\n        \"color\": \"#FFFFFF\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"bill_to_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 60 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"Bill To\"\n      },\n      {\n        \"name\": \"customer_name\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 68 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 12,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"customer_tax_id\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 78 },\n        \"width\": 70,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"customer_address\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 86 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 8\n      },\n      {\n        \"name\": \"from_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 60 },\n        \"width\": 20,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"content\": \"From\"\n      },\n      {\n        \"name\": \"seller_name\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 68 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 11,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"seller_tax_id\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 78 },\n        \"width\": 70,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"seller_address\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 112, \"y\": 86 },\n        \"width\": 70,\n        \"height\": 8,\n        \"fontSize\": 8\n      },\n      {\n        \"name\": \"items_header_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 108 },\n        \"width\": 170,\n        \"height\": 10,\n        \"borderWidth\": 0,\n        \"borderColor\": \"#E2E8F0\",\n        \"color\": \"#E2E8F0\",\n        \"radius\": 1\n      },\n      {\n        \"name\": \"items_header_line\",\n        \"type\": \"line\",\n        \"position\": { \"x\": 20, \"y\": 118 },\n        \"width\": 170,\n        \"height\": 1,\n        \"color\": \"#CBD5E1\"\n      },\n      {\n        \"name\": \"description_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 111 },\n        \"width\": 78,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Description\"\n      },\n      {\n        \"name\": \"qty_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 110, \"y\": 111 },\n        \"width\": 15,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Qty\"\n      },\n      {\n        \"name\": \"price_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 111 },\n        \"width\": 20,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Price\"\n      },\n      {\n        \"name\": \"discount_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 150, \"y\": 111 },\n        \"width\": 16,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Disc.\"\n      },\n      {\n        \"name\": \"total_header\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 170, \"y\": 111 },\n        \"width\": 18,\n        \"height\": 6,\n        \"fontSize\": 8,\n        \"fontName\": \"Roboto-Bold\",\n        \"content\": \"Total\"\n      },\n      {\n        \"name\": \"invoice_items\",\n        \"type\": \"table\",\n        \"position\": { \"x\": 20, \"y\": 120 },\n        \"width\": 170,\n        \"height\": 64,\n        \"content\": \"[]\",\n        \"showHead\": false,\n        \"repeatHead\": false,\n        \"head\": [\"Description\", \"Qty\", \"Price\", \"Disc.\", \"Total\"],\n        \"headWidthPercentages\": [50, 12, 14, 10, 14],\n        \"tableStyles\": {\n          \"borderColor\": \"#CBD5E1\",\n          \"borderWidth\": 0.2\n        },\n        \"headStyles\": {\n          \"fontName\": \"Roboto-Bold\",\n          \"alignment\": \"left\",\n          \"verticalAlignment\": \"middle\",\n          \"fontSize\": 8,\n          \"lineHeight\": 1,\n          \"characterSpacing\": 0,\n          \"fontColor\": \"#0F172A\",\n          \"backgroundColor\": \"#E2E8F0\",\n          \"borderColor\": \"#CBD5E1\",\n          \"borderWidth\": { \"top\": 0, \"right\": 0, \"bottom\": 0, \"left\": 0 },\n          \"padding\": { \"top\": 2, \"right\": 2, \"bottom\": 2, \"left\": 2 }\n        },\n        \"bodyStyles\": {\n          \"fontName\": \"Roboto\",\n          \"alignment\": \"left\",\n          \"verticalAlignment\": \"middle\",\n          \"fontSize\": 8,\n          \"lineHeight\": 1,\n          \"characterSpacing\": 0,\n          \"fontColor\": \"#111827\",\n          \"backgroundColor\": \"#FFFFFF\",\n          \"alternateBackgroundColor\": \"#F8FAFC\",\n          \"borderColor\": \"#E2E8F0\",\n          \"borderWidth\": { \"top\": 0, \"right\": 0, \"bottom\": 0.1, \"left\": 0 },\n          \"padding\": { \"top\": 2, \"right\": 2, \"bottom\": 2, \"left\": 2 }\n        },\n        \"columnStyles\": {\n          \"alignment\": {\n            \"1\": \"center\",\n            \"2\": \"right\",\n            \"3\": \"right\",\n            \"4\": \"right\"\n          }\n        }\n      },\n      {\n        \"name\": \"totals_line\",\n        \"type\": \"line\",\n        \"position\": { \"x\": 120, \"y\": 194 },\n        \"width\": 70,\n        \"height\": 1,\n        \"color\": \"#CBD5E1\"\n      },\n      {\n        \"name\": \"subtotal_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 200 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Subtotal\"\n      },\n      {\n        \"name\": \"subtotal\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 200 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"discount_total_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 208 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Discount\"\n      },\n      {\n        \"name\": \"discount_total\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 208 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"tax_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 216 },\n        \"width\": 30,\n        \"height\": 6,\n        \"fontSize\": 9,\n        \"content\": \"Tax\"\n      },\n      {\n        \"name\": \"tax\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 216 },\n        \"width\": 25,\n        \"height\": 6,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"total_label\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 130, \"y\": 226 },\n        \"width\": 30,\n        \"height\": 7,\n        \"fontSize\": 10,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"total\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 165, \"y\": 226 },\n        \"width\": 25,\n        \"height\": 7,\n        \"fontSize\": 10,\n        \"fontName\": \"Roboto-Bold\"\n      },\n      {\n        \"name\": \"payment_box\",\n        \"type\": \"rectangle\",\n        \"position\": { \"x\": 20, \"y\": 244 },\n        \"width\": 170,\n        \"height\": 34,\n        \"borderWidth\": 1,\n        \"borderColor\": \"#CBD5E1\",\n        \"color\": \"#F8FAFC\",\n        \"radius\": 2\n      },\n      {\n        \"name\": \"payment_note\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 250 },\n        \"width\": 116,\n        \"height\": 12,\n        \"fontSize\": 9\n      },\n      {\n        \"name\": \"bank_reference\",\n        \"type\": \"text\",\n        \"position\": { \"x\": 24, \"y\": 264 },\n        \"width\": 116,\n        \"height\": 8,\n        \"fontSize\": 8\n      },\n      {\n        \"name\": \"payment_qr\",\n        \"type\": \"qrcode\",\n        \"position\": { \"x\": 150, \"y\": 250 },\n        \"width\": 24,\n        \"height\": 24,\n        \"backgroundColor\": \"#FFFFFF\",\n        \"barColor\": \"#111827\"\n      }\n    ]\n  ]\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>Inputs:\u003C\u002Fp>\n\n  Show Inputs JSON\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"invoice_number\": \"INV-0001\",\n  \"issue_date\": \"2026-02-28\",\n  \"due_date\": \"2026-03-15\",\n  \"customer_name\": \"Ada Lovelace\",\n  \"customer_tax_id\": \"Tax ID: 20-12345678-9\",\n  \"customer_address\": \"12 Analytical Engine St, London\",\n  \"seller_name\": \"Example Labs LLC\",\n  \"seller_tax_id\": \"VAT ID: GB-99887766\",\n  \"seller_address\": \"42 Computing Ave, Manchester\",\n  \"invoice_items\": [\n    [\"Discovery workshop and architecture review\", \"1\", \"$600.00\", \"$0.00\", \"$600.00\"],\n    [\"Custom flow development\", \"8\", \"$120.00\", \"$80.00\", \"$880.00\"],\n    [\"PDF template implementation\", \"3\", \"$150.00\", \"$0.00\", \"$450.00\"],\n    [\"QA and browser validation\", \"2\", \"$90.00\", \"$0.00\", \"$180.00\"],\n    [\"Deployment and handoff session\", \"1\", \"$220.00\", \"$20.00\", \"$200.00\"]\n  ],\n  \"subtotal\": \"$2,310.00\",\n  \"discount_total\": \"$100.00\",\n  \"tax\": \"$464.10\",\n  \"total_label\": \"Total\",\n  \"total\": \"$2,674.10\",\n  \"payment_note\": \"Please transfer the balance before the due date. Scan the QR to open the payment portal or use the bank reference below.\",\n  \"bank_reference\": \"Reference: INV-0001 | IBAN: GB82 WEST 1234 5698 7654 32\",\n  \"payment_qr\": \"https:\u002F\u002Fpay.example.com\u002Finvoices\u002FINV-0001\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch2>Invoice example result\u003C\u002Fh2>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Finvoice_example.jpg\" alt=\"Invoice example result\">\n\u003Ch2>Generate Options Example\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"title\": \"Invoice INV-0001\",\n  \"subject\": \"Professional services invoice\",\n  \"author\": \"Example Labs LLC\",\n  \"creator\": \"Directus Flow: Generate PDF\",\n  \"producer\": \"pdfme\",\n  \"keywords\": [\"invoice\", \"directus\", \"billing\", \"pdf\"],\n  \"colorType\": \"rgb\",\n  \"lang\": \"en\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>License\u003C\u002Fh2>\n\u003Cp>MIT (\u003Ccode>MIT\u003C\u002Fcode>)\u003C\u002Fp>\n","https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Fedit_operation.jpg",[178,180,181],"https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Fdemo.jpg","https:\u002F\u002Fraw.githubusercontent.com\u002Fcesarechazu\u002Fdirectus-extension-generate-pdf\u002Fmain\u002Fimg\u002Finvoice_example.jpg"]