Demo application: printing by lines, not pages.

Per-page printing is the standard Windows behavior; however, sometimes you may want to print your documents per line.

1. Since version 4.7, the Line Printer object was created.

A Line Printer is an object that allows printing directly to a dot-matrix printer. To use this resource, follow these procedures:

A) Right-click the Data Server object and select the Insert – Standard – Line Printer option.

Inserting a Line Printer

B) To configure a Line Printer, right-click the object and select the Properties option. The window on the next figure is
displayed.

General tab

C) The Write(Value) method sends the String passed on the Value parameter to the printer selected on the Line Printer object. If the value passed by this method exceeds the number of pending lines configured in the MaxPendingLines property, this method returns an error and the String is discarded.

2. For versions below 4.7 , check the following example that uses an auxiliary program:

This demo application uses an external program that sends a string to the printer in order to print only a single line. In addition to a test button on the screen, the application also prints warning messages. Every time an alarm occurs, according to alarm source settings, a script is fired to send the warning message to the printer.

NOTE: Not all printers support this type of printing, usually only dot matrix and some ink jet printers.

Attachments:

PrintLine.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *