{"id":51974643,"url":"https://github.com/ahmedessam090/pptx-to-pdf","last_synced_at":"2026-07-30T03:33:21.280Z","repository":{"id":340454929,"uuid":"1166120127","full_name":"ahmedessam090/pptx-to-pdf","owner":"ahmedessam090","description":"Pure TypeScript PPTX-to-PDF converter. No LibreOffice. No native dependencies. Just buffer in, PDF out.","archived":false,"fork":false,"pushed_at":"2026-02-26T07:34:46.000Z","size":2656,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-08T13:33:35.856Z","etag":null,"topics":["converter","lambda","no-libreoffice","nodejs","pdf","powerpoint","pptx","pptx-to-pdf","presentation","pure-javascript","typescript"],"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/ahmedessam090.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-24T22:33:58.000Z","updated_at":"2026-06-25T03:52:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ahmedessam090/pptx-to-pdf","commit_stats":null,"previous_names":["ahmedcoder01/pptx-to-pdf","ahmedessam090/pptx-to-pdf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmedessam090/pptx-to-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedessam090%2Fpptx-to-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedessam090%2Fpptx-to-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedessam090%2Fpptx-to-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedessam090%2Fpptx-to-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmedessam090","download_url":"https://codeload.github.com/ahmedessam090/pptx-to-pdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedessam090%2Fpptx-to-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36059044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-30T02:00:05.956Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["converter","lambda","no-libreoffice","nodejs","pdf","powerpoint","pptx","pptx-to-pdf","presentation","pure-javascript","typescript"],"created_at":"2026-07-30T03:33:20.693Z","updated_at":"2026-07-30T03:33:21.256Z","avatar_url":"https://github.com/ahmedessam090.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pptx-to-pdf\n\nPure TypeScript PPTX-to-PDF converter. No LibreOffice. No native dependencies. Just buffer in, PDF out.\n\n```\nnpm install pptx-to-pdf\n```\n\n## Usage\n\n```typescript\nimport { convert } from 'pptx-to-pdf';\nimport fs from 'fs';\n\nconst pptx = fs.readFileSync('presentation.pptx');\nconst pdf = await convert(pptx);\nfs.writeFileSync('output.pdf', pdf);\n```\n\n## API\n\n### `convert(pptxBuffer, options?): Promise\u003cBuffer\u003e`\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `slides` | `number[]` | all | Slide indices to include (0-based) |\n| `fontDirs` | `string[]` | `[]` | Additional directories to search for fonts |\n| `fontMap` | `Record\u003cstring, string \\| Buffer\u003e` | `{}` | Map font names to file paths or buffers |\n| `dpi` | `number` | `96` | Output resolution |\n| `onWarning` | `(msg: string) =\u003e void` | no-op | Callback for non-fatal warnings |\n\n## Examples\n\n### Specific slides only\n\n```typescript\nconst pdf = await convert(pptx, {\n  slides: [0, 2, 4], // first, third, and fifth slides\n});\n```\n\n### Custom fonts\n\n```typescript\nconst pdf = await convert(pptx, {\n  fontDirs: ['/usr/share/fonts/truetype'],\n  fontMap: {\n    'Calibri': '/path/to/calibri.ttf',\n    'Custom Font': fs.readFileSync('/path/to/custom.ttf'),\n  },\n});\n```\n\n### Express endpoint\n\n```typescript\napp.post('/convert', async (req, res) =\u003e {\n  const pdf = await convert(req.body);\n  res.type('application/pdf').send(pdf);\n});\n```\n\n### AWS Lambda\n\n```typescript\nexport const handler = async (event) =\u003e {\n  const pptx = Buffer.from(event.body, 'base64');\n  const pdf = await convert(pptx);\n  return {\n    statusCode: 200,\n    headers: { 'Content-Type': 'application/pdf' },\n    body: pdf.toString('base64'),\n    isBase64Encoded: true,\n  };\n};\n```\n\n## What it handles\n\n- Text with fonts, sizes, colors, bold/italic/underline\n- Shapes (rectangles, ellipses, arrows, rounded rects, and more)\n- Images (JPEG, PNG) including cropped images\n- Tables with cell backgrounds, borders, and text\n- Slide backgrounds (solid, gradient, image)\n- Theme colors and font schemes\n- Placeholder inheritance (slide -\u003e layout -\u003e master)\n- Group shapes with nested children\n- Connectors\n\n## What it doesn't handle (yet)\n\n- Charts\n- SmartArt\n- Animations and transitions\n- Audio/video\n- EMF/WMF vector graphics\n- 3D effects and complex text transforms\n- Pattern fills\n\n## How it works\n\nThe library parses the PPTX file (a ZIP archive of Office Open XML) and renders directly to PDF:\n\n1. **Extract** ZIP archive with `jszip`\n2. **Parse** all XML parts with `fast-xml-parser` (presentation, themes, masters, layouts, slides)\n3. **Resolve** the full inheritance chain (slide -\u003e layout -\u003e master -\u003e theme) for transforms, fills, and text styles\n4. **Measure** text with `opentype.js` for accurate line breaking and layout\n5. **Render** to PDF with `pdfkit` (vector paths, embedded images, positioned text)\n\nNo intermediate HTML. No headless browser. No subprocess.\n\n## Fonts\n\nThe library bundles Liberation Sans, Liberation Serif, and Liberation Mono (~2.5MB) as metric-compatible fallbacks for Arial, Times New Roman, and Courier New. For better fidelity, provide the actual fonts via `fontDirs` or `fontMap`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedessam090%2Fpptx-to-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedessam090%2Fpptx-to-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedessam090%2Fpptx-to-pdf/lists"}