{"id":27720681,"url":"https://github.com/masdenk/barcode","last_synced_at":"2025-04-27T09:59:48.703Z","repository":{"id":288382586,"uuid":"967870868","full_name":"MasDenk/Barcode","owner":"MasDenk","description":"Generate barcodes from a single PHP file.","archived":false,"fork":false,"pushed_at":"2025-04-17T06:19:15.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-27T09:59:42.939Z","etag":null,"topics":["barcode","barcode-generator","datamatrix","php","phpclass","qrcode"],"latest_commit_sha":null,"homepage":"https://shcontrol.net","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MasDenk.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}},"created_at":"2025-04-17T06:11:17.000Z","updated_at":"2025-04-17T06:19:18.000Z","dependencies_parsed_at":"2025-04-20T07:15:10.450Z","dependency_job_id":null,"html_url":"https://github.com/MasDenk/Barcode","commit_stats":null,"previous_names":["masdenk/barcode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasDenk%2FBarcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasDenk%2FBarcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasDenk%2FBarcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasDenk%2FBarcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasDenk","download_url":"https://codeload.github.com/MasDenk/Barcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251119576,"owners_count":21539194,"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":["barcode","barcode-generator","datamatrix","php","phpclass","qrcode"],"created_at":"2025-04-27T09:59:47.991Z","updated_at":"2025-04-27T09:59:48.685Z","avatar_url":"https://github.com/MasDenk.png","language":"PHP","readme":"# PHP Barcode Generator\n\n### Generate barcodes from a single PHP file. MIT license.\n\n  * Output to PNG, GIF, JPEG, or SVG.\n  * Generates UPC-A, UPC-E, EAN-13, EAN-8, Code 39, Code 93, Code 128, Codabar, ITF, QR Code, and Data Matrix.\n\n### Use directly as a PHP script with GET or POST:\n\n```\nbarcode.php?f={format}\u0026s={symbology}\u0026d={data}\u0026{options}\n```\n\ne.g.\n\n```\nbarcode.php?f=png\u0026s=upc-e\u0026d=06543217\nbarcode.php?f=svg\u0026s=qr\u0026d=HELLO%20WORLD\u0026sf=8\u0026ms=r\u0026md=0.8\n```\n\n**When using this method, you must escape non-alphanumeric characters with URL encoding, for example `%26` for `\u0026` or `%2F` for `?`.**\n\n### Or use as a library from another PHP script:\n\n```\ninclude 'barcode.php';\n\n$generator = new barcode_generator();\n\n/* Output directly to standard output. */\nheader(\"Content-Type: image/$format\");\n$generator-\u003eoutput_image($format, $symbology, $data, $options);\n\n/* Create bitmap image and write to standard output. */\nheader('Content-Type: image/png');\n$image = $generator-\u003erender_image($symbology, $data, $options);\nimagepng($image);\nimagedestroy($image);\n\n/* Create bitmap image and write to file. */\n$image = $generator-\u003erender_image($symbology, $data, $options);\nimagepng($image, $filename);\nimagedestroy($image);\n\n/* Generate SVG markup and write to standard output. */\nheader('Content-Type: image/svg+xml');\n$svg = $generator-\u003erender_svg($symbology, $data, $options);\necho $svg;\n\n/* Generate SVG markup and write to file. */\n$svg = $generator-\u003erender_svg($symbology, $data, $options);\nfile_put_contents($filename, $svg);\n```\n\n**When using this method, you must NOT use URL encoding.**\n\n### Options:\n\n`f` - Format. One of:\n```\n    png\n    gif\n    jpeg\n    svg\n```\n\n`s` - Symbology (type of barcode). One of:\n```\n    upc-a          code-39         qr     dmtx\n    upc-e          code-39-ascii   qr-l   dmtx-s\n    ean-8          code-93         qr-m   dmtx-r\n    ean-13         code-93-ascii   qr-q   gs1-dmtx\n    ean-13-pad     code-128        qr-h   gs1-dmtx-s\n    ean-13-nopad   codabar                gs1-dmtx-r\n    ean-128        itf\n```\n\n`d` - Data. For UPC or EAN, use `*` for missing digit. For Codabar, use `ABCD` or `ENT*` for start and stop characters. For QR, encode in Shift-JIS for kanji mode.\n\n`w` - Width of image. Overrides `sf` or `sx`.\n\n`h` - Height of image. Overrides `sf` or `sy`.\n\n`sf` - Scale factor. Default is 1 for linear barcodes or 4 for matrix barcodes.\n\n`sx` - Horizontal scale factor. Overrides `sf`.\n\n`sy` - Vertical scale factor. Overrides `sf`.\n\n`p` - Padding. Default is 10 for linear barcodes or 0 for matrix barcodes.\n\n`pv` - Top and bottom padding. Default is value of `p`.\n\n`ph` - Left and right padding. Default is value of `p`.\n\n`pt` - Top padding. Default is value of `pv`.\n\n`pl` - Left padding. Default is value of `ph`.\n\n`pr` - Right padding. Default is value of `ph`.\n\n`pb` - Bottom padding. Default is value of `pv`.\n\n`bc` - Background color in `#RRGGBB` format.\n\n`cs` - Color of spaces in `#RRGGBB` format.\n\n`cm` - Color of modules in `#RRGGBB` format.\n\n`tc` - Text color in `#RRGGBB` format. Applies to linear barcodes only.\n\n`tf` - Text font for SVG output. Default is monospace. Applies to linear barcodes only.\n\n`ts` - Text size. For SVG output, this is in points and the default is 10. For PNG, GIF, or JPEG output, this is the GD library built-in font number from 1 to 5 and the default is 1. Applies to linear barcodes only.\n\n`th` - Distance from text baseline to bottom of modules. Default is 10. Applies to linear barcodes only.\n\n`ms` - Module shape. One of: `s` for square, `r` for round, or `x` for X-shaped. Default is `s`. Applies to matrix barcodes only.\n\n`md` - Module density. A number between 0 and 1. Default is 1. Applies to matrix barcodes only.\n\n`wq` - Width of quiet area units. Default is 1. Use 0 to suppress quiet area.\n\n`wm` - Width of narrow modules and spaces. Default is 1.\n\n`ww` - Width of wide modules and spaces. Applies to Code 39, Codabar, and ITF only. Default is 3.\n\n`wn` - Width of narrow space between characters. Applies to Code 39 and Codabar only. Default is 1.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasdenk%2Fbarcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasdenk%2Fbarcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasdenk%2Fbarcode/lists"}