Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Printing from Perl in Windows

by schweini (Friar)
on Feb 17, 2003 at 04:28 UTC ( #235882=note: print w/replies, xml ) Need Help??

in reply to Printing from Perl in Windows

just some (untested) brainstormed ideas:
- you can still open printers in windows through open(PRN, ">LPT1") or open(PRN, '>\\printserver\printershare') (watch out for the single-quotes to avoid interpolation of the backslashes), and IMHO perl's formating abilities are quite fun to use - so if you don't NEED any special formatting (bold, etc) that option is still open.
you may want to look at Tk::Canvas' postscript() function. I've never used it, but it's supposed to generate postscript that you could (some way or another) send to your printer, convert to .pdf, etc.
another (weird) option would be to genrate HTML, pipe that to html2ps, or let a browser print it - even though printer-formating via CSS is still in its infancy.
i've never done Word-automation, but i think it's quite hard, and not worth the extra effort just to get that special word bold.
another fun option would be to create an Excel .xls file using Spreadsheet::WriteExcel formatting capabilities, and then tell Excel to print it via Win32::OLE .
hope these thoughts help you find a better way,


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://235882]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2021-01-18 11:39 GMT
Find Nodes?
    Voting Booth?