Technology Questions

Go Back   Technology Questions > Hardware Questions > Desktop Computers

Desktop Computers Hardware components for stationary PCs: Audio and Video, Monitors, Motherboards, Networking, Peripherals, Processors, RAM, Storage deivces, and Optical devices .

Reply
 
LinkBack Thread Tools
  #16 (permalink)  
Old 02-06-2007, 06:52 PM
Robert Newson
Newsgroup Contributor
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:

> Actually, ESC/P has been pretty reliable for simple things like
> changing font sizes, etc. But I haven't gotten to first base on
> barcodes or even graphics code. I would also like to use some simple
> graphics, like blacking-out something with a solid black square.


Thing with graphics is there are various "modes" which the printer may, or
may not, understand, in particular 8 & 24 bit graphics (for 9 & 24 pin
printers). The difference being that more bits are stacked vertically for
the latter - 3 bytes are used to define the stack of bits to printer as
opposed to just 8.

When printing graphics, a stack of bits is scanned across each line - you
need to specify /exactly/ how many stacks of bytes are being sent so that
the printer with accept the full 8 bits for the next n bytes before resuming
normal character/control interpretation.

Similarly when doing bar codes: you will need to specify exactly how many
data bytes are being sent to the command (the data for the bar code, plus
the preamble which specifies the bar code type and size, etc).

> One thing I found out is that there is a 1998 ESC/P manual which has a
> somewhat different escape sequence for barcodes than the 1997 manual
> that I have. For example, the 1997 manual shows the length as 2 bytes
> - an int and a mod. While the 1998 manual shows it as a "word". I
> assume a "word" is 4 bytes in this case.


I would presume the word to be 16 bit, or 2 words, and giving the same result.
....

>>I wish you well with this. We've an Epson thermal label/barcode printer
>>which also uses ESC/P. I've never got further than having MS Word print
>>to it from Win98. I'd like to get it printing barcodes though - I found
>>the ESC/P manuals too baffling for my small brain.


Examining the original example:

1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30

or as characters:

