{"id":21535395,"url":"https://github.com/rocketbase-io/pdfmaker","last_synced_at":"2025-04-10T01:50:39.913Z","repository":{"id":48002327,"uuid":"193471916","full_name":"rocketbase-io/pdfmaker","owner":"rocketbase-io","description":"docker service of pdfmake - with pdf merge feature","archived":false,"fork":false,"pushed_at":"2023-04-07T21:21:52.000Z","size":4211,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T00:59:28.245Z","etag":null,"topics":["docker","docker-image","pdf","pdf-generation"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocketbase-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-24T09:08:36.000Z","updated_at":"2025-03-19T10:57:32.000Z","dependencies_parsed_at":"2023-02-18T19:00:36.938Z","dependency_job_id":null,"html_url":"https://github.com/rocketbase-io/pdfmaker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbase-io%2Fpdfmaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbase-io%2Fpdfmaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbase-io%2Fpdfmaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbase-io%2Fpdfmaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocketbase-io","download_url":"https://codeload.github.com/rocketbase-io/pdfmaker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142847,"owners_count":21054667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","pdf","pdf-generation"],"created_at":"2024-11-24T03:15:03.866Z","updated_at":"2025-04-10T01:50:39.895Z","avatar_url":"https://github.com/rocketbase-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdfmaker\n\n![logo](./assets/pdf-maker.svg)\n\n[![Docker](https://badgen.net/badge/icon/docker?icon=docker\u0026label)](https://hub.docker.com/repository/docker/rocketbaseio/pdfmaker)\n\nDocker service of [pdfmake](http://pdfmake.org/) - with pdf merge feature by use of [pdf-merger-js](https://www.npmjs.com/package/pdf-merger-js).\n\n# API\nThere are two API endpoints:\n- [POST] /pdf/file requires a JSON object\n- [POST] /pdf/files requires an array of JSON objects\n\n\nFor documentation to the JSON objects which are describe the content of the PDFs, [look here at the pdfmake documentation](https://pdfmake.github.io/docs/).\n\n## Fonts\nBeside the default fonts: Times, Helvetica, Courier, Symbol the follow list of fonts is installed too:\n- Roboto\n- JosefinSans\n- Lato\n- OpenSans\n- Poppins\n- Merriweather\n\n## Image URLs\nAlso fallback URLs are supported. These urls can either be given per image or global on the object. Example:\n\n```json\n{\n  \"content\": [\n    {\n      \"image\": \"https://example.com/img/logo.png\",\n      \"fallback\": \"https://example.com/img/logo-placeholder.png\"\n    }\n  ],\n  \"fallbackImage\": \"https://example.com/img/placeholder.png\"\n}\n```\n\n**Note:** Only PNGs and JPGs are supported.\n**Note:** When the download of an image + fallback fails the service will fallback to 1x1 purple png\n\n\n## SVG URLs\nDownloading SVGs from urls is supported. It is nearly the same as Image URLs expect that it is also possible to give the SVG as string. Example:\n```json\n{\n  \"content\": [\n    {\n      \"svg\": \"https://example.com/img/logo.svg\"\n    },\n    {\n      \"svg\": \"\u003csvg width=\\\"300\\\" height=\\\"200\\\" viewBox=\\\"0 0 300 200\\\"\u003e\u003ctext x=\\\"0\\\" y=\\\"50\\\"\u003eExample Image\u003c/text\u003e\u003c/svg\u003e\"\n    }\n  ]\n}\n```\n\n**Note:** Fallbacks are not supported.\n**Note:** When the download of an SVG fails, the service will fallback to 1x1 purple png\n\n## Page numbers\nTo add a page number on at the footer of each page, you can use this property. This property accepts an element for pdfmake.\n\n**Note:** this property will override the `footer` property!\n\nExample:\n```json\n{\n  \"pageNumber\": {\n    \"text\": \"Page $currentPage$ of $pageCount$ pages\",\n    \"alignment\": \"center\"\n  }\n}\n```\n\nIn all strings found in the element all $currentPage$ and $pageCount$ occurrences will be replaced.\n\n## Merging PDFS\nTo merge multiple PDFs, an array of pdfmake json-objects have to be used as an input.\n\n```json\n[\n  {\n    \"content\": \n    [\n        {\"text\": \"Thats the content of the first page.\"}\n    ]\n  },\n  {\n    \"content\": \n    [\n      {\n        \"text\": \"Thats the content of the second page.\"\n      }\n    ]\n  }\n]\n```\n\n**Note:** When merging multiple pdfs with each having separate ```pageNumber``` options. Each pdf will determine its page count independently. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketbase-io%2Fpdfmaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocketbase-io%2Fpdfmaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketbase-io%2Fpdfmaker/lists"}