TooNewbie has asked for the wisdom of the Perl Monks concerning the following question:
Has anyone else had problems creating a ps? Any ideas? Any help is appreciated.
Below is more specific info.
My platform: Linux What I'm using: use Tk; use Class::Struct; use POSIX; My Canvas: my $c = $mw -> Scrolled("Canvas", -cursor =>"crosshair") -> pack(-side => "left", -fill => 'both', -expand =>1); my $canvas = $c->Subwidget("canvas"); The Call: $canvas->postscript( -colormode => "mono", -fontmap=>"-*-Helvetica-Bold-0-Normal--*-140-*", -height =>5, -pageanchor => "center", -pageheight => 5, -pagewidth => 5, -pagex => 5, -pagey=>5, -rotate => 0, -width =>5, -x=>0, -y=>0, -file => "file.ps"); The result: %!PS-Adobe-3.0 EPSF-3.0 %%Creator: Tk Canvas Widget %%Title: Window .frame1.canvas %%CreationDate: Tue Dec 17 14:35:31 2002 %%BoundingBox: 3 3 9 9 %%Pages: 1 %%DocumentData: Clean7Bit %%Orientation: Portrait %%EndComments %%BeginSetup /CL 0 def %%EndSetup %%Page: 1 1 save 5.0 5.0 translate 1 1 scale -2 -2 translate 0 5 moveto 5 5 lineto 5 0 lineto 0 0 lineto closepath clip newpath gsave -160 165 moveto 6320 0 rlineto 0 -18320 rlineto -6320 0 rlineto clos +epath 0 setlinejoin 2 setlinecap 2 setlinewidth [] 0 setdash 0.000 0.000 0.000 setrgbcolor AdjustColor stroke grestore restore showpage %%Trailer end %%EOF
update (broquaint): moved <code> tags and added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: tk canvas to postscript error
by Tanalis (Curate) on Dec 18, 2002 at 09:56 UTC | |
by TooNewbie (Acolyte) on Dec 18, 2002 at 17:10 UTC |