Página 1 de 2

Código de barra usando o DOSPRINTER

Enviado: 26 Fev 2008 22:29
por clauber
Alguem conseguiu decifrar as funcoes para imprimir codigo de barra usando o DOSPRINTER ????

Enviado: 27 Fev 2008 15:18
por BHS
tambem gostartia de saber, mas não da pra enteder pelo help dele... rs

Enviado: 27 Fev 2008 21:00
por sygecom
Outra opção é usar o PRWIN, é uma opção paga mas que vale a pena !! se alguem prescisar tenho exemplo para EAN 13

Re: CODIGO DE BARRA USANDO O DOSPRINTER

Enviado: 27 Fev 2008 21:10
por Maligno
clauber escreveu:ALGUEM CONSEGUIU DECIFRAR AS FUNCOES PARA IMPRIMIR CODIGO DE BARRA USANDO O DOSPRINTER ????
Se o seu cliente tiver condições, sugira a aquisição de uma impressora térmica. Além de haver modêlos bem acessíveis, a qualidade é extremamente superior. E sua dor de cabeça acaba. :)

Enviado: 28 Fev 2008 07:57
por clauber
eu ja uso o prwin do vagner, o problema eh q toda vez q o cliente formata maquiina ou coisa assim
tenho q resintalar e configurar o prwin 3.9b esssa eh a versao que estou usando... a opcao de usar impressora termica naum da certo, pois eu utilizo o prwin para imprimir DAM (documento de arrecadação municipal) para pagemntos de iptu e taxas, as barras saum de modelo 2 to 5
por isso a necessidade de decifrar os codigos do dosprinter. . .

Enviado: 28 Fev 2008 08:04
por clauber
acho q esta na hora de todos nos unirmos diante desse desafio para decifrar esses codigos do dosprinter, ou teremos q chamar o jean champolion. . .

Enviado: 28 Fev 2008 08:50
por Clipper
Prezado Clauber

Baixei o DOSPRINTER e não achei nenhuma opção para códigos de barras, será que estamos falando do mesmo utilitário ?

Uma opção para usar o código 2 de 5 seria usar a PageScript.

Até logo.

Marcelo

Enviado: 28 Fev 2008 10:09
por BHS
to mandando o que achei no site do Dosprinter sobre o código de barras, segue abaixo:

How to 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 total number of data bytes to follow, determined by the following 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.

k is barcode type. Possible values for k and meanings are:
0 = EAN-13
1 = EAN-8
2 = Interleaved 2 of 5
3 = UPC-A
4 = UPC-E
5 = Code 39
6 = Code 128
7 = POSTNET
8 = Code 93
9 = CODABAR

m is barcode width measure. Possible values are 1, 2, 3, 4, 5. 1 is smallest, 5 is largest size.

s is "Space adjustment value". It is ignored by DOSPrinter.

v1 and v2 are barcode length (height) calculated by the formula: inches = (v1 + v2*256) / 180. For 9pin mode emulation the formula is (v1 + v2*256) / 72.

c is Control flag. Each bit of Control flag has a meaning:
if bit 0 is 0: A check digit is not added by DOSPrinter
if bit 0 is 1: A check digit is added by DOSPrinter
if bit 1 is 0: The human readable characters are added by DOSPrinter
if bit 1 is 1: The human readable characters are not added by DOSPrinter
if bit 2 is 0: Flag character is centered (for EAN-13 and UPC-A only)
if bit 2 is 1: Flag character is under (for EAN-13 and UPC-A only)
if bit 3 is 0: For CODE39 and CODE93 only - start and stop characters (*) are added by DOSPrinter.
if bit 3 is 1: For CODE39 and CODE93 only - start and stop characters (*) are not added by DOSPrinter.
Other bits are ignored.

BarCodeData are characters to be printed. Here are some comments about barcode characters: Barcode type
Notes about check character
Notes about BarCodeData characters

