Yes, I have tried that arrangement before.  The file must be an html
document though, and $outfile must be the complete path to the file you wish
to print.  You are not able to set
the margins either, although you can set page orientation, number of copies,
which printer destination, and a range of pages. I wish to print a textfile
(report) from my program with a printer dialog similar to what you would see
in Notepad, but I also need to set the font to a fixed font and the
character size to a very small size to get 306 characters to print across
the page landscape orientation.  Using the html file print dialog dll, I
have to enclose my report textfile in html code to set the font, and I have
to end each line with <BR>. The big problem is that html only lets you print
a font size from 1 to 6 with 1 being the smallest. I need by data to line up
rows/columns, so I need to use a fixed font like Courier New. Courier New
Size 1 does not print as small as Ariel size 1. Ariel size 1 fits on the
page, but is not a fixed font, so the columns of data to not line up.

Regards,
Eric

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Danny Hoffman
Sent: Wednesday, March 22, 2000 3:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [perl-win32-gui] Printer Dialog Box?


Jenda Krynicky wrote:
>
> > Anyone, how do you call a Printer Dialog Box with Win32-GUI?
> >
> > Thanks,
> > Eric
>
> I'm afraid you don't. But if anyone knows what API function to call
> for this we can try to implement it via Win32::API.
>
> Jenda
>
> == [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
>  The phenomenon of UFO doesn't say anything about
>     the presence of intelligence in space.
>   It just shows how rare it is here on the earth.
>                                     A.C.Clarke


Try this:
------------------------------------------------
if (-e "$ENV{'WINDIR'}/System32/mshtml.dll")
{
    $dll = "$ENV{'WINDIR'}/System32/mshtml.dll";
}
else
{
    $dll = "$ENV{'WINDIR'}/System/mshtml.dll";
}

system("rundll32.exe $dll,PrintHTML $outfile");
------------------------------------------------
Thanx to Indy Singh!

--
Met vriendelijke groet,
Danny Hoffman, Elements Internet Producties, http://www.elements.nl


Reply via email to