PosPrinterBase.PrintMemoryBitmap Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Prints a memory-stored bitmap on the specified printer station.

Namespace: Microsoft.PointOfService.BaseServiceObjects
Assembly: Microsoft.PointOfService.ControlBase (in microsoft.pointofservice.controlbase.dll)

Syntax

'Declaration
Public Overrides Sub PrintMemoryBitmap ( _
    station As PrinterStation, _
    data As Bitmap, _
    width As Integer, _
    alignment As Integer _
)
public override void PrintMemoryBitmap (
    PrinterStation station,
    Bitmap data,
    int width,
    int alignment
)
public:
virtual void PrintMemoryBitmap (
    PrinterStation station, 
    Bitmap^ data, 
    int width, 
    int alignment
) override
public void PrintMemoryBitmap (
    PrinterStation station, 
    Bitmap data, 
    int width, 
    int alignment
)
public override function PrintMemoryBitmap (
    station : PrinterStation, 
    data : Bitmap, 
    width : int, 
    alignment : int
)

Parameters

  • station
    The printer station to be used. May be either
  • data
    Memory byte array representation of the bitmap.
  • width
    Printed width of the bitmap to be performed. Valid widths include asIs and other bitmap width values expressed in the unit of measure given by MapMode.
  • alignment
    Placement of the bitmap. Valid alignments include left, right, center, and other values that express a distance from the left-most print column to the start of the bitmap. These values are expressed in the unit of measure given by MapMode.

Remarks

Prints a memory-stored bitmap on the specified printer station. If a partial text line has been sent (for example, via the PrintNormal method) but not yet printed, then an implicit line feed is added to this text and the line is printed before the bitmap is printed. Text data sent after this PrintMemoryBitmap begins on the line following the bitmap.

This method is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.

The width parameter controls transformation of the bitmap. If width is asIs, then no transformation is performed. The bitmap is printed with one bitmap pixel per printer dot. Advantages of this option are that it:

  • Provides the highest performance bitmap printing.

  • Works well for bitmaps tuned for a specific printer’s aspect ratio between horizontal dots and vertical dots.

If width is non-zero, then the bitmap will be transformed by stretching or compressing the bitmap such that its width is the specified width and the aspect ratio is unchanged. Advantages of this option are:

  • Sizes a bitmap to fit a variety of printers.

  • Maintains the bitmap’s aspect ratio.

Disadvantages are:

  • Lowers performance compared to untransformed data.

  • Some lines and images that are “smooth” in the original bitmap may show some “ratcheting.”

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

PosPrinterBase Class
PosPrinterBase Members
Microsoft.PointOfService.BaseServiceObjects Namespace