{"id":15293126,"url":"https://github.com/rxlabz/pdfmakr","last_synced_at":"2026-01-29T12:35:12.279Z","repository":{"id":56836721,"uuid":"103383839","full_name":"rxlabz/pdfmakr","owner":"rxlabz","description":"pdfmake interop wrapper for Dart ( browser )","archived":false,"fork":false,"pushed_at":"2018-11-29T10:04:15.000Z","size":1900,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-18T23:26:00.492Z","etag":null,"topics":["dart","interop","pdf-generation"],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rxlabz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-09-13T10:01:03.000Z","updated_at":"2023-09-08T17:29:53.000Z","dependencies_parsed_at":"2022-09-07T14:21:05.168Z","dependency_job_id":null,"html_url":"https://github.com/rxlabz/pdfmakr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rxlabz/pdfmakr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fpdfmakr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fpdfmakr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fpdfmakr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fpdfmakr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rxlabz","download_url":"https://codeload.github.com/rxlabz/pdfmakr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fpdfmakr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28877875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dart","interop","pdf-generation"],"created_at":"2024-09-30T16:39:54.240Z","updated_at":"2026-01-29T12:35:12.240Z","avatar_url":"https://github.com/rxlabz.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdfmakr\n\nA dart wrapper for PDFMake in browser - [example](http://rxlabz.github.io/pdfmakr)\n\n## Usage\n\n**HTML**\n\nadd pdfmake scripts file to your repo and your html page\n\n```html\n\u003cscript src='js/pdfmake.min.js'\u003e\u003c/script\u003e\n\u003cscript src='js/vfs_fonts.js'\u003e\u003c/script\u003e\n```\n\n**Dart**\n\n```dart\nFuture downloadPdf() async {\n  final pdfFile = await pdf.createPdf(new pdf.PDFContent(\n      content: [\n        new pdf.Image(image: await loadImg64(\"img/rx.png\")),\n        new pdf.TextBloc(text: \"text example\", bold: true, color: 'blue'),\n        new pdf.TextBloc(text: \"text example with style\", style: 'header'),\n        new pdf.TextBloc(text: \" \"),\n        new pdf.Columns(columns: [\n          new pdf.Column(text: 'col 1 80%', width: '80%'),\n          new pdf.Column(text: 'col 2'),\n        ]),\n        new pdf.TextBloc(text: \" \"),\n        new pdf.Table(\n            table: new pdf.TableBody(body: [\n          [\n            new pdf.TextBloc(text: \"cell example 1\", bold: true, color: 'blue'),\n            new pdf.TextBloc(\n                text: \"cell example - col 2\",\n                bold: true,\n                color: 'green',\n                fillColor: 'yellow'),\n          ],\n          [\n            new pdf.TextBloc(text: \"bold row 2 - col 1\", bold: true),\n            new pdf.TextBloc(text: \"italic row 2 - col 2\", italics: true),\n          ]\n        ]))\n      ],\n      styles: new pdf.Styles(\n          header: new pdf.Style(color: 'red', fontSize: 24),\n          basic: new pdf.Style(color: 'green'))));\n\n  pdfFile.download();\n  //pdfFile.print();\n  //pdfFile.open();\n}\n\nFuture\u003cString\u003e loadImg64(String url) async {\n  HttpRequest response =\n      await HttpRequest.request(url, responseType: \"arraybuffer\");\n\n  String contentType = response.getResponseHeader('Content-Type');\n\n  var list = new Uint8List.view((response.response as ByteBuffer));\n\n  String header = 'data:$contentType;base64,';\n  String base64 = BASE64.encode(list);\n  String image = \"${header}${base64}\";\n\n  return image;\n}\n\n```\n\n## Example\n\nworks with DDC\n\n```bash\ncd example\npub get\npub serve\n\n# open in chrome\n```\n\n## Features / Todos\n\n- [x] createPdf\n- Content types\n  - [x] text\n  - [ ] image :\n    - [x] url\n    - [ ] size\n  - [ ] Columns\n    - [x] text, width\n    - [ ] multitype columns content\n  - [ ] Table\n    - [x] body\n    - [ ] more ?\n- [x] Styles dictionaries ( user needs implements its own class )\n- [x] pdf.download()\n- [x] pdf.open()\n- [x] pdf.print()\n\n- dart-ier api : cascade ?\n\n- lists : ul, ol\n- headers, footers\n- background layer\n- margins\n- text decorations\n- paragraphs\n- image sizes\n- pageBreak\n- page dimensions, orientation and margins\n- more internal properties\n- browser preview\n */\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxlabz%2Fpdfmakr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxlabz%2Fpdfmakr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxlabz%2Fpdfmakr/lists"}