Re: Canvas - using pdf files and printing

[email protected]
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Dean Arnold <[email protected]> wrote:
> [email protected] wrote:
> > "Henry Merryweather" <[email protected]> wrote:
> > [...]
> > 
> >>Printing from a Canvas widget
> >> 
> >>I want the print the image in the canvas widget.  I appreciate that you
> >>can create a Postscript file of the image in the Canvas.  However, can
> >>you directly send the image to a printer connected to the PC you are
> >>using?  In the past I have resorted, for text, to sending this to
> >>something like Notepad and using its printing facilities.  However I
> >>need to do it without an additional application if this is possible.
> > 
> > 
> > I am the maintainer of Tk::WinPrint, which can be used to print
> > the contents of Text and Canvas widgets. But from the README:
> > 
> > | Works only with gcc (mingw32 or cygwin)!
> > 
> > As I do not have a Windows development machine to develop on nor
> > I have any windows internals knowledge, I would like to give
> > module maintenance to someone else.
> > 
> > Regards,
> > 	Slaven
> > 
> 
> Care to share a synopsis of how it works ? A cursory review
> seems to indicate Text gets converted to a Canvas, then the
> actual printing is applied to the Canvas. The Win32 code looks
> pretty simple, and my first attempt build burped on some preproc
> #define's, so it may not be too difficult.

Look at the test.pl file --- it's just a call to the newly created
method print. The method optionally takes a couple of arguments
which seem to be similar to arguments for the postscript() method.
Just look at tkWinPrintCanvas.c file for configSpecs[].

> That being said, I assume there's no hooks for the usual
> printer properties dialog ?

print() is supposed to popup a printer dialog, but there does not
seem to be any configuration parameters for the dialog.

Regards,
	Slaven

-- 
     __o		Slaven Rezic
   _`\<,_		slaven <at> rezic <dot> de
__(_)/ (_)____
______________________________________________________________________________
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.