<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Saving Journal as PNG (or PDF) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221217#M44153</link>
    <description>&lt;P&gt;In JMP 14, &amp;lt;&amp;lt;journal does not seem to return the journal in a useful way. Add this after you create the journal:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn=currentjournal();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and then save the pdf.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2019 19:36:53 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2019-08-09T19:36:53Z</dc:date>
    <item>
      <title>Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221206#M44152</link>
      <description>&lt;P&gt;I am trying to save a very basic table as a PNG (or PDF).&amp;nbsp; I am able to create a journal with my table but haven't been able to get it to save properly.&amp;nbsp; From reading on this message board and consulting the scripting guide the below should work but it doesn't actually save anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt = current data table();


path_to_results=Pick Directory("Results folder");
r = Column Dialog(
	cats = Col List("Categories", Max Col( 10 ), MinCol( 0 )),
		
	);
cat = r["cats"];

st = Data Table( Eval(TableName) ) &amp;lt;&amp;lt;
Summary(
	Group(
		:Label1,
		Eval(cat)
	)
);

jrn = st &amp;lt;&amp;lt; Journal;
jrn &amp;lt;&amp;lt; SavePDF( path_to_results||"categorychart.pdf");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2019 17:52:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221206#M44152</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-08-09T17:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221217#M44153</link>
      <description>&lt;P&gt;In JMP 14, &amp;lt;&amp;lt;journal does not seem to return the journal in a useful way. Add this after you create the journal:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn=currentjournal();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and then save the pdf.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 19:36:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221217#M44153</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-08-09T19:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221238#M44157</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; That does fix the problem with the SavePDF feature but alas this isn't doing what I want.&amp;nbsp; Really what I need to do is save the small table as an image rather than all the extra.&amp;nbsp; &amp;nbsp;Any suggestions on how to just save a PNG with the table only?&amp;nbsp; Possibly something along the lines of creating a table in a new window and then saving an image of the new window as a PNG.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 21:37:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221238#M44157</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-08-09T21:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221254#M44159</link>
      <description>&lt;P&gt;Yes.&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5579"&gt;@Wendy_Murphrey&lt;/a&gt;&amp;nbsp; just posted&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMPer-Cable/Navigating-your-reports-using-XPath/ba-p/219099" target="_self"&gt;an xpath&lt;/A&gt;&amp;nbsp;way to navigate to a node in the display box tree, or you can use the display box subscripting. When you get to the right node, save it as a PNG. Something like this using display box subscripts.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="from the top left red triangle in the report, Edit-&amp;gt;Show Tree Structure" style="width: 589px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18758iF5D207F9DCD9CD05/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="from the top left red triangle in the report, Edit-&amp;gt;Show Tree Structure" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;from the top left red triangle in the report, Edit-&amp;gt;Show Tree Structure&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use the show tree structure command to identify the part of the report you need. Here, picture box(1) captures the graph without the title for the entire section. Then, use JSL like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/big class.jmp" );
dist = dt &amp;lt;&amp;lt; Distribution(
	Continuous Distribution( Column( :weight ) ),
	Nominal Distribution( Column( :age ) )
);

boxtree = Report( dist );
picbox = boxtree[Picture Box( 1 )];
picbox &amp;lt;&amp;lt; savepicture( "$desktop/distrib.png", "png" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The captured PNG file" style="width: 442px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18759i3D9D4F2331DD2F87/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="The captured PNG file" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The captured PNG file&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;At the point when I had the picbox variable set, I was not sure what the command was to take a picture. I used this to find out what commands were available for that box:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;showproperties(picbox)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and found this in the list:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="save picture command" style="width: 706px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18760iFAAC398D25C5B8E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.PNG" alt="save picture command" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;save picture command&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;which you can then look up in the scripting index:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Help-&amp;gt;Scripting Index" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18761i9E6165DE3C73BE61/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.PNG" alt="Help-&amp;gt;Scripting Index" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Help-&amp;gt;Scripting Index&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 22:33:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221254#M44159</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-08-09T22:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221721#M44248</link>
      <description>&lt;P&gt;To close this.&amp;nbsp; I was able to find a solution to do what I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a function to display my table in a new window and then saved that new window as a png file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;SplitChartCreator = Function({dt,path_to_results},{Default Local},

	r = Column Dialog(
		split = Col List("Split Columns", Max Col( 10 ), MinCol( 0 )),
			
		);
	splits = r["split"];

	st = dt &amp;lt;&amp;lt;
	Summary(
		Group(
			:Lot,
			:Wafer,
			Eval(splits)
		)
	);

	st &amp;lt;&amp;lt; Delete Columns ( "N Rows" );

	tb = Table Box();
		For (i=1,i&amp;lt;=NCols(st),i++,
			col = Column(st,i);
			colName = col &amp;lt;&amp;lt; Get Name;
			lstValues = col &amp;lt;&amp;lt; Get Values;
			type = col &amp;lt;&amp;lt; Get Data Type;
			If (type=="Character",
				tb &amp;lt;&amp;lt; Append(
					String Col Box(colName,lstValues)
				)
			,
				tb &amp;lt;&amp;lt; Append(
					Number Col Box(colName,lstValues)
				)
			);
		);
		
	content = H List Box(
		Outline Box("splitchart", &amp;lt;&amp;lt; Outline Close Orientation("Vertical"),
			tb
		)
	);

	pw = New Window("splitchart", content);
	img = pw &amp;lt;&amp;lt; getpicture();
	img &amp;lt;&amp;lt; saveImage(path_to_results||"splitchart.png", "png");	
	Close(st, NoSave);
	pw &amp;lt;&amp;lt; Close Window();
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Aug 2019 18:58:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221721#M44248</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-08-14T18:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221931#M44283</link>
      <description>&lt;P&gt;Sorry, I missed the data table bit. Data tables don't act like analysis platforms when trying to take pictures of their display boxes. Here's another approach, using a journal box.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/Cereal.jmp" );
journaltext = (Window( dt )) &amp;lt;&amp;lt; getjournal;
journalbox = Journal Box( journaltext );
image = journalbox &amp;lt;&amp;lt; getpicture;
New Window( "image", image );
pdf = journalbox &amp;lt;&amp;lt; savepdf( "$temp/cereal.pdf" );
Open( "$temp/cereal.pdf" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image capture of table" style="width: 406px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18825iCED09BD0F51A9EBE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="image capture of table" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;image capture of table&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can save an image with&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;journalbox &amp;lt;&amp;lt; savepicture( "$temp/cereal.png", "png" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 19:59:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221931#M44283</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-08-15T19:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Journal as PNG (or PDF)</title>
      <link>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221940#M44284</link>
      <description>&lt;P&gt;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12549"&gt;@SDF1&lt;/a&gt;&amp;nbsp;has a great solution using a dashboard.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Save-Graph-amp-Datatable-and-output-as-png-file/m-p/221844#M44269" target="_blank" rel="noopener"&gt;https://community.jmp.com/t5/Discussions/Save-Graph-amp-Datatable-and-output-as-png-file/m-p/221844#M44269&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 20:09:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saving-Journal-as-PNG-or-PDF/m-p/221940#M44284</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-08-15T20:09:23Z</dc:date>
    </item>
  </channel>
</rss>

