<?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: Scaling a window to be saved as a PDF? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42279#M24626</link>
    <description>&lt;P&gt;M,&lt;/P&gt;
&lt;P&gt;How complex/big is the report you're trying to compress? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe there is something special about v9, I used to do something like this in v7 and it worked fine.&lt;/P&gt;
&lt;P&gt;In this example when I put the report pieces together I added a Page Break Box(). When the PDF is created the it generates a page brake, so instead of ending up with poorly clipped report objects, the breaks happen where I want them.&lt;/P&gt;
&lt;P&gt;-B&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj = New Window( "KPI Report " || Long Date( Today() ),
	V List Box( "vlb1", Panel Box( "Figure 1", graph1 ), &lt;STRONG&gt;Page Break Box()&lt;/STRONG&gt;, Panel Box( "Figure 2", graph2 ) ));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/9081"&gt;@michaelgroom&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hey JMP Community&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to JSL, and have been working on a script for the past week or so. The final portion of the script is supposed to take a graph and save it as a PDF. The issue I am having is that I cannot seem to find a way to scale this PDF down to one page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can do this manually by clicking "Save As" in the graph window, choosing the PDF file format, and setting the scale to 80%.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently, my code looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;KlingonImage &amp;lt;&amp;lt; Set Page Setup(
	margins(0.5,0.5,0.5,0.5),
	scale(0.8)
);

KlingonImage &amp;lt;&amp;lt; Get Page Setup();

//Save as PDF

KlingonImage &amp;lt;&amp;lt; Savepdf(filepath);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where "KlingonImage" is the name of the window created to display the graph. No matter what I make the scale value, there does not seem to be any change in the resulting PDF file. Is this something that JMP can do? It should be noted that I am using JMP 9.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Michael&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;BR /&gt; obj &amp;lt;&amp;lt; Set page setup( margins( 1, 1, 1, 1 ), scale( .5 ), portrait( 1 ), paper size( "Letter" ) ); path = Get Default Directory(); //t=Format Date( Today(), "ddmonyyyy" ); obj &amp;lt;&amp;lt; save pdf( path || "testPDF.pdf" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2017 20:25:59 GMT</pubDate>
    <dc:creator>Byron_JMP</dc:creator>
    <dc:date>2017-07-20T20:25:59Z</dc:date>
    <item>
      <title>Scaling a window to be saved as a PDF?</title>
      <link>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42210#M24596</link>
      <description>&lt;P&gt;Hey JMP Community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to JSL, and have been working on a script for the past week or so. The final portion of the script is supposed to take a graph and save it as a PDF. The issue I am having is that I cannot seem to find a way to scale this PDF down to one page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do this manually by clicking "Save As" in the graph window, choosing the PDF file format, and setting the scale to 80%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, my code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;KlingonImage &amp;lt;&amp;lt; Set Page Setup(
	margins(0.5,0.5,0.5,0.5),
	scale(0.8)
);

KlingonImage &amp;lt;&amp;lt; Get Page Setup();

//Save as PDF

KlingonImage &amp;lt;&amp;lt; Savepdf(filepath);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Where "KlingonImage" is the name of the window created to display the graph. No matter what I make the scale value, there does not seem to be any change in the resulting PDF file. Is this something that JMP can do? It should be noted that I am using JMP 9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:24:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42210#M24596</guid>
      <dc:creator>michaelgroom</dc:creator>
      <dc:date>2023-06-09T23:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling a window to be saved as a PDF?</title>
      <link>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42279#M24626</link>
      <description>&lt;P&gt;M,&lt;/P&gt;
&lt;P&gt;How complex/big is the report you're trying to compress? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe there is something special about v9, I used to do something like this in v7 and it worked fine.&lt;/P&gt;
&lt;P&gt;In this example when I put the report pieces together I added a Page Break Box(). When the PDF is created the it generates a page brake, so instead of ending up with poorly clipped report objects, the breaks happen where I want them.&lt;/P&gt;
&lt;P&gt;-B&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj = New Window( "KPI Report " || Long Date( Today() ),
	V List Box( "vlb1", Panel Box( "Figure 1", graph1 ), &lt;STRONG&gt;Page Break Box()&lt;/STRONG&gt;, Panel Box( "Figure 2", graph2 ) ));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/9081"&gt;@michaelgroom&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hey JMP Community&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to JSL, and have been working on a script for the past week or so. The final portion of the script is supposed to take a graph and save it as a PDF. The issue I am having is that I cannot seem to find a way to scale this PDF down to one page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can do this manually by clicking "Save As" in the graph window, choosing the PDF file format, and setting the scale to 80%.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently, my code looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;KlingonImage &amp;lt;&amp;lt; Set Page Setup(
	margins(0.5,0.5,0.5,0.5),
	scale(0.8)
);

KlingonImage &amp;lt;&amp;lt; Get Page Setup();

//Save as PDF

