Do Sprinter
Do Sprinter
DOSPrinter is an Epson printer emulator. It facilitates DOS applications that support an Epson
printer or emulation, to actually print to any GUI (Windows) printer, email, RTF (MS Word) or PDF.
The DOSPrinter program is shareware. Included in vDos installation is a demo version that
occasionally prints a copyright notice on the first page and is valid for 30 days. If you find it useful,
register your copy. The developer offers a special vDos edition for a reduced price. This version
misses the /TRAY switch that isn’t needed for vDos.
DOSPrinter is available in two distinct types of licenses:
1. Standard ($ 30,-, price drops for more copies).
Single user/workstation license.
2. Unlimited ($ 380.-).
This grants you the right to use DOSPrinter on an unlimited number of workstations inside
your company and you can distribute DOSPrinter as part of your software package to other
companies (royalty free).
Some examples:
1. /SEL - Before printing, show select printer dialog.
2. /SEL'HP LaserJet 2200' - Print to HP LaserJet printer.
3. /EMLUI'[email protected],[email protected]\Monthly report' - Send an email message with the
subject 'Monthly report'.
4. /SMUI'[email protected]\Monthly report' - Send an email message directly over SMTP.
5. /PDF /F'Lucida Console' – Create a PDF file and open it. Use the font named Lucida
Console.
6. /PDF /IMAGE'watermark.jpg,1000,2000,100' – Create a PDF file. Set the image
watermark.jpg as the background on every page. Watermark.jpg will be placed 1 inch from
the left and 2 inches from the top edge. The resolution is set to 100 DPI.
Print graphics:
1. Put inside the text this sequence: ESC"filename.bmp". ESC is ASCII code 27, filename.bmp
the name of the image file to print. Don't forget to enclose the filename in double quotes. The
image is printed with a resolution of 200 dpi. This means that if you want the image with
dimensions 1x1 inch on the paper, you provide an image of 200x200 pixels.
You can change the default resolution for the image with: ESC"filename.bmp,400DPI".
Note that there is no space between ESC and "filename". Images can be BMP, GIF, JPG,
ICO format. This is a nonstandard ESC command.
2. Use the ESC* sequence (Bit-image mode) in your documents. This is a standard ESC/P
ESC/P2 command.
3. If you'd like to print an image on every page, use the switch /IMAGE'filename'.
Select a font:
1. Use the /F'fontname' switch, where 'fontname' is the name of an installed Windows font.
2. Embed the ESCkn (Select typeface) sequence in your document. This is a standard ESC/P
ESC/P2 command. The third byte of the sequence ESCkn is a number representing the font
name by this table:
Print barcodes:
The standard ESC sequence for printing barcodes is ESC ( B nL nH k m s v1 v2 c BarCodeData
where ESC is ASCII 27, ( is ASCII 40, B is ASCII 66.
nL and nH are two bytes representing the total number of following data bytes, determined by the
equation: (number of data bytes) = 6 bytes + BarCodeData bytes = ((nH*256) + nL). (where 6 bytes
are k, m, s, v1, v2, and c). nH is ignored in DOSPrinter. This means you can print barcodes with
max 255-6=249 characters, which should be enough.
v1 and v2 represent the barcode length (height) calculated by the formula: inches = (v1 + v2*256) /
180. For 9pin mode emulation the formula is (v1 + v2*256) / 72.
Barcode Notes about the check character Notes about BarCodeData characters
type
EAN-13 The last digit is an automatically calculated Valid characters are 13 digits in the range 0 – 9.
checksum. You have to provide 12 digits. If Invalid characters are replaced with zeroes.
provided 13 digits, the last digit is replaced.
EAN-8 The last digit is an automatically calculated Valid characters are 8 digits in the range 0 – 9.
checksum. You have to provide 7 digits. If Invalid characters are replaced with zeroes.
provided 8 digits, the last digit is replaced.
UPC-A The last digit is an automatically calculated Valid characters are 12 digits in the range 0 – 9.
checksum. You have to provide 11 digits. If Invalid characters are replaced with zeroes.
provided 12 digits, the last digit is replaced.
UPC-E The last digit is a checksum. It is not calculated Valid characters are 8 digits in the range 0 – 9.
automatically for this barcode type. Invalid characters are replaced with zeroes.
First digit (number system digit) must be 0 or 1.
Interleaved Optionally, a mod 10 checksum character is Valid barcode characters are 0 - 9.
2 of 5 inserted at the end, if bit 0 of flag c is set to 1. Invalid characters are replaced with zeroes.
The specification requires that the barcode must have
an even number of digits. If you provide an odd
number of digits, a zero at is added at the beginning
to satisfy the specification.
CODE 39 Optionally, a mod 43 checksum character is The start(*) and stop(*) characters are not required,
inserted at the end, before the stop character but are by default added. You can override this by
(*), if bit 0 of flag c is set to 1. setting the bit 3 of flag c to 1.
Valid characters are digits, big letters and characters '-
','.',' ','$','/','+','%','*'. Other characters are skipped.
POSTNET The last digit is an automatically calculated Valid barcode characters are 0 - 9
checksum. If you provide the checksum digit, it Valid number of digits are 6, 10 and 12 with the check
is replaced. digit included, or 5, 9 and 11 without the check digit.
Only special POSTNET code scanners can read this
type of barcode.
CODE 93 Two checksum characters are required for this It is a high-density barcode, suitable for long
barcode type. These are calculated and alphanumeric data.
inserted automatically if bit 0 of flag c is set to The start(*) and stop(*) characters are not required,
1, at the end, before the stop character (*). but are by default added. You can override this by
setting the bit 3 of flag c to 1.
Valid are the ASCII characters 0 to 127.
CODE 128 Checksum character is required for this It is a high-density barcode (especially dense for
barcode type. It is calculated and inserted numbers), suitable for long alphanumeric data.
automatically if bit 0 of flag c is set to 1. Valid are ASCII characters 32 to 127. Invalid
characters are ignored.
Codabar There is no checksum character for this You must manually provide the start and stop
barcode. characters, which could be characters A, B, C or D.
Valid data are digits 0-9 and characters '-','$',':','/','.'
and '+'. Invalid characters are ignored.
See examples\BarCode for how to use the ESC ( B command.
For example, ID for Cut Sheet is 258 (see sample image), so nH = 1 and nL = 2. This is a standard
ESC/P command, but there is a difference from the DOSPrinter implementation: The standard
requires only one byte for the n value. The rule is: If the ESC EM command is found at the
beginning (first 20 bytes) of the page, it affects the current and next pages. If not, it affects next
pages only.
This way we installed a generic DeskJet driver, which works all right in all the circumstances. You
can use it together with the existing, original driver from the printer box.
Another solution to this problem would be to use the /PDP or /RTP switch. This uses the PDF
reader or Word to print the report to the driver in question.