Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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,

-schweini

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2020-05-25 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (145 votes). Check out past polls.

    Notices?