EAN-13 The last digit is a checksum digit. DOSPrinter calculates the checksum digit automatically. You have to provide 12 digits. If provided 13 digits, the last digit is ignored and replaced by DOSPrinter in all cases. Valid barcode characters are 13 digits in the range 0 - 9
Invalid characters are replaced with zeroes.
EAN-8 The last digit is a checksum digit. DOSPrinter calculates the checksum digit automatically. You have to provide 7 digits. If provided 8 digits, the last digit is ignored and recalculated by DOSPrinter in all cases. Valid barcode characters are 8 digits in the range 0 - 9
Invalid characters are replaced with zeroes.
UPC-A The last digit is a checksum digit. DOSPrinter calculates the checksum digit automatically. You have to provide 11 digits. If provided 12 digits, the last digit is ignored and recalculated by DOSPrinter in all cases. Valid barcode characters are 12 digits in the range 0 - 9
Invalid characters are replaced with zeroes.
UPC-E The last digit is a checksum digit. DOSPrinter does not calculate the checksum digit automatically for this barcode type. Valid barcode characters are 8 digits in the range 0 - 9
Invalid characters are replaced with zeroes.
First digit (named number system digit) must be 0 or 1.
Interleaved 2 of 5 Optionally, DOSPrinter inserts a mod 10 checksum character at the end, if bit 0 of flag c is set to 1. Valid barcode characters are 0 - 9. Invalid characters are replaced with zeroes.
The specification requires that the barcode must have even number of digits. If you provide odd number of digits, DOSPrinter adds a zero at the beginning to satisfy the specification.
CODE 39 Optionally, DOSPrinter inserts a mod 43 checksum character at the end, before the stop character (*), if bit 0 of flag c is set to 1. The start(*) and stop(*) characters are not required, but (by default) DOSPrinter adds them. You can override the automatic generation of start and stop characters by setting the bit 3 of flag c to 1.
Valid characters are numbers, big letters and characters '-','.',' ','$','/','+','%','*'. Other characters are skipped.
POSTNET The last digit is a checksum digit. DOSPrinter calculates the checksum digit automatically. If you provide the checksum digit, it is ignored and replaced by DOSPrinter. Valid barcode characters are 0 - 9
Valid number of digits are 6, 10 and 12 with the check digit included, or 5, 9 and 11 without the check digit. Only special POSTNET code scanner can read this type of barcode.
CODE 93 Two checksum characters are required for this barcode type. DOSPrinter calculates and inserts them automatically if bit 0 of flag c is set to 1, at the end, before the stop character (*). It is a high-density barcode, suitable for long alphanumeric data.
The start(*) and stop(*) characters are not required, but (by default) DOSPrinter adds them. You can override the automatic generation of start and stop characters by setting the bit 3 of flag c to 1.
Valid are all the ASCII characters with code from 0 to 127.
CODE 128 Checksum character is required for this barcode type. DOSPrinter calculates and inserts one automatically if bit 0 of flag c is set to 1. It is a high-density barcode (especially dense for numbers), suitable for long alphanumeric data.
Valid are all ASCII characters with code 32 to 127. Invalid characters are ignored.
Codabar There is no checksum character for this barcode. You must manually provide the start and stop characters, which could be characters A, B, C or D.
Valid data is numbers 0-9 and characters '-','$',':','/','.' and '+'. Other, invalid characters are ignored.
Download this file for an example of how to use the ESC ( B command.

Enviado: 28 Fev 2008 12:47
por clauber
obrigado pelas dicas eu tambem tenho esse help do dosprint e q naum da para imprimir mesmo.... sobre o page script eu naum conheço nada

Enviado: 01 Mar 2008 10:11
por clauber
sera q ninguem conseguiu mesmo decifrr os codidos secretos do dosprinter para imprimir codigo de barras

Codigo de barras usando DosPrinter

Enviado: 01 Mar 2008 11:04
por Adalberto
Clauber,

Acredito que e melhor enviar um e_mail para Bojan Banko, autor do DosPrinter, ele com prontidão respondera, eu fiz isso antes e fui atendido com amabilidade, hoje já envie um e_mail para ele, em quando tenha resposta (em inglês) vou compartilhar.

Enviado: 01 Mar 2008 11:12
por Pablo César
É isso aí, Adalberto ! Muy bien, así se hace !.

God bless you !

Enviado: 01 Mar 2008 12:05
por clauber
e qual eh o e-mail dele

Codigo de barras usando DosPrinter

Enviado: 01 Mar 2008 12:27
por Adalberto

DosPrinter

Enviado: 03 Mar 2008 10:05
por Adalberto
Clauber

Eu envié um e_mail a Bojan Banko e sua resposta foi esse link:

http://www.geocities.com/dosprint/index.html#Barcode
And tried with the file http://www.geocities.com/dosprint/Barcode.zip

Espero seja de utilidade para você