Re: Tk::Canvas to PDF module offer

"John" <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <008401c4d77b$1498bd40$747882c3@jonsof>
----- Original Message ----- 
From: "Slaven Rezic" <[email protected]>
To: "Petr Pajas" <[email protected]>
Cc: "John" <[email protected]>; <[email protected]>
Sent: Wednesday, December 01, 2004 12:09 AM
Subject: Re: Tk::Canvas to PDF module offer


> 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]
>



Did you try to compile your perl script (using perlapp) ?
Did it work correctly?

Mine isn't as far as is looking for

Tk::Error: Can't locate PDF/API2/TTF/Table.pm in @INC (@INC contains:
C:\DOCUME~
1\ADMINI~1\LOCALS~1\Temp\pdk-Administrator-1496\ C:\progs\Canvas) at
/PerlApp/PD
F/API2/TTF/Font.pm line 333.

Possibly, because i have set pdf font arial.ttf (arial.ttf is in my current
directory)



-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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.