{"id":41942159,"url":"https://github.com/fintrace/tspl2-driver","last_synced_at":"2026-01-25T18:39:35.103Z","repository":{"id":29447290,"uuid":"121717891","full_name":"fintrace/tspl2-driver","owner":"fintrace","description":"Java client to communicate to label printers that support TSPL2 (by TSC)","archived":false,"fork":false,"pushed_at":"2025-10-07T10:23:36.000Z","size":312,"stargazers_count":83,"open_issues_count":18,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-07T12:21:32.016Z","etag":null,"topics":["java","printer","tsc-printer","tspl2","tspl2-driver"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fintrace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["koneru9999"]}},"created_at":"2018-02-16T05:26:39.000Z","updated_at":"2025-07-24T05:37:30.000Z","dependencies_parsed_at":"2023-12-05T16:24:52.098Z","dependency_job_id":"15ded4e3-4916-48ad-8895-a9bccc85a6e3","html_url":"https://github.com/fintrace/tspl2-driver","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/fintrace/tspl2-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fintrace%2Ftspl2-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fintrace%2Ftspl2-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fintrace%2Ftspl2-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fintrace%2Ftspl2-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fintrace","download_url":"https://codeload.github.com/fintrace/tspl2-driver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fintrace%2Ftspl2-driver/sbom","scorecard":{"id":400501,"data":{"date":"2025-08-11","repo":{"name":"github.com/fintrace/tspl2-driver","commit":"c3ba29cfafaf96321b20e567ea5ca3fd0634cc7a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/fintrace/tspl2-driver/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/fintrace/tspl2-driver/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/fintrace/tspl2-driver/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/fintrace/tspl2-driver/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fintrace/tspl2-driver/release.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6v67-2wr5-gvf4","Warn: Project is vulnerable to: GHSA-pr98-23f8-jwxv","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T19:58:23.337Z","repository_id":29447290,"created_at":"2025-08-18T19:58:23.337Z","updated_at":"2025-08-18T19:58:23.337Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28756442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["java","printer","tsc-printer","tspl2","tspl2-driver"],"created_at":"2026-01-25T18:39:34.954Z","updated_at":"2026-01-25T18:39:35.094Z","avatar_url":"https://github.com/fintrace.png","language":"Java","readme":"tspl2-driver\n============\n\nThis library will help you to communicate with TSPL2 (by TSC) based printers.\n\nThis drivers supports communication with printer over \n* USB Communication\n* Ethernet\n* Bluetooth (TODO)\n\n\u003e **Disclaimer:** This is not official or supported by TSC Auto ID Technology Co., Ltd. \n\u003e This work is originated purely because there are no equivalent libraries exists for java to communicate to TSPL based printers.\n\nHow to use\n=================\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.fintrace.core.drivers/tspl2-driver.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.fintrace.core.drivers%22%20AND%20a:%22tspl2-driver%22)\n\nAdd dependency in your pom\n  \t  \n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.fintrace.core.drivers\u003c/groupId\u003e\n    \u003cartifactId\u003etspl2-driver\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.13\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\nCreate a connection client\n\n```java\n// USB Client\nTSPLConnectionClient tsplConnectionClient = new USBConnectionClient(\n        (short) xxxx, 16), // vendor id of TSPL2 based printer\n        (short) xxxx, 16)); // product id of TSPL2 based printer\n\n// Or Ethernet Client\n\nTSPLConnectionClient tsplConnectionClient = new EthernetConnectionClient(\"x.x.x.x\", 9100);\n```\n\nInitialize the printer with defaults\n```java\ntsplConnectionClient.init();\n```\n\nOnce initialized, Establish the connection\n```java\ntsplConnectionClient.connect();\n```\n\nYou may use any available device config command to overwrite the printer defaults.\n\nOnce the connection is established, Either construct the label (using fluent API) or send the plain TSPL string to print the label.\n```java\nTSPLLabel tsplLabel = TSPLLabel.builder()\n                .element(Size.builder().labelWidth(4f).labelLength(3f).build())\n                .element(Gap.builder().labelDistance(0f).labelOffsetDistance(0f).build())\n                .element(Direction.builder().printPositionAsFeed(Boolean.TRUE).build())\n                .element(ClearBuffer.builder().build())\n                .element(DataMatrix.builder().xCoordinate(10).yCoordinate(110).width(400)\n                        .height(400).content(\"DMATRIX EXAMPLE 1\").build())\n                .element(DataMatrix.builder().xCoordinate(310).yCoordinate(110).width(400)\n                        .height(400).moduleSize(6).content(\"DMATRIX EXAMPLE 2\").build())\n                .element(DataMatrix.builder().xCoordinate(10).yCoordinate(310).width(400)\n                        .height(400).moduleSize(8).nbRows(18).nbCols(18)\n                        .content(\"DMATRIX EXAMPLE 3\").build())\n                .element(Print.builder().nbLabels(1).nbCopies(1).build())\n                .build();\n\ntsplConnectionClient.send(tsplLabel);\n\n```\n\nThe above will send the following TSPL2 code to printer \n```text\nSIZE 4,3\nGAP 0,0\nDIRECTION 1\nCLS\nDMATRIX 10,110,400,400, \"DMATRIX EXAMPLE 1\"\nDMATRIX 310,110,400,400,x6, \"DMATRIX EXAMPLE 2\"\nDMATRIX 10,310,400,400,x8,18,18, \"DMATRIX EXAMPLE 3\"\nPRINT 1,1\n```\n\n\nAdditionally, You may use any available status poll commands to get the status of the printer. In order to get the \nstatus, you need to register the data listener so that the poll commands sends the result to listener.\n```java\ntsplConnectionClient.send(TSPLStatusPollCommands.STATUS.getCommand());\n```\n\nTo disconnect and shutdown\n```java\ntsplConnectionClient.disconnect();\ntsplConnectionClient.shutdown();\n```\n\nThis library also has a nice listener pattern to receive notifications \nfor Data and Network. \n\nImplement [DataListener](src/main/java/org/fintrace/core/drivers/tspl/listeners/DataListener.java) to listen for data related events from printer.\n\nImplement [ClientListener](src/main/java/org/fintrace/core/drivers/tspl/listeners/ClientListener.java) to listen for the network related events.\n\n\nOther documentation\n=================\n\nDocumentation about TSPL could be find here\nhttp://www.tscprinters.com/cms/upload/download_en/TSPL_TSPL2_Programming.pdf\nor \nhttp://mediaform.de/fileadmin/support/handbuecher/Armilla/Handbuecher/TSC_TSPL_TSPL2_Programming.pdf\n\nContributions\n=================\nContributions of any type are welcome. Please contact via issues to discuss further.","funding_links":["https://github.com/sponsors/koneru9999"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffintrace%2Ftspl2-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffintrace%2Ftspl2-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffintrace%2Ftspl2-driver/lists"}