Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing widgets and printing PNG and/or JPG files

5 views
Skip to first unread message

gary sachs

unread,
Jan 1, 2012, 4:11:44 PM1/1/12
to TCLTK-PERL
Happy New Year,

Rather than re-invent the wheel... does any one have code and/or widgetfor PERL and TkX they can share that will print a PNG and/or JPEG files?
This is on a WINDOWS XP and/or WINDOWS 7 OS.

Thanks,
gary

Jeff Hobbs

unread,
Jan 1, 2012, 4:38:13 PM1/1/12
to gary sachs, TCLTK-PERL
On 2012-01-01, at 1:11 PM, gary sachs wrote:
> Rather than re-invent the wheel... does any one have code and/or widgetfor PERL and TkX they can share that will print a PNG and/or JPEG files?
> This is on a WINDOWS XP and/or WINDOWS 7 OS.

Printing in Tk is still a per-platform specialty, but there are a couple options on Windows. I would recommend reviewing the tkprint extension, then seeing what else might work for you at:
http://wiki.tcl.tk/2497 (TkPrint)
http://wiki.tcl.tk/11319 (Printing under Windows)

Jeff

Konovalov, Vadim (Vadim)** CTR **

unread,
Jan 2, 2012, 4:35:27 AM1/2/12
to Jeff Hobbs, gary sachs, TCLTK-PERL
> From: Jeff Hobbs
> On 2012-01-01, at 1:11 PM, gary sachs wrote:
> > Rather than re-invent the wheel... does any one have code
> and/or widgetfor PERL and TkX they can share that will print
> a PNG and/or JPEG files?
> > This is on a WINDOWS XP and/or WINDOWS 7 OS.

I do not have code sample as I never needed this.

> Printing in Tk is still a per-platform specialty, but there
> are a couple options on Windows. I would recommend reviewing
> the tkprint extension, then seeing what else might work for you at:
> http://wiki.tcl.tk/2497 (TkPrint)
> http://wiki.tcl.tk/11319 (Printing under Windows)


Alternatively, you can do it from Perl side: use Win32::API to
use win32 API to print, or better use CPAN module that already
do this.

I see there are module Win32::Printer
to help you with this, but maybe its not the one you need and also
I see some "discontined" message there.
(http://search.cpan.org/~wasx/Win32-Printer-0.9.1/Printer.pm)

Ask for this approach on Perlmonks.org site, without even mentioning
Tkx.

Regards,
Vadim.
0 new messages