Page 1 of 1
Printing from the Browser widget
Posted: Tue Mar 16, 2021 10:21 am
by richmond62
Is a load of old cack:
-
-
yielding a blank page.
Aaaaaaaah:
https://www.forums.livecode.com/viewtopic.php?t=32387
"Print/PrintToPDF is not supported by the browser widget.
It is on the long list of LC promises for LC 9."
That was March 2019: 2 years ago!
Re: Printing from the Browser widget
Posted: Tue Mar 16, 2021 10:32 am
by richmond62
So: I'd thought I'd try and be "clever" (I never learn) and try this:
Code: Select all
import snapshot from widget "Browser"
AND, wonders-will-never-cease, I got a totally useless transparent image.
Re: Printing from the Browser widget
Posted: Tue Mar 16, 2021 10:49 am
by richmond62
This seems OK:
Code: Select all
on mouseUp
set the height of stack "Browser Basher" to ((the height of widget "WB") + 24)
set the top of stack "Browser Basher" to 200
wait 2 secs
put the rect of widget "WB" into REX
put the windowID of stack "Browser Basher" into GLAZIER
import snapshot from rect REX of window GLAZIER
set the name of the last image to "PICPRINT"
end mouseUp
Until one works out that the image, while being (in this case) 2400 tall, only contains
pictorial material the size of the stack BEFORE the resize . . .
Re: Printing from the Browser widget
Posted: Tue Mar 16, 2021 10:59 am
by jmburnod
Hi Richmond,
This work here (LC 9.6.1)
Code: Select all
on getImgFromWidget
put globalLoc(topleft of widget 1 ) into tTL
put globalLoc(bottomright of widget 1 ) into tBR
import snapshot from rect tTL,tBR
end getImgFromWidget
Kind regards
Jean-Marc