From hempy at ket.org Wed Nov 24 20:19:36 2004 From: hempy at ket.org (David Hempy) Date: Wed Nov 24 20:22:02 2004 Subject: [Lexington-pm] Printing from perl? Message-ID: <6.0.0.22.0.20041124210355.03250550@mail.ket.org> I'm a bit embarassed that I don't know how to do this, and a bit surprised this is the first time I've needed to. I need to print a shipping label from a perl program on a Windows box. That's it. Nothing more. Seems simple enough? I could deal with just plain monosapce text, but I'd much rather have a modest amount of control, such as font size, layout, borders, etc. HTML layout would fit the bill perfectly, but I'm not tied to it. I suspect Latex might solve my problems, but I really don't know anything about it. I've been unable to find a way to print an HTML file from an unattended perl script. I've found several ways to tell Explorer to print, but all involve a printer dialogue box, requiring a mouseclick. (One document said this is a security feature to keep the spammers out of your printer.) Scripting a click to fix that seems like a low-reliability solution. I found a third-party printing solution ( http://www.traction-software.co.uk/batchprint/ ) that will print an html (or many other formats) file from a command line interface, or by watching a dropbox folder. At the moment, this is my most promising prospect...but I just feel that is an unneeded layer of complication for what should be a simple task. You would think you could just run "explorer --print myfile.html" ...but no dice. So...we've got a number of professional perl programmers on the list...how do you handle report printing from perl programs? Help me put the "r" back in "perl!" -dave -- David Hempy Internet Database Administrator Kentucky Educational Television (859)258-7164 - (800)333-9764 A firm grip on reality is not a critical component of happiness. From jladick at insightbb.com Thu Nov 25 09:02:15 2004 From: jladick at insightbb.com (Janine Ladick) Date: Thu Nov 25 09:00:18 2004 Subject: [Lexington-pm] Printing from perl? In-Reply-To: <6.0.0.22.0.20041124210355.03250550@mail.ket.org> Message-ID: <200411251500.iAPF0G6B019108@www.pm.org> > I'm a bit embarassed that I don't know how to do this, and a > bit surprised this is the first time I've needed to. > > I need to print a shipping label from a perl program on a > Windows box. > > That's it. Nothing more. Seems simple enough? Just curious...why do you need to use Perl to do this? What kind of printer are you going to use? If it's one of those dedicated shipping label printers, it might come with software and an API that you could interface with (perhaps from Perl) to get the job done. Are you printing barcodes, too? Janine From jladick at insightbb.com Thu Nov 25 09:02:15 2004 From: jladick at insightbb.com (Janine Ladick) Date: Thu Nov 25 09:00:23 2004 Subject: [Lexington-pm] Printing from perl? In-Reply-To: <6.0.0.22.0.20041124210355.03250550@mail.ket.org> Message-ID: <200411251500.iAPF0Msc019115@www.pm.org> > I'm a bit embarassed that I don't know how to do this, and a > bit surprised this is the first time I've needed to. > > I need to print a shipping label from a perl program on a > Windows box. > > That's it. Nothing more. Seems simple enough? Just curious...why do you need to use Perl to do this? What kind of printer are you going to use? If it's one of those dedicated shipping label printers, it might come with software and an API that you could interface with (perhaps from Perl) to get the job done. Are you printing barcodes, too? Janine From hempy at ket.org Fri Nov 26 10:48:30 2004 From: hempy at ket.org (David Hempy) Date: Fri Nov 26 10:53:22 2004 Subject: [Lexington-pm] Printing from perl? In-Reply-To: <200411251500.iAPF0Msc019115@www.pm.org> References: <6.0.0.22.0.20041124210355.03250550@mail.ket.org> <200411251500.iAPF0Msc019115@www.pm.org> Message-ID: <6.0.0.22.0.20041126114158.033210b0@mail.ket.org> At 10:02 AM 11/25/2004, Janine Ladick wrote: >> I'm a bit embarassed that I don't know how to do this, and a >> bit surprised this is the first time I've needed to. >> >> I need to print a shipping label from a perl program on a >> Windows box. >> >> That's it. Nothing more. Seems simple enough? > >Just curious...why do you need to use Perl to do this? Umm...because I know perl? :-) That's a good question. In fact, I considered using Visual FoxPro for its report printing. I may do that yet. Either way, I've got to build some new skills with one approach or the other...and perl generally works out better in the end. >What kind of printer are you going to use? If it's one of those dedicated >shipping label printers, it might come with software and an API that you >could interface with (perhaps from Perl) to get the job done. > >Are you printing barcodes, too? It will be from a regular laser printer. It probably won't actually be a label, but a sleeve in a DVD case. We think we'll be shipping the DVD sleeve (the tall ones, like a shrink-wrap movie comes in) without an envelope or box...still waiting for an OK from the shipping department on that one. If so, then one sheet will have the DVD title and the shipping address on one piece of paper. If that doesn't work out, then we'll have both a sleeve insert and a printed label. It might make sense to use a dedicated label printer at that point. So...does anyone on the list do any printing from perl? -dave -- David Hempy Internet Database Administrator Kentucky Educational Television (859)258-7164 - (800)333-9764 A firm grip on reality is not a critical component of happiness. From scott at asofyet.org Fri Nov 26 18:08:54 2004 From: scott at asofyet.org (muppet) Date: Fri Nov 26 18:08:46 2004 Subject: [Lexington-pm] Printing from perl? In-Reply-To: <6.0.0.22.0.20041126114158.033210b0@mail.ket.org> References: <6.0.0.22.0.20041124210355.03250550@mail.ket.org> <200411251500.iAPF0Msc019115@www.pm.org> <6.0.0.22.0.20041126114158.033210b0@mail.ket.org> Message-ID: <8694AB93-4008-11D9-A611-000A9580E5E0@asofyet.org> On Nov 26, 2004, at 11:48 AM, David Hempy wrote: > So...does anyone on the list do any printing from perl? yes, but with LPR or some other unixy printing scheme which won't help much on winblows. -- Brian: If i recall correctly, this is the physics department. Chris: That explains all that gravity. -- Family Guy, "The Story on Page One"