PosPrinter.SetLogo Method (POS for .NET v1.12 SDK Documentation)
2/27/2008
Saves a data string as the top or bottom logo.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride Sub SetLogo ( _
location As PrinterLogoLocation, _
data As String _
)
public abstract void SetLogo (
PrinterLogoLocation location,
string data
)
public:
virtual void SetLogo (
PrinterLogoLocation location,
String^ data
) abstract
public abstract void SetLogo (
PrinterLogoLocation location,
String data
)
public abstract function SetLogo (
location : PrinterLogoLocation,
data : String
)
Parameters
- location
Where the logo is to be set. Possible values are defined by the PrinterLogoLocation enumeration as PrinterLogoLocation.Top or PrinterLogoLocation.Bottom.
- data
The characters that produce the logo. May consist of printable characters, escape sequences, carriage returns (13 decimal), and newline / line feed (10 decimal).
Remarks
POS for .NET checks to make sure that the following is true:
The Printer device has been opened, claimed, and enabled; and
The specified location is either PrinterLogoLocation.Top or PrinterLogoLocation.Bottom.
If these validations succeed, the service object sets the logo. If either of these conditions is not met, the service object throws an exception.
The service object sets the logo by updating either the TopLogo or BottomLogo properties in the PrinterProperties helper class. After these protected properties are set, the service object can then check the properties when the application calls the PrintNormal, PrintTwoNormal, or PrintImmediate methods, to determine whether to add a top logo or bottom logo escape sequence to the print data.
Before it calls this method, the application must open, claim, and enable the device.
SetLogo may throw a PosControlException with the following ErrorCodes:
Value |
Meaning |
Illegal |
One of the following conditions has occurred:
|
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
PosPrinter Class
PosPrinter Members
Microsoft.PointOfService Namespace
PosPrinter.PrintNormal Method
PosPrinter.PrintTwoNormal Method
PosPrinter.PrintImmediate Method
PrinterLogoLocation