Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren
Letzter Beitrag:
vor 1 Jahr, 11 Monaten
Beteiligte Autoren:
GuenterP, kingdr, Fabrice Harari, Alen U.

Printing to dot matrix printers directly with print preview?

Startbeitrag von GuenterP am 12.02.2016 10:04


we use to print to dot matrix printers directly (ESC/P2 codes) from some programs, because of speed and because there's a requirement to have a carbon copy. (process: customer receives goods, signs and puts their comments, new orders, corrections on the delivery note - all of it prints through to the copy! Then the copy of the delivery note is removed and brought back to the home office).

Printing by Windows driver to the dot matrix printer is much too slow. One of our customers has to print 750 delivery notes daily which actually takes 3,5 hours to print on a very fast dot matrix printer (Tally). By using the Windows driver and a tricky choice of the fonts we can come down to 7 hours for printing, but no minute less!

Now, things would be fine, but there's a new requirement to have a preview and producing a .PDF copy of delivery notes. Has any of you done this before? Any hints? Thank you!


Hi Guenter,

I haven't tried, but I do have an idea:

1. First, you print in preview mode but with a pdf destination. To increase speed on that part, you may try to use a generic/text print driver
2. when, you return to your code from the preview, you test if the print was requested by the user. If yes, then you run your regular print on the matrix printer.

If doing the data access twice is too slow, you can do it once first, then have your two report work from the same data source (or window table)

Hope this helps

Best regards

von Fabrice Harari - am 12.02.2016 11:48
Hi Fabrice, thank you for your input!

Currently, the delivery notes are printed by a stream of text mixed with ESC/P2 control characters to a Generic/Text port as it is the way to have a fast printout on dot matrix printers. There are about 150 possible variations of a delivery note. Sure, no customer will ever use all of these, however, there's no way to use a report.

The idea to print the delivery notes twice (once in ESC/P2 and once using iPrint-commands with font Lucida Console => PDF) seems to be hard work (naturally, I wanted to avoid that) but looks/smells to me like the only viable solution! After printing each of the documents, the PDF document is stored together with the ESC/P2-characters used for printing in a database. When a review of an actually printed document is necvessary, a custom-made PDF-Viewer will show the PDF and clicking a "Print" button will feed the stored ESC/P2-characters to the Generic printer port again.

Thank you !

von GuenterP - am 13.02.2016 16:57
Hi Guenter,
if you still need solution for this you can check "dos printer" (http://www.dosprinter.net)
ESC/P2 compatibile with pdf output support.


von Alen U. - am 18.03.2016 22:27

Give it a shot and try running wd as dos shell then dump then printout directly to dot-matrix printer to see if it works a charm.

It came up to my memory that when I was running CLIPPER program in MS/DOS ending
up 5 times slower than running CLIPPER program in DOS SHELL in Windows and
worked a charm for dot-matrix printing to Airway BILL long long time ago.

I know it's weird...




von kingdr - am 20.03.2016 16:07
Hi kingdr, thank you! This sounds weird, indeed, but sadly it doesn't offer a print preview. But it's a good idea for another project I'm having in my queue. Thank you!

von GuenterP - am 20.03.2016 16:25
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.