Re: Tk::Canvas to PDF module offer
Slaven Rezic <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Petr Pajas <[email protected]> writes: > Dne út 30. listopadu 2004 08:31 John napsal(a): > > Hello > > > > How did you hack the module? > > Simply:-) It uses PDF::API2 module to create the actual PDF content. > It creates a new PDF object and a PDF page, then it examinines > every object on a given canvas one by one and translates it to a > corresponding PDF-object. It's really only a matter of itemCget, > some conversions on the object parameters and some PDF::API2 calls. > > The only harder thing to implement were the arrows (if a multi-line > is smooth, you have to position the arrow head correctly) and > shapes. > The module looks promising. When trying the pdf() method I get the following error message: ## Can't locate object method "hybrid" via package "PDF::API2::Page" at /tmp/Tk/Canvas/PDF.pm line 271 both with the stable and the development versions of PDF::API2. Replacing the hybrid() method by gfx() made the module work. Lines, circles and rectangles of all shapes seem to work, while polygons are not handled correctly (it seems that rectangles are used instead of polygons). Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de BBBike - route planner for cyclists in Berlin WWW version: http://www.bbbike.de Perl/Tk version for Unix and Windows: http://bbbike.sourceforge.net -++**==--++**==--++**==--++**==--++**==--++**==--++**== 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]