{"id":21463430,"url":"https://github.com/ijustdev/invoicegen","last_synced_at":"2025-06-26T10:35:27.919Z","repository":{"id":44063181,"uuid":"200176931","full_name":"IJustDev/InvoiceGen","owner":"IJustDev","description":"Npm package for generating invoices as pdf.","archived":false,"fork":false,"pushed_at":"2022-02-12T15:22:28.000Z","size":95,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T05:15:39.412Z","etag":null,"topics":["generate-invoice","generate-pdf","generating-invoices","invoice","invoicegen","pdf"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/IJustDev.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}},"created_at":"2019-08-02T06:18:26.000Z","updated_at":"2020-08-21T06:28:43.000Z","dependencies_parsed_at":"2022-09-04T05:01:32.774Z","dependency_job_id":null,"html_url":"https://github.com/IJustDev/InvoiceGen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IJustDev/InvoiceGen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2FInvoiceGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2FInvoiceGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2FInvoiceGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2FInvoiceGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IJustDev","download_url":"https://codeload.github.com/IJustDev/InvoiceGen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IJustDev%2FInvoiceGen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262049142,"owners_count":23250687,"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":["generate-invoice","generate-pdf","generating-invoices","invoice","invoicegen","pdf"],"created_at":"2024-11-23T07:22:40.031Z","updated_at":"2025-06-26T10:35:27.901Z","avatar_url":"https://github.com/IJustDev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InvoiceGen\n\nA npm package for generating invoices as pdf.\n\n## Features\n- Creating a full invoice with a few lines of code\n- Beginnerfriendly\n- Implementable in any kind of node application\n- 20 lines of code for a professional invoice.\n## Getting started\n\n```\n$ npm i invoicegen\n```\n\n```js\nconst InvoiceGen = require('invoicegen');\nconst path = require('path');\n\nconst Invoice = InvoiceGen.Invoice;\nconst EntityDetails = InvoiceGen.EntityDetails;\nconst Position = InvoiceGen.Position;\n\n/**\n * Select a language\n * You can also define your own language.\n * Just export a class that extends the language class from invoicegen.\n * --------------------------------------------------------------------------\n * Currently you are able to switch between german and English just like this.\n * const German = InvoiceGen.German;\n * const English = InvoiceGen.English;\n*/\nconst English = InvoiceGen.English;\n\n/**\n * Specify the sender.\n */\nconst senderDetails = new EntityDetails({\n    firstname: 'Max',\n    lastname: 'Mustermann',\n    street: 'Musterstraße 34',\n    city: 'Musterort',\n    zipCode: '12345',\n});\n/**\n * Add a company name to the sender.\n */\nsenderDetails.addCompanyName('MAX UG');\n\n/**\n * Specify the receiver.\n */\nconst receiverDetails = new EntityDetails({\n    firstname: 'Maria',\n    lastname: 'Head',\n    street: 'Secretstreet 69',\n    city: 'Randomcity',\n    zipCode: '420',\n});\n\n/**\n * Declare the positions you want to invoice.\n*/\nconst positions = [\n    // Quantity, Description, Cost, tax, currency symbol\n    new Position({\n        amount: 1,\n        description: 'Random position',\n        cost: 20,\n        currency: '€',\n        tax: 19,\n    }),\n];\n\n/**\n * Initialize your invoice with the sender- and receiver details and...\n * the language!\n*/\nconst invoice = new Invoice(\n    {senderDetails, receiverDetails, positions},\n    {invoiceId: 20, language: new English()});\n\n/** Set a nice thank you message */\ninvoice.setMessage('Thank you for your purchase!');\n\n/** Set your logo */\ninvoice.setImage(path.join(__dirname, 'res', 'logo.png'));\n\n/** And generate your pdf */\ninvoice.generate(path.join(__dirname, 'dist', 'output.pdf'));\n```\n\nSee the examples for more information on how to use this package. Click [here][sampleE] for the generated PDF (english) and [here][sampleG] for the generated PDF (german).\n\n[sampleE]: ./res/english.pdf\n[sampleG]: ./res/german.pdf","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijustdev%2Finvoicegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fijustdev%2Finvoicegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijustdev%2Finvoicegen/lists"}