Print a HTML page of Varying height

Hello,

I have receipt where its height is dynamic. Is there a way to print the receipt according to varied height instead of height from printer preferences settings under options section.

Thank you,

Dheeraj Vislavath

Anonymous (not verified)
Hi Dheeraj,Unfortunately

Hi Dheeraj,

Unfortunately printing from a web browser's "Print" menu means you are using a print driver to print.  Most print drivers do not allow variable length printing.

Your best option is to convert the webpage to an image and use something like Browser Print to print it.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dheeraj vislavath
Thank you for recommending

Thank you for recommending Browser print.

I have used the following ZPL

^XA

^MMK

^LL506

^MNV

^KV20,9,0,0,0

^FO50,50^A0N,50,50^FDPartial Cut^FS

^FO50,150^A0N,50,50^FDPrinting Line 1^FS

^FO50,250^A0N,50,50^FDPrinting Line 2^FS

^FO50,350^A0N,50,50^FDPrinting Line 3^FS

^FO50,450^A0N,50,50^FDPrinting Line 4^FS

^FO50,650^A0N,50,50^FDPrinting Line 5^FS

^FO50,850^A0N,50,50^FDPrinting Line 6^FS

^CN0^PN0

^XZ

I am able to print only until Printing Line 3, even I used ^MNV to print continuous, variable length. Currently, the print job is stopping when it reaches 506 dots as given in the ^LL command. How to print all the lines ?

Thank you.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Dheeraj,Is your printer a

Hi Dheeraj,

Is your printer a KR403 or is it some other model?  These specific commands will only work if you are using a KR403.  Otherwise you need to set the media to continuous and set the label length for each label.

Non-KR403:

^XA

^MNN

^MMT

^LL900

^FO50,50^A0N,50,50^FDPartial Cut^FS

^FO50,150^A0N,50,50^FDPrinting Line 1^FS

^FO50,250^A0N,50,50^FDPrinting Line 2^FS

^FO50,350^A0N,50,50^FDPrinting Line 3^FS

^FO50,450^A0N,50,50^FDPrinting Line 4^FS

^FO50,650^A0N,50,50^FDPrinting Line 5^FS

^FO50,850^A0N,50,50^FDPrinting Line 6^FS

^CN0^PN0

^XZ

KR403:

^XA

^MMK

^MNV

^KV20,9,0,0,0

^FO50,50^A0N,50,50^FDPartial Cut^FS

^FO50,150^A0N,50,50^FDPrinting Line 1^FS

^FO50,250^A0N,50,50^FDPrinting Line 2^FS

^FO50,350^A0N,50,50^FDPrinting Line 3^FS

^FO50,450^A0N,50,50^FDPrinting Line 4^FS

^FO50,650^A0N,50,50^FDPrinting Line 5^FS

^FO50,850^A0N,50,50^FDPrinting Line 6^FS

^CN0^PN0

^XZ

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dheeraj vislavath
My printer is GK420D. I would

My printer is GK420D. I would like to print continuous, Variable length receipt. How can I achieve that?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dheeraj vislavath
What if my receipt has more

What if my receipt has more lines and I do not know the length of additional lines before printing. How to print all the lines with GK420d printer ?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Dheeraj, You need to set

Hi Dheeraj,

You need to set the printer into continuous/reciept mode with the ^MNN command as I showed in the first example.  For the length, you have the option of calculating it out before printing, or breaking the label up as I have below.  Notice the label length does not change, nor does the print position of each line.

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPartial Cut^FS^XZ 

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPrinting Line 1^FS^XZ

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPrinting Line 2^FS^XZ 

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPrinting Line 3^FS^XZ 

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPrinting Line 4^FS^XZ 

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPrinting Line 5^FS^XZ 

^XA^MNN^MMT^LL100^FS^FO50,20^A0N,50,50^FDPrinting Line 6^FS^XZ

^XA^MNN^MMC^LL100^FS^FO50,20^A0N,50,50^FDEnd Of Page^FS^CN0^PN0^XZ 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dheeraj vislavath
That technique works. Thank

That technique works. Thank you.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments