DotNetToAllPrintersAdapter.ijc.global
1.0.10
See the version list below for details.
dotnet add package DotNetToAllPrintersAdapter.ijc.global --version 1.0.10
NuGet\Install-Package DotNetToAllPrintersAdapter.ijc.global -Version 1.0.10
<PackageReference Include="DotNetToAllPrintersAdapter.ijc.global" Version="1.0.10" />
<PackageVersion Include="DotNetToAllPrintersAdapter.ijc.global" Version="1.0.10" />
<PackageReference Include="DotNetToAllPrintersAdapter.ijc.global" />
paket add DotNetToAllPrintersAdapter.ijc.global --version 1.0.10
#r "nuget: DotNetToAllPrintersAdapter.ijc.global, 1.0.10"
#addin nuget:?package=DotNetToAllPrintersAdapter.ijc.global&version=1.0.10
#tool nuget:?package=DotNetToAllPrintersAdapter.ijc.global&version=1.0.10
this package provide ability to print text data over multiple printers include printer of size A3,A4,A5,pos80,pos58. it support printing for right to left languages like arabic wiht language =1 and left to right one for language =2. it support multimedia transmission like WIFI , BlueTooth , USB,LAN. it target multiple platform WINDOWS, ANDROID , MACCATALIST , IOS ,TIZEN. it built upon .net8.
how to use :
- note every keyword with square brackests [] must be replaced with ur application definitions that previouly created by the app template *
u need to insatll the packqge from nuget org.
inject the platfrom service in the [startup].cs file as follow in the [startup].cs file add the following partial method code <pre><code class="language-C# hljs language-C"> public static partial class [startup] { public static [App] CreateApp { var builder = App.CreateBuilder();
** the following code what u need to add ** RegisterPlatformServices(builder.Services); builder.Services.AddSingleton<PrinterService>(); ** to here ** return builder.Build(); } ** the method definition here ** static partial void RegisterPlatformServices(IServiceCollection services); } </code></pre>
then in the targeted platfrom we must include the code that will inject the platfrom native code (device api) as follow for android <pre><code class="language-C# hljs language-C">public static partial class [startup] { static partial void RegisterPlatformServices(IServiceCollection services) { services.AddSingleton<IPrinterService, AndroidPrinterService>(); } }</code></pre> for iOS:- <pre><code class="language-C# hljs language-C">public static partial class [startup] { static partial void RegisterPlatformServices(IServiceCollection services) { services.AddSingleton<IPrinterService, iOSPrinterService>(); } } </code></pre> for windows:- <pre><code class="language-C# hljs language-C">public static partial class [startup] { static partial void RegisterPlatformServices(IServiceCollection services) { services.AddSingleton<IPrinterService, WindowsPrinterService>(); } } </code></pre> for tizen:- <pre><code class="language-C# hljs language-C">public static partial class [startup] { static partial void RegisterPlatformServices(IServiceCollection services) { services.AddSingleton<IPrinterService, TizenPrinterService>(); } }</code></pre> for mac:- <pre><code class="language-C# hljs language-C"> public static partial class [startup] { static partial void RegisterPlatformServices(IServiceCollection services) { services.AddSingleton<IPrinterService, MacPrinterService>(); } } </code></pre> 3. use the service in your code as follow <pre><code class="language-C# hljs language-C">printer = [App].[Current].Services.GetService<PrinterService>(); </code></pre> then populte the Printdata object with ur setting <pre><code class="language-C# hljs language-C">var printData = new PrintData { Header = new List<List<string>> { new List<string> { "الكاشير: احمد ", "رقم الزبون:11" }, new List<string> { "رقم الفاتوره:523/2024", "رقم الطاوله:123" } },// this for header in arabic , u can add any number of rows in header Title ="انها مكتبه جيده",//this for title appear in the center of the page after the header Body = [ new List<List<string>> { new List<string> { "اللغه العربيه لغه صعبه ولكنها جميله ما رأيك؟" }}, // this for body in arabic this will print only one column , u can add any number of columns in body new List<List<string>>{new List<string>{ "الجواب الثالث", "الجواب الثاني","الجواب الاول" } ,new List<string>{ "الجواب الثالث:محايد", "الجواب الثاني:لا","الجواب الاول:نعم" } }],/ there will print 3 columns in body in 2 rows , u can add any number of rows,columns Footer = new List<string> { "السطر الثاني في الهامش",, "السطر الاول في الهامش" },// u can add any number of lines in bottom margin Language = 1,// 1 for arabic ,2 for english and other languages TextSize = 35, LineHeight = 15, CenterImagePath = "C:\Users\Admin\desktop\Motto.png"// this motto picture appear in center of header if u add it, }; </code></pre>
4.<p> call the method <pre><code class="language-C# hljs language-C">printer.Print( printData, paperSize, MediaType, PrinterNameOrIp , PrinterMacAdress) </code></pre p> <h3> the parameters is </h3> <ul> <li> printData: -object- the print data object that contain text data to be printed that previously populated</li> <li>paperSize: -enum- targetted paper size</li> <li>mediaType: -enum- the transfer media used like usb,bluetooth..etc</li> <li>PrinterNameOrIp: -string- printer's name or ip if it use lan or usb [optional]</li> <li>PrinterMacAdress: -string- printer's mac address or ip if it use bluetooth [optional]</li> </ul> <strog>if u encounter an issue u can contact as at aaahmedwhf@gmail.com</strong>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-browser was computed. net8.0-ios was computed. net8.0-ios18.0 is compatible. net8.0-maccatalyst was computed. net8.0-maccatalyst18.0 is compatible. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows10.0.19041 is compatible. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- InTheHand.Net.Bluetooth (>= 4.1.44)
- Microsoft.Maui.Controls (>= 8.0.100)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.100)
- SkiaSharp (>= 2.88.8)
- SkiaSharp.HarfBuzz (>= 2.88.8)
- SkiaSharp.Views.Maui.Controls (>= 2.88.8)
- System.Drawing.Common (>= 8.0.8)
-
net8.0-android34.0
- InTheHand.Net.Bluetooth (>= 4.1.44)
- Microsoft.Maui.Controls (>= 8.0.100)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.100)
- SkiaSharp (>= 2.88.8)
- SkiaSharp.HarfBuzz (>= 2.88.8)
- SkiaSharp.Views.Maui.Controls (>= 2.88.8)
- System.Drawing.Common (>= 8.0.8)
-
net8.0-ios18.0
- InTheHand.Net.Bluetooth (>= 4.1.44)
- Microsoft.Maui.Controls (>= 8.0.100)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.100)
- SkiaSharp (>= 2.88.8)
- SkiaSharp.HarfBuzz (>= 2.88.8)
- SkiaSharp.Views.Maui.Controls (>= 2.88.8)
- System.Drawing.Common (>= 8.0.8)
-
net8.0-maccatalyst18.0
- InTheHand.Net.Bluetooth (>= 4.1.44)
- Microsoft.Maui.Controls (>= 8.0.100)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.100)
- SkiaSharp (>= 2.88.8)
- SkiaSharp.HarfBuzz (>= 2.88.8)
- SkiaSharp.Views.Maui.Controls (>= 2.88.8)
- System.Drawing.Common (>= 8.0.8)
-
net8.0-windows10.0.19041
- InTheHand.Net.Bluetooth (>= 4.1.44)
- Microsoft.Maui.Controls (>= 8.0.100)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.100)
- SkiaSharp (>= 2.88.8)
- SkiaSharp.HarfBuzz (>= 2.88.8)
- SkiaSharp.Views.Maui.Controls (>= 2.88.8)
- System.Drawing.Common (>= 8.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.