PrintHTML.Core
1.0.3
dotnet add package PrintHTML.Core --version 1.0.3
NuGet\Install-Package PrintHTML.Core -Version 1.0.3
<PackageReference Include="PrintHTML.Core" Version="1.0.3" />
paket add PrintHTML.Core --version 1.0.3
#r "nuget: PrintHTML.Core, 1.0.3"
// Install PrintHTML.Core as a Cake Addin #addin nuget:?package=PrintHTML.Core&version=1.0.3 // Install PrintHTML.Core as a Cake Tool #tool nuget:?package=PrintHTML.Core&version=1.0.3
HTML Thermal Printer
NuGet package:https://www.nuget.org/packages/PrintHTML.Core
Figgle was used for ASCII. https://github.com/drewnoakes/figgle
Basic usage:
PrinterService _printerService = new PrinterService();
AsyncPrintTask.Exec(
true,
() => _printerService.DoPrint(
"content", // Content to print
"PrinterName", // Printer name
"charactersPerLine(int) 58MM=32, 80MM=42" // Characters per line
)
);
FlowDocumentScrollViewer.Document = _printerService.GeneratePreview(htmlContent, _charactersPerLine); // Preview
Screenshots
[EN]
About Project
PrintHTML 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.
Features
- Direct HTML content printing
- Print preview functionality
- Automatic printer detection
- User-friendly interface
- Error handling and notifications
Technical Details
- Framework: .NET (WPF)
- Language: C#
- Interface: XAML
- Architecture: Service-based architecture
Usage
- Launch the application
- System printers will be automatically listed
- Paste your HTML content into the text box
- Optionally click "Preview" to check the output
- Select a printer and click "Print"
Requirements
- Windows operating system
- .NET Framework
- At least one system printer
Special Format Tags
Special format tags you can use in the application:
<ASCII>content
: Prints ASCII characters<L>
: Aligns text to the left<C>
: Centers the text<R>
: Aligns text to the right<T>
: Makes text bold<EB>
: Bold text start<DB>
: Bold text end<F>=
: Fills the line with the specified character (example:<F>=
fills the entire line with = character)<J>
: Creates a table. Columns are separated by | character (example:<J>Product | Price
)<BX>
: Creates a bordered box around content (example:<BX>Important Notice!
)
Example usage:
<div style="text-align: center; color: red;">HEADER</div>
<F>=
<T>Bold Header
<L>Left aligned text
<C>Centered text
<R>Right aligned text
<J>Product | Price
<J>Pencil | $10
[TR]
Proje Hakkında
PrintHTML, 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.
Özellikler
- HTML içeriğini doğrudan yazdırma
- Yazdırma öncesi önizleme
- Sistem yazıcılarını otomatik algılama
- Kullanıcı dostu arayüz
- Hata yönetimi ve bildirimler
Teknik Detaylar
- Framework: .NET (WPF)
- Dil: C#
- Arayüz: XAML
- Mimari: Service-based architecture
Kullanım
- Uygulamayı başlatın
- Sistem yazıcıları otomatik olarak listelenecektir
- Yazdırmak istediğiniz HTML içeriğini metin kutusuna yapıştırın
- İsterseniz "Önizle" butonuna tıklayarak çıktıyı kontrol edin
- Yazıcı seçin ve "Yazdır" butonuna tıklayın
Gereksinimler
- Windows işletim sistemi
- .NET Framework
- En az bir sistem yazıcısı
Özel Format Etiketleri
Uygulama içerisinde kullanabileceğiniz özel format etiketleri:
<ASCII>içerik
: ASCII karakterlerini yazdırır<L>
: Metni sola hizalar<C>
: Metni ortalar<R>
: Metni sağa hizalar<T>
: Metni kalın yapar<EB>
: Kalın yazı başlangıcı<DB>
: Kalın yazı bitişi<F>=
: Belirtilen karakterle satırı doldurur (örnek:<F>=
tüm satırı = karakteri ile doldurur)<J>
: Tablo oluşturur. Sütunlar | karakteri ile ayrılır (örnek:<J>Ürün | Fiyat
)<BX>
: İçeriğin etrafına kenarlıklı kutu oluşturur (örnek:<BX>Önemli Uyarı!
)
Örnek kullanım:
<div style="text-align: center; color: red;">BAŞLIK</div>
<F>=
<T>Kalın Başlık
<L>Sola dayalı metin
<C>Ortalanmış metin
<R>Sağa dayalı metin
<J>Ürün | Fiyat
<J>Kalem | 10 TL
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.1
- Figgle (>= 0.5.1)
- System.Drawing.Common (>= 9.0.0)
-
.NETStandard 2.0
- Figgle (>= 0.5.1)
- System.Drawing.Common (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial Release