BookmarkSubscribe
Choose Language Hide Translation Bar
CaseyL
New Contributor

Adding external images to report with JSL

I've found that I can copy/paste an image into a report/journal (https://www.jmp.com/support/help/14-2/paste-an-image-at-the-end-of-a-report.shtml#865792)

 

is there a way to do this in JSL? are there any options for placement/resizing? My ultimate goal is to automate the generation of reports add relevent images and then publish to HTML.

 

I had thought to publish the reports and then add the images to the HTML file, but the files generated by JMP are not easy to modify, the <body> sections are blank and I think must be generated dynamically when the page is loaded.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Adding external images to report with JSL

You can read in external images into a Picture Box(), and then place that into a Journal.

Names Default To Here( 1 );

pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) );

nw = New Window( "jj", <<journal );
nw << append( pb );

You can also adjust the size

Names Default To Here( 1 );

pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) );
pb << set width(800);
pb << set height(800);

nw = New Window( "jj", <<journal );
nw << append( pb );

In the construction of a Journal, you can organize it's contents using the various JSL functions and objects to do location, spacing, page breaks, etc.

See the Scripting Guide

      Help==>Books==>Scripting Guide

and also the Scripting Index

     Help==>Scripting Index

Jim
1 REPLY 1
txnelson
Super User

Re: Adding external images to report with JSL

You can read in external images into a Picture Box(), and then place that into a Journal.

Names Default To Here( 1 );

pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) );

nw = New Window( "jj", <<journal );
nw << append( pb );

You can also adjust the size

Names Default To Here( 1 );

pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) );
pb << set width(800);
pb << set height(800);

nw = New Window( "jj", <<journal );
nw << append( pb );

In the construction of a Journal, you can organize it's contents using the various JSL functions and objects to do location, spacing, page breaks, etc.

See the Scripting Guide

      Help==>Books==>Scripting Guide

and also the Scripting Index

     Help==>Scripting Index

Jim