Home Page RTextPrinter for .NET
Home
                  RTextPrinter for .NET
                • Introduction
                • User Guide
                • Download
                • Pricing & Purchase
                • License
                • Related products
                • Java version
                • Introduction
                  Untitled Document


                  The .NET platform provides a printing api you can use for printing your reports. This api can however be very slow if you are printing on a dot matrix printer.

                  This is due to the fact that the platform always prints in graphic mode.

                  If you do not need to print graphics it makes more sense to print in text mode. This will result in a light weighted and fast printing.

                  RTextPrinter provides an easy to use api for printing text mode reports. It will handle the communication with the printer and all printer configuration commands in a transparent manner for you.

                  Even if you use text mode printer you will still be able to use the following features:

                  - Font selection (courier ...)
                  - Font style (bold, italic and underlined)
                  - Font size (characters per inch)

                  - Lines (vertical and horizontal) and rectangles
                  - Character set managing and charater value mapping
                  - Other: subscripts and superscripts, double wide, landscape format and interline spacing

                  Note that the set of available features depends on the printer (see features table in the documentation ).

                   

                  .

                  Supported printer command sets:

                  - Epson ESCP and ESCP2 or compatible
                  - HP-PCL5 or compatible
                  - HP-PCL 3 (known also as Laset Jet Plus Emulation)

                  - IBM Proprinter
                  or compatible
                  - IBM PPDS

                  - Diablo

                  - Plain (no features)

                  ... new command sets can be easily implemented

                   

                  .

                   

                  This is a very simple example:

                  WindowsPrinter port=new WindowsPrinter("HP LaserJet 2100"); // name of printer in windows control panel

                  TextPrinter printer=PrinterFactory.getPrinter("HP-PCL"); // get printer supporting HP-PCL command set

                  // create printing job
                  JobProperties job= printer.getDefaultJobProperties();
                  job.landscape=true;

                  printer.startJob(port,job);

                  // print BOLD text
                  prop=printer.getDefaultTextProperties();
                  prop.bold=true;
                  printer.printString("This must be BOLD",prop);
                  printer.newLine();

                  // print line
                  printer.printHorizontalLine(5,0,80); // row 5, column 0 to 80

                  printer.endJob();

                   

                  Contact us ( java4less AT confluencia.net ) if you are have any question.