[Wylug-help] Suggestions - printing to ZEBRA credit card printer attached to Win7 PC

Smylers Smylers at stripey.com
Wed Sep 17 15:46:43 UTC 2014


Gary Stainburn writes:

> There are posts about generating HTML/CSS and using rundll32 to print
> it. Google on "windows html css print" doesn't give much help. Does
> anyone know how I would be able to get it to print to 84CMx54CM page?

Hi, Gary. I no almost nothing about printing on Windows, and have never
heard of the device you're trying to print to.

But if your question is really ‘How do I automate generating custom
documents which I can then print?’, then I have had success with
WeasyPrint, which works along the lines of:

  weasyprint input.html output.pdf

input.html can link to a style-sheet. It supports the CSS paged media
directives, so you can set any page size you want.

I generate input.html using the Perl Template module: the template is an
HTML file with a few [% placeholders %], which gets instantiated with
values passed to it from Perl to generate a specific HTML file for the
current record, and that is what gets passed to WeasyPrint. Other Perl
templating modules are available, and may be superior.

That just leaves sending the resultant PDF file on Windows to your
Zebra.

Smylers
-- 
http://twitter.com/Smylers2



More information about the Wylug-help mailing list