<?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: Remove space around a PDF image in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719259#M21045</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file="C:\Users\Downloads\test.RTF" style=styles.journal;
proc sgplot data=sashelp.class;
    scatter x=age y=weight;
run;
ods rtf close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Feb 2021 03:19:18 GMT</pubDate>
    <dc:creator>blueskyxyz</dc:creator>
    <dc:date>2021-02-15T03:19:18Z</dc:date>
    <item>
      <title>Remove space around a PDF image</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/710935#M20884</link>
      <description>&lt;P&gt;When I create a PDF image in SAS, a blank margin area is created around the image that I don't want. Here's an example where I plot the same image twice, first as a PNG, and then as a PDF. Note that the PDF has extra white space outside of the border while the PNG does not. How do I get rid of that extra white space in the PDF?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html close;
ods listing;

ods graphics / reset=all outputfmt=png imagename="Test image";
proc sgplot data=sashelp.class;
    scatter x=age y=weight;
run;

ods graphics / reset=all outputfmt=pdf imagename="Test image";
proc sgplot data=sashelp.class;
    scatter x=age y=weight;
run;

ods listing close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="PNG vs PDF.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53476i779ECF8F2277F46D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PNG vs PDF.jpg" alt="PNG vs PDF.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that I just want a stand-alone image file in PDF format, just like the PNG created above. I don’t need the margins because I’ll be embedding the image file within a manuscript.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 19:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/710935#M20884</guid>
      <dc:creator>dagremu</dc:creator>
      <dc:date>2021-01-13T19:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Remove space around a PDF image</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719182#M21041</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / reset=all outputfmt=pdf noborder/*&amp;lt;&amp;lt;&amp;lt;added option*/ imagename="Test image";
proc sgplot data=sashelp.class;
    scatter x=age y=weight;
run;

ods listing close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;please try to add&amp;nbsp;&lt;CODE class=" language-sas"&gt;noborder option&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 07:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719182#M21041</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2021-02-14T07:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Remove space around a PDF image</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719227#M21044</link>
      <description>I would try setting the PAPERSIZE option I think that's the one)  to about match your image to see if that helps. Something like OPTIONS PAPERSIZE=(5in,6in); before the ODS PDF statement.&lt;BR /&gt;PDF isn't really designed for what you're asking though, it'd be like trying to do the same in ods rtf. It's document and not an image. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.1&amp;amp;docsetId=uprint&amp;amp;docsetTarget=n1ieb4hg6fijzon1slcsyiqu7972.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.1&amp;amp;docsetId=uprint&amp;amp;docsetTarget=n1ieb4hg6fijzon1slcsyiqu7972.htm&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Sun, 14 Feb 2021 17:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719227#M21044</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2021-02-14T17:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove space around a PDF image</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719259#M21045</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file="C:\Users\Downloads\test.RTF" style=styles.journal;
proc sgplot data=sashelp.class;
    scatter x=age y=weight;
run;
ods rtf close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 03:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/719259#M21045</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2021-02-15T03:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Remove space around a PDF image</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/720144#M21066</link>
      <description>&lt;P&gt;save as rtf instead of pdf, then you can paste the figure in other files.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 10:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/720144#M21066</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2021-02-18T10:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove space around a PDF image</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/720222#M21069</link>
      <description>&lt;P&gt;Here are the ODS graphics options I use most often. The height and width options may address your issue. I find that imagefmt=PDF results in better looking plots, but the resulting file size can be much larger than imagefmt=PNG, depending on the number of data points.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS GRAPHICS ON/reset&lt;BR /&gt;border = off&lt;BR /&gt;antialiasmax=1000000&lt;BR /&gt;height = 100pct&lt;BR /&gt;width = 100pct&lt;BR /&gt;imagefmt=PDF;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 15:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-space-around-a-PDF-image/m-p/720222#M21069</guid>
      <dc:creator>Bill_in_Toronto</dc:creator>
      <dc:date>2021-02-18T15:41:34Z</dc:date>
    </item>
  </channel>
</rss>

