{"id":23983381,"url":"https://github.com/beratarpa/html-thermal-printer","last_synced_at":"2025-04-24T06:51:08.343Z","repository":{"id":270998457,"uuid":"911886507","full_name":"BeratARPA/HTML-Thermal-Printer","owner":"BeratARPA","description":"A WPF application that allows direct printing of HTML content to Windows printers with custom formatting tags support and preview functionality. Perfect for thermal printers and receipt printing.","archived":false,"fork":false,"pushed_at":"2025-02-16T12:44:31.000Z","size":706,"stargazers_count":35,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T04:11:30.151Z","etag":null,"topics":["charp","dotnet","html-to-print","pos-printer","printer","receipt-printer","thermal-printer","windows-print","windows-printing","wpf","xaml"],"latest_commit_sha":null,"homepage":"https://beratarpa.com","language":"C#","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/BeratARPA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-01-04T05:20:28.000Z","updated_at":"2025-03-03T09:56:21.000Z","dependencies_parsed_at":"2025-01-04T17:41:16.469Z","dependency_job_id":null,"html_url":"https://github.com/BeratARPA/HTML-Thermal-Printer","commit_stats":null,"previous_names":["beratarpa/html-thermal-printer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeratARPA%2FHTML-Thermal-Printer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeratARPA%2FHTML-Thermal-Printer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeratARPA%2FHTML-Thermal-Printer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeratARPA%2FHTML-Thermal-Printer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeratARPA","download_url":"https://codeload.github.com/BeratARPA/HTML-Thermal-Printer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250580714,"owners_count":21453531,"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":["charp","dotnet","html-to-print","pos-printer","printer","receipt-printer","thermal-printer","windows-print","windows-printing","wpf","xaml"],"created_at":"2025-01-07T12:16:19.556Z","updated_at":"2025-04-24T06:51:08.319Z","avatar_url":"https://github.com/BeratARPA.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTML Thermal Printer\n\nNuGet package:https://www.nuget.org/packages/PrintHTML.Core\n\nFiggle was used for ASCII. https://github.com/drewnoakes/figgle\n\nBasic usage:\n```\nPrinterService _printerService = new PrinterService();\nAsyncPrintTask.Exec(\n    true,\n    () =\u003e _printerService.DoPrint(\n        \"content\",                                       // Content to print\n        \"PrinterName\",                                   // Printer name\n        \"charactersPerLine(int) 58MM=32, 80MM=42\"        // Characters per line\n    )\n);\n\nFlowDocumentScrollViewer.Document = _printerService.GeneratePreview(htmlContent, _charactersPerLine); // Preview\n\n```\n---\n\n## Screenshots\n![UI](Images/1.png)\n![UI](Images/2.png)\n![UI](Images/3.png)\n![UI](Images/4.png)\n---\n[EN]\n\n## About Project\nPrintHTML is a user-friendly WPF application that allows you to send HTML content directly to Windows printers. This application enables you to preview HTML content before printing and automatically detects all printers installed on the system.\n\n### Features\n- Direct HTML content printing\n- Print preview functionality\n- Automatic printer detection\n- User-friendly interface\n- Error handling and notifications\n\n### Technical Details\n- Framework: .NET (WPF)\n- Language: C#\n- Interface: XAML\n- Architecture: Service-based architecture\n\n### Usage\n1. Launch the application\n2. System printers will be automatically listed\n3. Paste your HTML content into the text box\n4. Optionally click \"Preview\" to check the output\n5. Select a printer and click \"Print\"\n\n### Requirements\n- Windows operating system\n- .NET Framework\n- At least one system printer \n\n### Special Format Tags\nSpecial format tags you can use in the application:\n\n- `\u003cASCII\u003econtent` : Prints ASCII characters\n- `\u003cL\u003e` : Aligns text to the left\n- `\u003cC\u003e` : Centers the text\n- `\u003cR\u003e` : Aligns text to the right\n- `\u003cT\u003e` : Makes text bold\n- `\u003cEB\u003e` : Bold text start\n- `\u003cDB\u003e` : Bold text end\n- `\u003cF\u003e=` : Fills the line with the specified character (example: `\u003cF\u003e=` fills the entire line with = character)\n- `\u003cJ\u003e` : Creates a table. Columns are separated by | character (example: `\u003cJ\u003eProduct | Price`)\n- `\u003cBX\u003e` : Creates a bordered box around content (example: `\u003cBX\u003eImportant Notice!`)\n\nExample usage:\n```\n\u003cdiv style=\"text-align: center; color: red;\"\u003eHEADER\u003c/div\u003e\n\n\u003cF\u003e=\n\u003cT\u003eBold Header\n\u003cL\u003eLeft aligned text\n\u003cC\u003eCentered text\n\u003cR\u003eRight aligned text\n\n\u003cJ\u003eProduct | Price\n\u003cJ\u003ePencil | $10 \n```\n---\n[TR]\n\n## Proje Hakkında\nPrintHTML, HTML içeriğini doğrudan Windows yazıcılarına göndermenizi sağlayan kullanıcı dostu bir WPF uygulamasıdır. Bu uygulama, HTML içeriğini yazdırmadan önce önizleme yapmanıza olanak tanır ve sistem üzerinde kurulu olan tüm yazıcıları otomatik olarak algılar.\n\n### Özellikler\n- HTML içeriğini doğrudan yazdırma\n- Yazdırma öncesi önizleme\n- Sistem yazıcılarını otomatik algılama\n- Kullanıcı dostu arayüz\n- Hata yönetimi ve bildirimler\n\n### Teknik Detaylar\n- Framework: .NET (WPF)\n- Dil: C#\n- Arayüz: XAML\n- Mimari: Service-based architecture\n\n### Kullanım\n1. Uygulamayı başlatın\n2. Sistem yazıcıları otomatik olarak listelenecektir\n3. Yazdırmak istediğiniz HTML içeriğini metin kutusuna yapıştırın\n4. İsterseniz \"Önizle\" butonuna tıklayarak çıktıyı kontrol edin\n5. Yazıcı seçin ve \"Yazdır\" butonuna tıklayın\n\n### Gereksinimler\n- Windows işletim sistemi\n- .NET Framework\n- En az bir sistem yazıcısı\n\n### Özel Format Etiketleri\nUygulama içerisinde kullanabileceğiniz özel format etiketleri:\n\n- `\u003cASCII\u003eiçerik` : ASCII karakterlerini yazdırır\n- `\u003cL\u003e` : Metni sola hizalar\n- `\u003cC\u003e` : Metni ortalar\n- `\u003cR\u003e` : Metni sağa hizalar\n- `\u003cT\u003e` : Metni kalın yapar\n- `\u003cEB\u003e` : Kalın yazı başlangıcı\n- `\u003cDB\u003e` : Kalın yazı bitişi\n- `\u003cF\u003e=` : Belirtilen karakterle satırı doldurur (örnek: `\u003cF\u003e=` tüm satırı = karakteri ile doldurur)\n- `\u003cJ\u003e` : Tablo oluşturur. Sütunlar | karakteri ile ayrılır (örnek: `\u003cJ\u003eÜrün | Fiyat`)\n- `\u003cBX\u003e` : İçeriğin etrafına kenarlıklı kutu oluşturur (örnek: `\u003cBX\u003eÖnemli Uyarı!`)\n\nÖrnek kullanım:\n```\n\u003cdiv style=\"text-align: center; color: red;\"\u003eBAŞLIK\u003c/div\u003e\n\n\u003cF\u003e=\n\u003cT\u003eKalın Başlık\n\u003cL\u003eSola dayalı metin\n\u003cC\u003eOrtalanmış metin\n\u003cR\u003eSağa dayalı metin\n\n\u003cJ\u003eÜrün | Fiyat\n\u003cJ\u003eKalem | 10 TL\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberatarpa%2Fhtml-thermal-printer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberatarpa%2Fhtml-thermal-printer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberatarpa%2Fhtml-thermal-printer/lists"}