This method is great for dynamically creating a formatted HTML document, saving it to a file by printing to the File Handle, then calling the system command below to print the html document.
system('rundll32.exe %SystemRoot%\system32\mshtml.dll,PrintHTML "file://c:\perl\myfile.html"');
This command will open the printer dialog so the user can select a printer and other options.

Thanks to Rob's site for showing me how to use the rundll32 command.
Using the system command creates a problem when trying to run a console free application, however I will address this in another post.
No comments:
Post a Comment