Deutsch   English   Français   Italiano  
<vnnb99$jtmn$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: greg <gregor.ebbing@gmx.de>
Newsgroups: comp.lang.tcl
Subject: Re: Problem with pdf4tcl, canvas and Tcl/Tk 9.0
Date: Sun, 2 Feb 2025 09:44:25 +0100
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <vnnb99$jtmn$1@dont-email.me>
References: <vnn7qo$j9lu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 02 Feb 2025 09:44:25 +0100 (CET)
Injection-Info: dont-email.me; posting-host="7cf6c22176636812377eb96f7a6a2327";
	logging-data="653015"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1881pXX6/1Siq7Z8aZo1IBIZwQruBC8YLc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EsxTNGNPviZqAoQeYTm7chfDfpI=
Content-Language: de-DE
In-Reply-To: <vnn7qo$j9lu$1@dont-email.me>
Bytes: 3008

Am 02.02.25 um 08:45 schrieb greg:
> # Example Script
> #set auto_path [linsert $auto_path 0 [file normalize  "../"]]
> 
> package require Tk
> package require pdf4tcl
> 
> # canvas
> set c [canvas .c -width 400 -height 300 -bg white]
> pack $c -fill both -expand 1
> set text_id [$c create text 200 150 -text "Hallo, Tcl/Tk!" -font "Arial 
> 16"]
> 
> pdf4tcl::new mypdf -paper a4
> mypdf canvas .c
> mypdf write -file canvas.pdf
> 
> # System:
> if {0} {
> pdf4tcl: 0.9.4
> source /usr/local/share/tcltk/pdf4tcl0.9.4/pdf4tcl.tcl
> Tcl/Tk:9.0.1 / Linux
> nameofexecutable: /usr/bin/tclsh9.0
> 
> #Output:
> 
> cannot use non-numeric string "" as left operand of "-"
>      while executing
> "expr {$underline - $isum}"
>      (procedure "CanvasGetWrappedText" line 16)
>      invoked from within
> "CanvasGetWrappedText $path $id underline"
>      (class "::pdf4tcl::pdf4tcl" method "CanvasDoItem" line 173)
>      invoked from within
> "my CanvasDoItem $path $id [$path coords $id] opts"
>      (class "::pdf4tcl::pdf4tcl" method "canvas" line 164)
>      invoked from within
> "mypdf canvas .c"
> 
> 
> }
> 
> 
> if {0} {
>    Problem with pdf4tcl, canvas and Tcl/Tk 9.0.
>    No error message with Tcl/Tk 8.6.16.
> 
>    Could this be due to changes in Tcl/Tk 9.0?
> I looked at underline in the CanvasDoItem method in ::pdf4tcl::pdf4tcl
> with
> tcl::unsupported::representation underline
> value is a pure string with a refcount of 4, object pointer at 
> 0x55ca273d5cb0, string representation "underline"
> 
>    But that doesn't help me. I haven't found any changes in 9.0 that 
> have this effect.
> 
> regards
> Gregor
> 
> }
> 
The problem has been solved since 2023.
https://sourceforge.net/p/pdf4tcl/code/ci/master/tree/ChangeLog
2023-09-11 Peter Spjuth   <peter.spjuth@gmail.com>
	* Handle Tk canvas 8.7 underline gracefully. [#13]


Gregor