BrotherPrintLibraryV3 0.0.351

dotnet add package BrotherPrintLibraryV3 --version 0.0.351
                    
NuGet\Install-Package BrotherPrintLibraryV3 -Version 0.0.351
                    
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="BrotherPrintLibraryV3" Version="0.0.351" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BrotherPrintLibraryV3" Version="0.0.351" />
                    
Directory.Packages.props
<PackageReference Include="BrotherPrintLibraryV3" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BrotherPrintLibraryV3 --version 0.0.351
                    
#r "nuget: BrotherPrintLibraryV3, 0.0.351"
                    
#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.
#:package BrotherPrintLibraryV3@0.0.351
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BrotherPrintLibraryV3&version=0.0.351
                    
Install as a Cake Addin
#tool nuget:?package=BrotherPrintLibraryV3&version=0.0.351
                    
Install as a Cake Tool

BrotherPrintLibrary

This library provides bindings to the Brother Mobile SDK.

Two variations of the library are published for the two suported major versions.

  • BrotherPrintLibraryV3
  • BrotherPrintLibraryV4

Minimal changes are made to the library, and code samples from Brother should generally work without any issues.

Get started

On Android, you need to grant these permissions (could be narrower, but I've never tested it out~):

Platforms/Android/MainApplication.cs

[assembly: UsesPermission(Android.Manifest.Permission.Bluetooth)]
[assembly: UsesPermission(Android.Manifest.Permission.BluetoothAdmin)]
[assembly: UsesPermission(Android.Manifest.Permission.BluetoothScan)]
[assembly: UsesPermission(Android.Manifest.Permission.BluetoothConnect)]
[assembly: UsesPermission(Android.Manifest.Permission.AccessNetworkState)]
[assembly: UsesPermission(Android.Manifest.Permission.AccessWifiState)]
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.AccessCoarseLocation)]
[assembly: UsesPermission(Android.Manifest.Permission.AccessFineLocation)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]

Code example for BrotherPrintLibraryV3, to print out basic text and QR code is provided below.

var printer = new Printer();
printer.SetBluetooth(BluetoothAdapter.DefaultAdapter);

var scaleFactor = 4;
var baseTextSize = 150;
var basePadding = 20;
var baseQrSize = 256;

printer.SetPrinterInfo(new PrinterInfo
{
    WorkPath = Android.App.Application.Context.CacheDir?.ToString(),
    PrinterModel = PrinterInfo.Model.PtP710bt,
    MacAddress = "<SCAN_TO_RETRIEVE>",
    LocalName = "<SCAN_TO_RETRIEVE>",
    LabelNameIndex = LabelInfo.LabelColor.Red!.Id,
    IsAutoCut = true,
    IsLabelEndCut = true,
    IsHalfCut = false,
    IsSpecialTape = false,
    IsCutAtEnd = true,
    IsCutMark = true,
});

var qr = new ZXing.Android.BarcodeWriter
{
    Format = BarcodeFormat.QR_CODE,
    Options = new ZXing.Common.EncodingOptions
    {
        Margin = 2,
        Width = baseQrSize * scaleFactor,
        Height = baseQrSize * scaleFactor
    }
};

var qrBitmap = qr.WriteAsBitmap("https://www.example.com");

var textPaint = new Paint
{
    Color = Color.Black,
    SubpixelText = true,
    AntiAlias = true,
    TextSize = baseTextSize * scaleFactor,
};

var textToDraw = "https://example.com";
var textBounds = new Android.Graphics.Rect();
textPaint.GetTextBounds(textToDraw, 0, textToDraw.Length, textBounds);

int padding = 20 * scaleFactor;

var landscapeBitmap = Bitmap.CreateBitmap(
    qrBitmap.Width + textBounds.Width() + padding * 2,
    qrBitmap.Height,
    Bitmap.Config.Argb8888
);

var landscapeCanvas = new Canvas(landscapeBitmap);
landscapeCanvas.DrawColor(Color.White);
landscapeCanvas.DrawBitmap(qrBitmap, 0, 0, null);

float textY = (landscapeBitmap.Height + textBounds.Height()) / 2.0f;
landscapeCanvas.DrawText(textToDraw, qrBitmap.Width + padding, textY, textPaint);

var matrix = new Android.Graphics.Matrix();
matrix.PostRotate(90);

var finalBitmap = Bitmap.CreateBitmap(
    landscapeBitmap,
    0,
    0,
    landscapeBitmap.Width,
    landscapeBitmap.Height,
    matrix,
    true
);

var output = printer.PrintImage(finalBitmap);

Copyright 2025 Brother Mobile Solutions

Product Compatible and additional computed target framework versions.
.NET net9.0-android35.0 is compatible.  net10.0-android was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0-android35.0

    • No dependencies.

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
0.0.351 58 7/6/2025