<ESC> ( B [13] [0] [4] [2] [0] [125] [0] [3] 0 1 2 3 4 5 0

We have (presuming data correct):

<ESC> - command prefix
( - Command: an extended one, next char gives actual command
B - Command: print a bar code
[13][0] - A lo-hi (little-endian 16 bit word) length of data to follow
(13 bytes)
[4] - Bar code type: 4 = UPC-E
[2] - Module Width: 2 dots
[0] - Space adjustment (none)
[125][0] - A lo-hi Bar length = 125 units
[3] - Control flag: 0000 0011 = No human readable chars
Printer adds check digit
0..0 - Bar code data (7 as printer adds 8th check digit) - 0123450

The size of the unit depends upon the printer and the parameter. 24 pin
printers using a smaller unit than 9 pin printers.

I vaguely remember when testing bar codes (when working in mail order retail
years ago) that they don't print until the paper is advanced. Try adding a
few Carriage Return line feeds (CRLF - 0x0D 0x0A) to the end of the test
print, ie send:

0D 1B 42 0D 00 04 02 00 7D 00 03 30 31 32 33 34 35 30 0D 0A 0D 0A 0D 0A

>>What I have seen suggested here in the past is kbarcode. I don't know
>>how well it's maturing but it's probably worth a look. If you are able
>>to produce *any* code that produces reliable output from an ESC/P
>>printer I'd very much like to see it - as a starting point for my own
>>endeavours, especially seeing as I don't even know where to start with
>>this!


It is possible to print bar codes using the graphics mode (I used that
before we got a printer that could do bar codes, but I only had the
definitions for 2 of the possible bar codes).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 02-06-2007, 06:52 PM
  #17 (permalink)  
Old 02-06-2007, 06:54 PM
john f archer
Newsgroup Contributor
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

First of all, you need to get the ANSI Standard for the barcode symbology
that you are using. Also you need to be very familiar with the manual for
printer and the barcode reader that you want to use. For simplicity, lets
assume that you are using Code 39 symbology and are using a dot matrix
printer. (Separate program is needed for an ink jet or laser printer since
it prints a page at a time while a dot matrix printer just prints a line at
a time. In DOS one can just send character zero or character 256 to the
printer in graphics mode to build the code 39 character out of blanks and a
black mark to build the characters that you need. However, there are
practical limits to the length of the line. Around 30 some odd characters
the printer goes crazy and doesn't print. At this point and for this line
length, simply add an addition null and this won't happen. Also, DON'T
program a dot matrix printer to double strike the barcodes to print NICE
DENSE BLACK BARCODE. The barcode thus produced usually can't be read simply
because the double striking reduces the white area and thus makes the
barcode unreadable. Also, remember that lowercase letters take up twice the
room of uppercase letters when printed as a barcode. (Take the letter A for
example: in upper case it is encoded as "A". However lower case "a" encoded
as "+A". Since two characters are necessary, the barcode is twice as wide.)
Also note that very long data strings can be split into several barcodes
that can be read into one field. This depends on the barcode reader. Please
read the manual. I have worked Worth Data barcode readers and I know they
have this capacity and work well. Other manufacturers would also work, I
just don't have any experience with them.

If you work in the Windows environment and use a barcode font, this might be
the simplest way; however, if you include have
a Windows barcode font this will work well except in an Adobe Acrobat
document. Adobe adds a little too much black to make a page more readable.
The last I knew the barcodes thus generated are not readable. I have raised
this point to Adobe representatives several times but have gotten a
response. I guess nobody at Adobe went to art school to know that the
negative space is just important as the positive space.

Sorry to take so much time. If you have other questions, Mr. Jones, please
email me so as not to bore the rest of the group. I will try to find my
FoxPro programs for producing barcodes.

Sincerely,
John F. Archer
(Publisher, Atavistic Press. ISBN: 0-915178)


"JJ Jones" <jamesjonathanjones******.com> wrote in message
news:1161812634.386429.18860@m7g2000cwm.googlegrou ps.com...
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>
> Thanks
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #18 (permalink)  
Old 02-06-2007, 06:54 PM
john f archer
Newsgroup Contributor
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

First of all, you need to get the ANSI Standard for the barcode symbology
that you are using. Also you need to be very familiar with the manual for
printer and the barcode reader that you want to use. For simplicity, lets
assume that you are using Code 39 symbology and are using a dot matrix
printer. (Separate program is needed for an ink jet or laser printer since
it prints a page at a time while a dot matrix printer just prints a line at
a time. In DOS one can just send character zero or character 256 to the
printer in graphics mode to build the code 39 character out of blanks and a
black mark to build the characters that you need. However, there are
practical limits to the length of the line. Around 30 some odd characters
the printer goes crazy and doesn't print. At this point and for this line
length, simply add an addition null and this won't happen. Also, DON'T
program a dot matrix printer to double strike the barcodes to print NICE
DENSE BLACK BARCODE. The barcode thus produced usually can't be read simply
because the double striking reduces the white area and thus makes the
barcode unreadable. Also, remember that lowercase letters take up twice the
room of uppercase letters when printed as a barcode. (Take the letter A for
example: in upper case it is encoded as "A". However lower case "a" encoded
as "+A". Since two characters are necessary, the barcode is twice as wide.)
Also note that very long data strings can be split into several barcodes
that can be read into one field. This depends on the barcode reader. Please
read the manual. I have worked Worth Data barcode readers and I know they
have this capacity and work well. Other manufacturers would also work, I
just don't have any experience with them.

If you work in the Windows environment and use a barcode font, this might be
the simplest way; however, if you include have
a Windows barcode font this will work well except in an Adobe Acrobat
document. Adobe adds a little too much black to make a page more readable.
The last I knew the barcodes thus generated are not readable. I have raised
this point to Adobe representatives several times but have gotten a
response. I guess nobody at Adobe went to art school to know that the
negative space is just important as the positive space.

Sorry to take so much time. If you have other questions, Mr. Jones, please
email me so as not to bore the rest of the group. I will try to find my
FoxPro programs for producing barcodes.

Sincerely,
John F. Archer
(Publisher, Atavistic Press. ISBN: 0-915178)


"JJ Jones" <jamesjonathanjones******.com> wrote in message
news:1161812634.386429.18860@m7g2000cwm.googlegrou ps.com...
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>
> Thanks
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #19 (permalink)  
Old 02-06-2007, 06:54 PM
john f archer
Newsgroup Contributor
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

First of all, you need to get the ANSI Standard for the barcode symbology
that you are using. Also you need to be very familiar with the manual for
printer and the barcode reader that you want to use. For simplicity, lets
assume that you are using Code 39 symbology and are using a dot matrix
printer. (Separate program is needed for an ink jet or laser printer since
it prints a page at a time while a dot matrix printer just prints a line at
a time. In DOS one can just send character zero or character 256 to the
printer in graphics mode to build the code 39 character out of blanks and a
black mark to build the characters that you need. However, there are
practical limits to the length of the line. Around 30 some odd characters
the printer goes crazy and doesn't print. At this point and for this line
length, simply add an addition null and this won't happen. Also, DON'T
program a dot matrix printer to double strike the barcodes to print NICE
DENSE BLACK BARCODE. The barcode thus produced usually can't be read simply
because the double striking reduces the white area and thus makes the
barcode unreadable. Also, remember that lowercase letters take up twice the
room of uppercase letters when printed as a barcode. (Take the letter A for
example: in upper case it is encoded as "A". However lower case "a" encoded
as "+A". Since two characters are necessary, the barcode is twice as wide.)
Also note that very long data strings can be split into several barcodes
that can be read into one field. This depends on the barcode reader. Please
read the manual. I have worked Worth Data barcode readers and I know they
have this capacity and work well. Other manufacturers would also work, I
just don't have any experience with them.

If you work in the Windows environment and use a barcode font, this might be
the simplest way; however, if you include have
a Windows barcode font this will work well except in an Adobe Acrobat
document. Adobe adds a little too much black to make a page more readable.
The last I knew the barcodes thus generated are not readable. I have raised
this point to Adobe representatives several times but have gotten a
response. I guess nobody at Adobe went to art school to know that the
negative space is just important as the positive space.

Sorry to take so much time. If you have other questions, Mr. Jones, please
email me so as not to bore the rest of the group. I will try to find my
FoxPro programs for producing barcodes.

Sincerely,
John F. Archer
(Publisher, Atavistic Press. ISBN: 0-915178)


"JJ Jones" <jamesjonathanjones******.com> wrote in message
news:1161812634.386429.18860@m7g2000cwm.googlegrou ps.com...
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>
> Thanks
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #20 (permalink)  
Old 09-22-2008, 08:58 AM
Registered User
 
Join Date: Sep 2008
Posts: 2
friar_drew is on a distinguished road
Re: Printing Barcodes with ESC/P on Epson Impact Printer

Does anyone here with know how to change the width of the bar code without reducing the amount of data the bar code holds?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing double-sided on Epson C82 printers Angela Vista Hardware 6 04-12-2007 04:34 PM
Printing double-sided on Epson C82 printers Angela Vista Hardware 0 04-12-2007 04:28 PM
Printing double-sided on Epson C82 printers Angela Vista Hardware 0 04-12-2007 04:24 PM
Epson R210 Printer vc Vista Hardware 9 04-12-2007 02:22 PM
Epson R210 Printer vc Vista Hardware 8 04-12-2007 02:19 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 04:23 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0