TedYoung has asked for the wisdom of the Perl Monks concerning the following question:
Hello Fellow Monks,
I have a system in Java that tranforms XML documents into SVG, and prints them (to a card printer). The Java SVG rendering/printing library Batik has had very little advancement over the last four years (I am not complaining, I haven't contributed myself! ;-> ) and I am starting to want newer SVG features (like text wrapping). Also, Batik seems to have problems with newer versions of Java.
So I want to convert this over to Perl, because I heard rumors that Image::Magick will rasterize SVG. Now, I will test that tomorrow morning when I get back to work. They only thing really holding me up is a way to print the rasterized image to the card printer (which uses a windows print driver).
Now, you want to go mad? Try searching for how to print in perl (or perl printing) on Google. Thanks to our keyword print and the notion of printing to a browser/file, this is a tedious task.
I have found some PerlMonk nodes suggesting the easiest way to print a file in Windows is with system "print foo.jpg". That would require me to associate a particular image file with something that would do a good job printing. Worse, I need to raster two images, one for the front and one for the back of the card (duplex printing, which the driver supports -- I just have to send it two "pages").
This is a Windows only thing and I have complete control over the env. But I would like to be able to wrap the final product in PAR. I am definately open to a Win32::OLE solution. I have also looked at Win32::Printer but felt like it was a little too low-level (though it may be the best choice). Alternatively, should I consider converting the image data to some standard, which I could dump directly to the printer? What would that standard be? Can you open a ethernet printer port using open?
Update: To take a step back for a second, I really don't need to rasterize the SVG. In fact, it would improve my print quality if the text was sent to the printer as TrueType. So, if anyone knows of a way to print the SVG more directly, I am interested in that too.
Thanks for the help!
Ted Young
($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing in Duplex on Windows
by albert (Monk) on Jun 08, 2006 at 02:43 UTC | |
|
Re: Printing in Duplex on Windows
by bigmacbear (Monk) on Jun 09, 2006 at 00:03 UTC | |
|
Re: Printing in Duplex on Windows
by digger (Friar) on Jun 09, 2006 at 00:27 UTC |