Re: pdf in Canvas

"Christoph Fuchs" <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
I do not think that it is possible to directly display pdf in a canvas.

Depending on your needs, you may consider one of the following ways:

If you just want to see the image in the canvas, you could use some
converter to convert your image to a format which is supported by 
Tk::Photo ( I use ghostscript to convert pdf to ppm). However
you end up with a pixel format instead of a vector format, so you
carefully have to think about adequate resolution and zooming 
into the picture does not look nice.

On the other hand, if you must retain the vector format (e.g. if you
want to edit some of the elements), I do not know of an easy way.
There is a tool called pstoedit which allows to convert postscript
to other vector formats. It uses ghostscript, so it also works on pdf
files. However, there is tcl/tk canvas output available, but no
perl/tk output (although it should not be too difficult for an
experienced programmer to write an output module for perl/tk).

Regards,
Christoph


> Can pdf files be displayed in a Canvas widget?  My attempts to find out
> either way by searching the net have failed.
>  
> If not what are good ways to convert pdf files to a type that can be
> displayed in a Canvas?
>  
> Best regards
>  
> Henry Merryweather
> 

-- 
"Happy ProMail" bis 24. März: http://www.gmx.net/de/go/promail
Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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.