{"id":21206945,"url":"https://github.com/paralect/pdf-service","last_synced_at":"2025-07-10T08:33:24.846Z","repository":{"id":48034662,"uuid":"117433604","full_name":"paralect/pdf-service","owner":"paralect","description":"A docker based service for pdf and image generation ","archived":false,"fork":false,"pushed_at":"2024-04-29T06:22:10.000Z","size":5625,"stargazers_count":18,"open_issues_count":7,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-08T21:10:22.840Z","etag":null,"topics":["docker","node-module","paralect-stack","pdf","pdf-generation","pdf-service","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/paralect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-14T13:42:58.000Z","updated_at":"2024-06-07T07:30:36.000Z","dependencies_parsed_at":"2022-08-12T17:11:03.856Z","dependency_job_id":null,"html_url":"https://github.com/paralect/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/paralect%2Fpdf-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fpdf-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fpdf-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fpdf-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paralect","download_url":"https://codeload.github.com/paralect/pdf-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225118061,"owners_count":17423478,"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","node-module","paralect-stack","pdf","pdf-generation","pdf-service","webpack"],"created_at":"2024-11-20T20:57:17.623Z","updated_at":"2024-11-20T20:57:18.161Z","avatar_url":"https://github.com/paralect.png","language":"JavaScript","readme":":scroll: PDF Service\n[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n===========\n![Stack](https://raw.githubusercontent.com/paralect/stack/master/stack-component-template/stack.png)\n\n###### [CLIENT API](client/README.md) | [SERVER API](server/README.md) | [CONTRIBUTING](CONTRIBUTING.md)\n\u003e Pdf service can be used for pdf generating (reports, receipts and etc.) from the html sources.\n\nFeatures\n========\nHere are a few examples to get you started:\n\n* :rocket: Generate PDF(screenshots) from the html as a string / file.\n* :package: Build your assets without headache.\n\n\nInstallation\n========\n\nYou should start pdf server first. It is easy to mange if you have docker:\n\n```\ndocker pull paralect/pdf-service\ndocker run -d -p 3000:3000 paralect/pdf-service\n```\n\nAfter that install client library:\n\n```\nnpm i @paralect/pdf-service-client\n```\n\nQuick example\n=============\nIn your js file write these lines:\n\n```\nconst PdfService = require('@paralect/pdf-service-client'); // require client pdf service library\nconst fs = require('fs'); // fs to write file\n\n// pdf service init\nconst pdfService = new PdfService({\n  serverUrl: 'http://localhost:3000',\n  mode: 'development',\n});\n\n// generate pdf by html string\npdfService.generatePdfByContent('\u003cbody\u003e\u003ch1\u003eHello, {{name}}!\u003c/h1\u003e\u003c/body\u003e', {\n  pdfOptions: {\n    format: 'Letter',\n  },\n  templateSystem: {\n    params: {\n      name: 'Your name',\n    },\n  },\n}).then((pdfStream) =\u003e {\n  const writeStream = fs.createWriteStream('./hello.pdf');\n\n  pdfStream.pipe(writeStream);\n\n  writeStream.on('finish', () =\u003e {\n    console.log('Hello pdf was created!');\n  });\n});\n```\n\nExecution of this code should generate pdf file with 'Hello, Your name' string.\n\nFull API Reference\n=================\nExplore the API documentation([client side](client/README.md) and [server side](server/README.md)) and [examples](client/samples) to learn more.\n\nChange Log\n=================\n\nThis project adheres to [Semantic Versioning](http://semver.org/).\nEvery release is documented on the Github [Releases](https://github.com/paralect/pdf-service/releases) page.\n\nLicense\n=================\n\nShip is released under the [MIT License](LICENSE).\n\nContributing\n=================\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\nContributors\n=================\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n| [\u003cimg src=\"https://avatars3.githubusercontent.com/u/14125982?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKuhArt\u003c/b\u003e\u003c/sub\u003e](https://github.com/KuhArt)\u003cbr /\u003e[💻](https://github.com/paralect/pdf-service/commits?author=KuhArt \"Code\") [📖](https://github.com/paralect/pdf-service/commits?author=KuhArt \"Documentation\") [🐛](https://github.com/paralect/pdf-service/issues?q=author%3AKuhArt \"Bug reports\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/2989199?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eUladzimir Mitskevich\u003c/b\u003e\u003c/sub\u003e](https://github.com/umitskevich)\u003cbr /\u003e[🤔](#ideas-umitskevich \"Ideas, Planning, \u0026 Feedback\") [🐛](https://github.com/paralect/pdf-service/issues?q=author%3Aumitskevich \"Bug reports\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/12069883?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNesterenkoNikita\u003c/b\u003e\u003c/sub\u003e](https://github.com/NesterenkoNikita)\u003cbr /\u003e[🤔](#ideas-NesterenkoNikita \"Ideas, Planning, \u0026 Feedback\") [🐛](https://github.com/paralect/pdf-service/issues?q=author%3ANesterenkoNikita \"Bug reports\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/681396?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAndrew Orsich\u003c/b\u003e\u003c/sub\u003e](http://paralect.com)\u003cbr /\u003e[🤔](#ideas-anorsich \"Ideas, Planning, \u0026 Feedback\") [🐛](https://github.com/paralect/pdf-service/issues?q=author%3Aanorsich \"Bug reports\") [🎨](#design-anorsich \"Design\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/6461311?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEvgeny Zhivitsa\u003c/b\u003e\u003c/sub\u003e](https://github.com/ezhivitsa)\u003cbr /\u003e[💻](https://github.com/paralect/pdf-service/commits?author=ezhivitsa \"Code\") [🎨](#design-ezhivitsa \"Design\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/21078183?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eЖеня Филиппович\u003c/b\u003e\u003c/sub\u003e](https://github.com/filipochka97)\u003cbr /\u003e[🐛](https://github.com/paralect/pdf-service/issues?q=author%3Afilipochka97 \"Bug reports\") |\n| :---: | :---: | :---: | :---: | :---: | :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparalect%2Fpdf-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparalect%2Fpdf-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparalect%2Fpdf-service/lists"}