KlingonImage &amp;lt;&amp;lt; Savepdf(filepath);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where "KlingonImage" is the name of the window created to display the graph. No matter what I make the scale value, there does not seem to be any change in the resulting PDF file. Is this something that JMP can do? It should be noted that I am using JMP 9.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Michael&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;BR /&gt; obj &amp;lt;&amp;lt; Set page setup( margins( 1, 1, 1, 1 ), scale( .5 ), portrait( 1 ), paper size( "Letter" ) ); path = Get Default Directory(); //t=Format Date( Today(), "ddmonyyyy" ); obj &amp;lt;&amp;lt; save pdf( path || "testPDF.pdf" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 20:25:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42279#M24626</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2017-07-20T20:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling a window to be saved as a PDF?</title>
      <link>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42418#M24661</link>
      <description>&lt;P&gt;&amp;nbsp;Hey &amp;nbsp;Byron&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the late response. I don't believe this fixes the issue that I am having. I want everything to fit on only one page. The only thing that I want to fit on the page is this element:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;KlingonImage=New Window("Klingon Pattern",
	gb=Graph Box(
	
		Frame Size(810,810),
		xaxis(show major ticks(false),show minor ticks(false),show labels(false)),
		yaxis(show major ticks(false),show minor ticks(false),show labels(false)),
		X Scale(0,100),
		Y Scale(0,100),
		
		&amp;lt;&amp;lt; Add Image(
			Open(filepath||fid1),
			Bounds(
				Left(20),
				Right(80),
				Top(100),
				Bottom(0)
			)
		),
		Text Size(11);
		Text Color("black"),
		Text(Center Justified,Boxed,{50,3.9},NFrame), //North Frame
		
		Text(Center Justified,Boxed,{40,96},SETFrame), //Southeast Top Frame
		
		Text(Center Justified,Boxed,{60,96},SWTFrame), //Southwest Top Frame
		
		Text(Center Justified,Boxed,{50,9},NWindow), //North Window
		
		Text(Center Justified,Boxed,{50,81.5},SWindow), //South Window
		
		Text(Center Justified,Clockwise,Boxed,{36.5,80},SEWindowOut), //Outer Southeast Window
		
		Text(Center Justified,Clockwise,Boxed,{62.5,80},SWWindowOut), //Outer Southwest Window
		
		Text(Center Justified,Clockwise,Boxed,{62.5,12},NWWindowOut), //Outer Northwest Window
		
		Text(Center Justified,Clockwise,Boxed,{36.5,12},NEWindowOut), //Outer Northeast Window
			
		Text(Center Justified,Clockwise,Boxed,{74.3,27},NWFrame), //Northwest Frame	
		
		Text(Center Justified,Clockwise,Boxed,{25,27},NEFrame), //Northeast Frame
		
		Text(Center Justified,Clockwise,Boxed,{74.3,72},SWFrame), //Southwest Frame
		
		Text(Center Justified,Clockwise,Boxed,{25,72},SEFrame), //Southeast Frame
		
		Text(Center Justified,Clockwise,Boxed,{42,30},NEWindowIn), //Inner Northeast Window
		
		Text(Center Justified,Clockwise,Boxed,{42,63},SEWindowIn), //Inner Southeast Window
		
		Text(Center Justified,Clockwise,Boxed,{57.7,30},NWWindowIn), //Inner Northwest Window
		
		Text(Center Justified,Clockwise,Boxed,{57.6,63},SWWindowIn), //Inner Southwest Window
		
		Text(Center Justified,Boxed,{34,45.5},NEGap), //Northeast Gap
		
		Text(Center Justified,Boxed,{34.4,51},SEGap), //Southeast Gap
		
		Text(Center Justified,Boxed,{67,45.5},NWGap), //Northwest Gap
		
		Text(Center Justified,Boxed,{67,51},SWGap), //Southwest Gap
		
		Text Color("Blue"),
		
		Text({74,5},Operator), //Operator
		
		Text({74,1},TestDate); //Date
		
		Text({74,3},NumberSamp); //Number of Samples used in generation
		
	),
	Page Break Box()
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Which is essentially an image with text boxes superimposed over it. The issue I am having is that I cannot seem to affect the scale of the PDF file. Is the type of window I am trying to scale a data type I cannot manipulate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2017 23:01:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/42418#M24661</guid>
      <dc:creator>michaelgroom</dc:creator>
      <dc:date>2017-07-22T23:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling a window to be saved as a PDF?</title>
      <link>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/43237#M25030</link>
      <description>&lt;P&gt;what happens when you add this to the end of your script?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt; gb &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; Set page setup&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; margins&lt;SPAN class="token punctuation"&gt;( 0.5, 0.5, 0.5, 0.5 &lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; scale&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;.1&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; portrait&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; 0 &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; paper size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"Letter"&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;&lt;SPAN class="token comment"&gt;gb &amp;lt;&amp;lt; save pdf( "testPDF.pdf" );&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I suspect you'll get a pdf (in the directory where the script is saved) that looks like A baseball card on the top left of the page.&lt;/P&gt;
&lt;P&gt;note, for the "portrait" argument, 1 is portrait and 0 is landscape.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 03:55:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/43237#M25030</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2017-08-15T03:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling a window to be saved as a PDF?</title>
      <link>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/43317#M25075</link>
      <description>&lt;P&gt;Unfortunately, adding the suggested lines does not change the scale. I am wondering if this is a limitation of JMP 9?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 16:25:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaling-a-window-to-be-saved-as-a-PDF/m-p/43317#M25075</guid>
      <dc:creator>michaelgroom</dc:creator>
      <dc:date>2017-08-16T16:25:00Z</dc:date>
    </item>
  </channel>
</rss>

