Printing a Widget Browser
jonathandlynch at gmail.com
jonathandlynch at gmail.com
Thu Jun 29 15:37:41 EDT 2017
Could you export to a file, launch that in the user's standard browser, and print from there?
Sent from my iPhone
> On Jun 29, 2017, at 2:04 PM, Terence Heaford via use-livecode <use-livecode at lists.runrev.com> wrote:
>
>
> Not posted for a long time but still keeping an eye on progress.
>
> Is there any chance of printing a Browser Widget any time soon?
>
> This code just gives a grey printout.
>
> I am waiting patiently for this so that I can use for example amCharts within LiveCode.
>
> I have implemented a print routine by exporting to an image but as this is an image it can turn out blurred.
>
> Thanks
>
> Terry
>
>
> on mouseUp
>
> answer page setup --as sheet
> if the result = "cancel" then
> exit mouseUp
> end if
> answer printer --as sheet
> if the result = "cancel" then
> exit mouseUp
> end if
>
> put the printPaperRectangle into tPaperRect
> put item 3 of tPaperRect into tAvailWidth
> put item 4 of tPaperRect into tAvailHeight
>
> put the width of widget "Browser" into tChartWidth
> put the height of widget "Browser" into tChartHeight
>
> put tAvailWidth/tChartWidth into tWidthRatio
> put tAvailHeight/tChartHeight into tHeightRatio
> put min(tWidthRatio,tHeightRatio) into tRatio
>
> put tRatio * tChartWidth into tPrintWidth
> put tRatio * tChartHeight into tPrintHeight
>
> put 0 into item 1 of tPrintRect
> put 0 into item 2 of tPrintRect
> put tPrintWidth into item 3 of tPrintRect
> put tPrintHeight into item 4 of tPrintRect
>
> print card from topleft of widget "Browser" to bottomRight of widget "Browser" into tPrintRect
>
>
> end mouseUp
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list