PrintHTML.Core 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package PrintHTML.Core --version 1.0.2                
NuGet\Install-Package PrintHTML.Core -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PrintHTML.Core" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PrintHTML.Core --version 1.0.2                
#r "nuget: PrintHTML.Core, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PrintHTML.Core as a Cake Addin
#addin nuget:?package=PrintHTML.Core&version=1.0.2

// Install PrintHTML.Core as a Cake Tool
#tool nuget:?package=PrintHTML.Core&version=1.0.2                

HTML Thermal Printer

NuGet package: https://www.nuget.org/packages/PrintHTML.Core

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

UI UI UI UI

[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

  1. Launch the application
  2. System printers will be automatically listed
  3. Paste your HTML content into the text box
  4. Optionally click "Preview" to check the output
  5. 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)

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

  1. Uygulamayı başlatın
  2. Sistem yazıcıları otomatik olarak listelenecektir
  3. Yazdırmak istediğiniz HTML içeriğini metin kutusuna yapıştırın
  4. İsterseniz "Önizle" butonuna tıklayarak çıktıyı kontrol edin
  5. 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)

Ö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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 107 2/16/2025
1.0.2 98 1/11/2025
1.0.1 100 1/6/2025

Initial Release