{"id":20744285,"url":"https://github.com/sonidelav/nest-micro-pdf-service","last_synced_at":"2025-04-24T05:46:38.789Z","repository":{"id":144543130,"uuid":"208146155","full_name":"sonidelav/nest-micro-pdf-service","owner":"sonidelav","description":"PDF Microservice based on NestJS","archived":false,"fork":false,"pushed_at":"2022-11-22T08:38:40.000Z","size":311,"stargazers_count":11,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T05:46:29.915Z","etag":null,"topics":["html2pdf","microservice","nestjs","pdf","puppeteer","rest-api","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonidelav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-09-12T21:04:22.000Z","updated_at":"2025-03-07T05:39:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d53d0a3-1c33-4af6-a2d9-b3e9bc5e9b9b","html_url":"https://github.com/sonidelav/nest-micro-pdf-service","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/sonidelav%2Fnest-micro-pdf-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonidelav%2Fnest-micro-pdf-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonidelav%2Fnest-micro-pdf-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonidelav%2Fnest-micro-pdf-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonidelav","download_url":"https://codeload.github.com/sonidelav/nest-micro-pdf-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573344,"owners_count":21452345,"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":["html2pdf","microservice","nestjs","pdf","puppeteer","rest-api","typescript"],"created_at":"2024-11-17T07:14:55.043Z","updated_at":"2025-04-24T05:46:38.781Z","avatar_url":"https://github.com/sonidelav.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ePDF Microservice\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"_blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/GoogleChrome/puppeteer\" target=\"_blank\"\u003e\u003cimg src=\"https://developers.google.com/web/tools/images/puppeteer.png\" width=\"80\" alt=\"puppeteer\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Description\n\nIs a HTML 2 PDF service powered by NestJS and Puppeteer (Headless Chrome)\n\n## Installation\n\n```bash\nyarn install\n```\n\n## Running the app\n\n```bash\n# development\nyarn start\n\n# watch mode\nyarn start:dev\n\n# production mode\nyarn start:prod\n```\n\n## Test\n\n```bash\n# unit tests\nyarn test\n\n# e2e tests\nyarn test:e2e\n\n# test coverage\nyarn test:cov\n```\n\n## Usage\n\n### URL 2 PDF\n\n```http\nPOST http://localhost:3000/pdf/render-url\n```\n\n```js\n{\n    \"url\": \"https://www.google.gr\",       // Url to navigate and print to pdf.\n    \"filename\": \"test.pdf\",               // Name of file to download.\n    \"json\": true,                         // false to force download stream file.\n    \"options\": {\n        \"screen\": false,                  // true for screen media and not print.\n        \"page\": {\n            \"format\": \"A4\",               // Paper Format (A0, A1, A2 ...).\n            \"landscape\": false,           // Orientation.\n            \"height\": null,               // Custom Height of Page.\n            \"width\": null                 // Custom Width of Page.\n        }\n    }\n}\n```\n\n### HTML 2 PDF\n\n```http\nPOST http://localhost:3000/pdf/render-html\n```\n\n```js\n{\n    \"html\": \"\u003ch1\u003e.....\",                  // HTML print when DOMReady event trigged.\n    \"filename\": \"test.pdf\",               // Name of file to download.\n    \"json\": true,                         // false to force download stream file.\n    \"options\": {\n        \"screen\": false,                  // true for screen media and not print.\n        \"page\": {\n            \"format\": \"A4\",               // Paper Format (A0, A1, A2 ...).\n            \"landscape\": false,           // Orientation.\n            \"height\": null,               // Custom Height of Page.\n            \"width\": null                 // Custom Width of Page.\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonidelav%2Fnest-micro-pdf-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonidelav%2Fnest-micro-pdf-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonidelav%2Fnest-micro-pdf-service/lists"}