Browser

Andrew at MidWest Coast Media andrew at midwestcoastmedia.com
Sun Jun 21 08:46:40 EDT 2020


> I am again looking at implementing Javascript charts within a LC browser.
> Looking at amCharts.
> Got a chart displaying easily within the browser widget.
> Tries to print the card but the widget does not print.


I’m using amCharts in another project and ran into the same problem: everything looked right in Live view but would disappear when I tried to print a PDF. The only way I could get them to appear right was by taking a picture of the browser and using that image instead of the live JavaScript in the browser (widget). I think hh keyed me into this with his epic knowledge of this tool

      set the width of templateImage to the width of widget "Browser"
      set the height of templateImage to the height of widget "Browser"
      export snapshot from rect globalRect(the rect of widget "Browser") to tSnapshot as JPEG
      create image “renderedBrowser"
      set the visible of widget “Browser” to FALSE
      put tSnapshot into image tSnapshotName
      set the name of image tSnapshotName to tSnapshotName
      set the loc of image tSnapshotName to the loc of widget “Browser"

—Andrew Bell


More information about the use-livecode mailing list