FieldSoftware
Home

-----------------------------

.NetCF: C#-VB.Net
 Software Developers


PrinterCE.NetCF SDK
   General Info
   Download & Install
   Purchase & Pricing
   Upgrade from PrinterCE

Getting Started with:
 
C#   -   VB.Net

  Code Examples

Documentation
  PrinterCE for .Net CF
  AsciiCE for .Net CF
  BarcodeCE for .Net CF

eVC (C/C++/MFC), eVB:
  PrinterCE SDK

-----------------------------

Software Developers
  PrinterCE SDK
  PrinterCE.NetCF SDK
  PocketHTMLprint SDK

Special Topics
  Supported Printers
  Bluetooth Printing
  Network Printing

Printing Utilities
  PrintPocketCE
  PIEprint
  PocketPixPrint
  PocketShot
 
PocketClipPrint

Arcade Games
  SockOut
  MazeCraze

Contact Info

PrinterCE.NetCF Example:
Image Rotation

Demonstrates the ability to rotate images in 90 degree increments and resize them on the fly.

See full size printed output

 
PrinterCE prce = null;
try  
{
  prce = new PrinterCE(); //Create instance of PrinterCE class
  prce.ScaleMode = PrinterCE.MEASUREMENT_UNITS.INCHES; //Everything in inches
  prce.SelectPrinter(true);
  double x,y,siz;
  x=prce.PrPgWidth / 2;
  y=prce.PrPgHeight / 2;
  siz = 3.5;
  prce.TextX = x;
  prce.JustifyHoriz = PrinterCE.JUSTIFY_HORIZ.CENTER;
  prce.DrawText("ImageRotation Demo");
  prce.JustifyHoriz = PrinterCE.JUSTIFY_HORIZ.LEFT;
  for (int lp=0; lp<=3; lp++)
  {
    prce.Rotation = (PrinterCE.ROTATION_TYPE) lp; //North, East, South, West
    prce.DrawPicture("\\Images\\owl.bmp", x, y, siz, siz, true);
    siz*=0.66; //Shrink image as we rotate it.
  }
  prce.EndDoc(); //Done with this page - print it
}
catch (PrinterCEException exc)
{
  if (prce!=null)
  {
    prce.ShutDown(); //Done - free PrinterCE resources
    // NOTE: Only call ShutDown if PrinterCE instance is about to be destroyed.
  }
  prce=null;
  MessageBox.Show("PrinterCE Exception","Exception");
}
finally
{
  if (prce!=null)
  {
    prce.ShutDown(); //Done - free PrinterCE resources
    // NOTE: Only call ShutDown if PrinterCE instance is about to be destroyed.
  }
  prce=null;
}