jZebra jquery plugins

700 views
Skip to first unread message

Erik Lukiman

unread,
Sep 5, 2011, 10:04:57 AM9/5/11
to Tres Finocchiaro, jzebra...@googlegroups.com
Tres,

I've created a jQuery plugin that can simplified the development for template for printing. and can be used to show preview what will be printed.
for example, to print a box of 10 character spaces, you can use :

<table width="10"><tr><td>tes</td></tr></table>

<div class="dPrint topLeft drawLine[repeat[10]] topRight newLine">
<div class="dPrint vLine"></div><div class="dPrint format[left[10]]">tes</div><div class="dPrint vLine newLine"></div>
<div class="dPrint bottomLeft drawLine[repeat[10]] bottomRight newLine"></div>

<script>
directPrint.setPrinterName('LX300');
directPrint.init('.dPrint'); //this is simply a jQuery selector
//directPrint.printFile('logo.prn'); -> to print image  .prn
directPrint.print();
</script>

the plugins can even extended to print character that hadn't been included in the first place.
It can clip the text if the content is longer than reserved space.

It's been used with jquery-1.5.2 and jquery-1.4.3.

I know that the sample is seem to simple and is worthless, but I've been using it to print billing and invoice. 
if anyone is interesed I'm happy to give more complex examples


directPrint.js

Tres Finocchiaro

unread,
Sep 5, 2011, 1:14:16 PM9/5/11
to jzebra...@googlegroups.com
Thanks Erik.

Is the template logic driven by esc/p, zpl, or epl?  Also, is there asynchronous (Ajax) logic included to "wait" for readiness?  Jzebra needs help in this area.

-Tres
--
To unsubscribe from this group, send email to jzebra-users...@googlegroups.com
 
http://code.google.com/p/jzebra
<directPrint.js>

el kachchani yassine

unread,
Sep 5, 2011, 7:03:41 PM9/5/11
to jzebra...@googlegroups.com
Hi everyone,

Very good work erik ! the js will be very helpfull, and everyone will be pleased to see more complexe examples ! 

2011/9/5 Erik Lukiman <erik.l...@gmail.com>

Erik Lukiman

unread,
Sep 21, 2011, 8:46:17 PM9/21/11
to jZebra users
Tres,

the plugins is extendable to include support for different printers.
currently the built-in support is for epson (LX-300).
i plan to extend the plugins so that it can change the navite escape
command for different printers just by selecting the escape command
preset group.
and for wait for readiness, i've included it in the code, so everytime
it receive command to print, it will check the printer status first.

@el kachchani yassine: sorry but i haven't have time yet to make a
complex example that specially design for demo purpose. right now,
i've used it to print to barcode printer LP8t, TM-U220, and LX-300
with ease :)
in TM-U220 i even can print using the red ribbon.


erik

el kachchani yassine

unread,
Sep 22, 2011, 3:33:45 AM9/22/11
to jzebra...@googlegroups.com
@Erik we're still talking about your plugin right ? where can we have it ? I think we should give it an extensive set of tests and put it in the site. 

2011/9/22 Erik Lukiman <erik.l...@gmail.com>

Tres Finocchiaro

unread,
Sep 22, 2011, 11:00:29 AM9/22/11
to jzebra...@googlegroups.com
I'd suggest adding it to the downloads section as a separate file with a version number.  If you need a login to contribute content, tell me which google I'd you normally use and I'll add it to the googlecode site.

-Tres

Erik Lukiman

unread,
Sep 22, 2011, 9:17:37 PM9/22/11
to jZebra users
@el kachchani:
u can download it from my first post in this thread.

@tres:
currently i'm using this google id, so u can add it to the googlecode
and right now, i've been synchronize this google email with my bb :)

i have discussed with my colleague to further extend my plugins, so
that in the future u can just add a class marker to a table, and then
the plugin will do the rest to print it with the full table display
intact :)

Tres Finocchiaro

unread,
Sep 23, 2011, 1:59:09 AM9/23/11
to jzebra...@googlegroups.com
Erik,

You now have contributor access.

-Tres

Erik Lukiman

unread,
Oct 6, 2011, 8:46:40 PM10/6/11
to jZebra users
I have created a new download page (http://jzebra.googlecode.com/files/
directPrint.0.9.0.zip) and a wiki (http://code.google.com/p/jzebra/
wiki/TutorialDirectPrint)

any comment or suggestion is very welcome...

erik

On Sep 23, 12:59 pm, Tres Finocchiaro <tres.finocchi...@gmail.com>
wrote:
> Erik,
>
> You now have contributor access.
>
> -Tres
>
Reply all
Reply to author
Forward
0 new messages