{"id":24793124,"url":"https://github.com/zhenglinlei/cups-python-printer","last_synced_at":"2025-03-24T17:05:20.921Z","repository":{"id":135115355,"uuid":"394614643","full_name":"ZhengLinLei/cups-python-printer","owner":"ZhengLinLei","description":"Print something with python cups. Specially the receipt printers","archived":false,"fork":false,"pushed_at":"2022-02-26T20:11:21.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T22:02:12.950Z","etag":null,"topics":["cups","pdf","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ZhengLinLei.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":"2021-08-10T10:39:22.000Z","updated_at":"2023-05-14T20:42:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"274602de-9749-44ac-8ef9-1f93318721fc","html_url":"https://github.com/ZhengLinLei/cups-python-printer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengLinLei%2Fcups-python-printer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengLinLei%2Fcups-python-printer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengLinLei%2Fcups-python-printer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengLinLei%2Fcups-python-printer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZhengLinLei","download_url":"https://codeload.github.com/ZhengLinLei/cups-python-printer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245315296,"owners_count":20595217,"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":["cups","pdf","python"],"created_at":"2025-01-29T21:56:02.396Z","updated_at":"2025-03-24T17:05:20.915Z","avatar_url":"https://github.com/ZhengLinLei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUPS Python Printer Software\n\nWindow users [https://github.com/ZhengLinLei/windows-python-printer](https://github.com/ZhengLinLei/windows-python-printer)\n\n\n## Installation\n\nInstall `wkhtmltopdf` in [https://wkhtmltopdf.org/downloads.html](https://wkhtmltopdf.org/downloads.html).\n\n**Linux user**\n```terminal\nsudo apt-get install wkhtmltopdf\n# or\nsudo apt install wkhtmltopdf\n```\n\nImport the source code to your project, and read the examples.\n```python\n\n# aa = PrintFile()\n\n# aa.addFile('./test/test.pdf', 'Test', options = {\n#     'page-height': '210mm',\n#     'page-width': '80mm',\n# })\n\naa = PrintHTML('./tmp', options = {\n    'page-height': '210mm',\n    'page-width': '72mm',\n    'margin-right': '1mm',\n    'margin-left': '1mm',\n   'encoding': \"UTF-8\",\n\n})\n\naa.addFile('./test/test.html', 'Test', {})\n\nprint(aa.options)\n\naa.choosePrinter(0)\n\n\nprint(aa.printAll())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhenglinlei%2Fcups-python-printer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhenglinlei%2Fcups-python-printer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhenglinlei%2Fcups-python-printer/lists"}