{"id":19217584,"url":"https://github.com/qq15725/modern-pdf","last_synced_at":"2025-11-13T17:07:04.739Z","repository":{"id":216755502,"uuid":"738417458","full_name":"qq15725/modern-pdf","owner":"qq15725","description":"🚀 Generate PDF in a way that describes the DOM.","archived":false,"fork":false,"pushed_at":"2024-03-12T09:25:27.000Z","size":538,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-23T21:22:42.746Z","etag":null,"topics":["jspdf","pdf","pdf-generation","pdf-generator","pdfkit"],"latest_commit_sha":null,"homepage":"","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/qq15725.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-03T07:18:33.000Z","updated_at":"2024-04-23T21:22:42.746Z","dependencies_parsed_at":null,"dependency_job_id":"d0a9f353-81a1-465e-a6b2-0a4b90adc471","html_url":"https://github.com/qq15725/modern-pdf","commit_stats":null,"previous_names":["qq15725/modern-pdf"],"tags_count":29,"template":false,"template_full_name":"qq15725/starter-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qq15725","download_url":"https://codeload.github.com/qq15725/modern-pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292364,"owners_count":19778311,"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":["jspdf","pdf","pdf-generation","pdf-generator","pdfkit"],"created_at":"2024-11-09T14:22:54.397Z","updated_at":"2025-11-13T17:07:04.734Z","avatar_url":"https://github.com/qq15725.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003emodern-pdf\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://unpkg.com/modern-pdf\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/modern-pdf\" alt=\"Minzip\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/modern-pdf\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/modern-pdf.svg\" alt=\"Version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/modern-pdf\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/modern-pdf\" alt=\"Downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/qq15725/modern-pdf/issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/qq15725/modern-pdf\" alt=\"Issues\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/qq15725/modern-pdf/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/modern-pdf.svg\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Usage\n\n```ts\nimport { Pdf } from 'modern-pdf'\n\nconst pdf = new Pdf({\n  // meta: {\n  //   colorSpace: 'cmyk',\n  // },\n  children: [\n    {\n      name: 'page1',\n      style: { width: 300, height: 600 },\n      children: [\n        {\n          style: { rotate: 60, width: 50, height: 50 },\n          foreground: '/assets/test.jpg',\n        },\n        {\n          style: { rotate: 40, left: 100, top: 100, fontSize: 20, color: '#FF00FF' },\n          text: 'test',\n        },\n        {\n          style: { left: 200, top: 100, width: 100, height: 200, fontSize: 22 },\n          text: [\n            {\n              letterSpacing: 3,\n              fragments: [\n                { content: 'He', color: '#00FF00', fontSize: 12 },\n                { content: 'llo', color: '#000000' },\n              ],\n            },\n            { content: ', ', color: '#FF0000' },\n            { content: 'World!', color: '#0000FF' },\n          ],\n        },\n      ],\n    },\n  ],\n})\n\npdf.save('download.pdf')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq15725%2Fmodern-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqq15725%2Fmodern-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq15725%2Fmodern-pdf/lists"}