aobag-dev / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

qz.append cut url string after 33rd char - printer BP330 #249

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a problem with printing QRcodes with url longer than 33 characters.
If the url is longer than 33 chars, qz.append cut the rest.

For example: I would like to print QRcode with following url: 

http://mystock.com/hardware/12345  67/view

Results in QR code will be: 

http://mystock.com/hardware/12345

It causes link broken.

Below I include my source code: 

function printBIG() {
        if (notReady()) { return; }
         //sends big QR code to printer

        qz.append('\n^Q25,3\n');
        qz.append('^W35\n');
        qz.append('^H8\n');
        qz.append('^P1\n');
        qz.append('^S3\n');
        qz.append('^AD\n');
        qz.append('^C1\n');
        qz.append('^R16~Q+16\n');
        qz.append('^O0\n');
        qz.append('^D0\n');
        qz.append('^E12~R200\n');
        qz.append('^XSET,ROTATION,0\n');
        qz.append('^L\n');
        qz.append('Dy2-me-dd\n');
        qz.append('Th:m:s\n');
        qz.append('W74,36,5,2,M,8,8,33,0\n');
        qz.append('http://12.31.8.10/hardware/'+ID+'/view\n');
        qz.append('E\n');
        //auto print trigger
        qz.print();     

    }

In this case if the link ID is lower than 9 everything is ok, because link 
includes 33 chars. e.g. http://12.31.8.10/hardware/9/view
If ID rise to e.g 12, it will start to cut the end of link. 

PS: I'm using windows. 

What to hell is wrong ?
Thanks in advance 

Original issue reported on code.google.com by dawidska...@gmail.com on 10 Jul 2015 at 4:22

GoogleCodeExporter commented 8 years ago
> printer BP330

Can you provide more information?

> It causes link broken.

Then why post it?

> In this case if the link ID is lower than 9 everything is ok, because link 
includes 33 chars. e.g. http://12.31.8.10/hardware/9/view
If ID rise to e.g 12, it will start to cut the end of link. 

What language are you using?  The ZPLII programmers manual uses different 
syntax for QR codes.

> What to hell is wrong ?

?

Original comment by tres.fin...@gmail.com on 10 Jul 2015 at 5:56

GoogleCodeExporter commented 8 years ago
Thank you for the quick reply :)

This is my printer: 
http://www.godexintl.com/en/product/type/model/G330

And here is the programming manual for my printer:
http://www.godexintl.com/upload/media/Downloads/Manuals/en/EZPL_programmer_manua
l_en.pdf

The above presented printer code was generated by using GoLabel software. When 
I was printing QR codes by using GoLabel, everything was fine. I could paste 
any URL, and QR code was correct.

The problem occurs only by using web printing. I don't know what hides 
qz.append method, and it is hard to figure it out for me. So, maybe we will try 
resolve this issue together. 

Are you suggesting that the problem may lie in the printer programming language?
If yes, why everything is correct when sending data by GoLabel? 

I'll try to catch IP packet with WireShark, it will show where is the problem. 
In qz object or in the printer.  

Original comment by dawidska...@gmail.com on 11 Jul 2015 at 9:15

GoogleCodeExporter commented 8 years ago
Tommorow I will try this code:

^L
Dy2
-
me
-
dd
Th:m:s
R8,13,631,384
,8,8
W100,60,1,1,M,8,7,10,0
http://www.mystoq.com/hardware/121212121212/view
E

Above code as well should generate QR Code, maybe in this case url will be 
fine. 
Sorry, I'm new in barcode programming. :/

Original comment by dawidska...@gmail.com on 11 Jul 2015 at 9:36

GoogleCodeExporter commented 8 years ago
According to your programming guide, the data length in bytes is a parameter.

I just took a glance at page 60:

Data mode: 2
Model type: 1
Error level: L
Masking factor: 8
Multiple:10
Data length: 36     <---------------- THIS

Appears to be the 8th command.

Your 8th command is "10", which might explain the character limitation.  Can 
you try changing it to something like "48"?

P.S.  I've never seen this language before! :)  Thanks for linking the manual.

Original comment by tres.fin...@gmail.com on 11 Jul 2015 at 10:21

GoogleCodeExporter commented 8 years ago
P.S. Since this issue is related to a language we've never dealt with before, 
can you open a clone of it in GitHub?  Google Code is shutting down next year 
and this will be deleted.

https://github.com/qzind/qz-print/issues

Original comment by tres.fin...@gmail.com on 11 Jul 2015 at 10:23