{"id":13906817,"url":"https://github.com/pkoretic/pdf417-generator","last_synced_at":"2025-08-20T20:32:16.441Z","repository":{"id":37854083,"uuid":"127157400","full_name":"pkoretic/pdf417-generator","owner":"pkoretic","description":"PDF417 HUB3 2D barcode generator for browser and Node","archived":false,"fork":false,"pushed_at":"2023-12-21T20:18:20.000Z","size":90,"stargazers_count":47,"open_issues_count":2,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-09T21:59:12.204Z","etag":null,"topics":["hub3","nodejs","pdf417"],"latest_commit_sha":null,"homepage":"https://pkoretic.github.io/pdf417-generator","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/pkoretic.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}},"created_at":"2018-03-28T15:02:11.000Z","updated_at":"2025-07-17T15:28:27.000Z","dependencies_parsed_at":"2024-06-19T20:02:51.953Z","dependency_job_id":"40d399da-8cd6-47a6-a6cb-ff3594f83be8","html_url":"https://github.com/pkoretic/pdf417-generator","commit_stats":{"total_commits":30,"total_committers":8,"mean_commits":3.75,"dds":0.5,"last_synced_commit":"6ddf91fff52919c759e74a5b6fd1b2d0d8877e70"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pkoretic/pdf417-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkoretic%2Fpdf417-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkoretic%2Fpdf417-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkoretic%2Fpdf417-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkoretic%2Fpdf417-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkoretic","download_url":"https://codeload.github.com/pkoretic/pdf417-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkoretic%2Fpdf417-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271362503,"owners_count":24746498,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"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":["hub3","nodejs","pdf417"],"created_at":"2024-08-06T23:01:42.993Z","updated_at":"2025-08-20T20:32:16.163Z","avatar_url":"https://github.com/pkoretic.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## PDF417 HUB3 Barcode Generator\n\nThis library provides you with the ability to generate PDF417 HUB3 Barcodes in browser or Node.js\napps. The final barcode is drawn into a canvas element and can be used for many different use cases.\nThe code is based on the [bcmath-js](https://sourceforge.net/projects/bcmath-js) and\n[pdf417-js](https://github.com/bkuzmic/pdf417-js).\n\n\n### Browser\n\nYou can find a complete example at [examples/browser](examples/browser) and a running demo [here](https://pkoretic.github.io/pdf417-generator).\n\nThe usage is as simple as providing a canvas element and a text that should be used for barcode generation:\n\n```\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/libbcmath.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/bcmath.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/pdf417.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\n```\n\n**HTML**\n```\n\u003ccanvas id=\"barcode\" \u003e\u003c/canvas\u003e\n```\n\n**JS**\n```\nvar code = \"HRVHUB30\\nHRK\\n\" +\n\"000000000012355\\n\"+\n\"PETAR KORETIĆ\\n\"+\n\"PREVOJ DD\\n\"+\n\"10000 Zagreb\\n\"+\n\"pkoretic J.D.O.O\\n\"+\n\"PREVOJ DD\\n\"+\n\"10000 ZAGREB\\n\"+\n\"HR5041240000000000\\n\"+\n\"HR01\\n\"+\n\"7336-68949637625-00001\\n\"+\n\"COST\\n\"+\n\"Uplata za 1. mjesec\\n\";\n\nvar canvas = document.getElementById(\"barcode\")\nPDF417.draw(code, canvas)\n\n```\n\n### Node.js\n\nYou can find a complete example at [examples/node](examples/node).\n\nThe [node-canvas](https://github.com/Automattic/node-canvas) library is used for drawing.\n\nInstall the library:\n\n```\nnpm install pdf417-generator\n```\n\nUse it as:\n\n```\nconst Canvas = require(\"canvas\")\nconst PDF417 = require(\"pdf417-generator\")\n\nconst code =\n`HRVHUB30\nHRK\n000000000012355\nPETAR KORETIĆ\nPREVOJ DD\n10000 Zagreb\nFIRMA J.D.O.O\nPREVOJ DD\n10000 ZAGREB\nHR5041240000000000\nHR01\n7336-68949637625-00001\nCOST\nUplata za 1. mjesec`\n\nlet canvas = new Canvas()\nPDF417.draw(code, canvas)\n\n// create an image which can be sent in an e-mail or similar\nconsole.log(`\u003cimg src=\"${canvas.toDataURL()}\" /\u003e`)\n```\n\n\n### TypeScript\n```\nimport * as PDF417 from 'pdf417-generator';\n\nPDF417.draw(code, canvas);\n```\n\n\n### draw arguments\n\n**code** - (string) code to represent using PDF417\n\n**canvas** - (Canvas) Canvas instance\n\n**aspectRatio** - (float) the width to height of the symbol (excluding quiet zones); default 2\n\n**ecl** - (int) error correction level (0-8); default -1 = automatic correction level\n\n**devicePixelRatio** (int) determine how much extra pixel density should be added to allow for a sharper image; default window.devicePixelRatio if available\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkoretic%2Fpdf417-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkoretic%2Fpdf417-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkoretic%2Fpdf417-generator/lists"}