<?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: Creating a PDF file using jpeg images in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937529#M368377</link>
    <description>&lt;P&gt;Not so tongue-in-cheek comment: if the text of your file paths is so sensitive you can't share them you may have other issues related to security to address.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't answer the question about the paths and can they be seen from where SAS executes with at least READ privileges. If your SAS runs on a server then the SERVER session needs to have access to the path. I see that part of your path starts with \\ so possibly a server name.&lt;/P&gt;
&lt;P&gt;Suggestion: Move a copy of one of those files to some location you know your SAS session can use such as your work library and test the code pointing to that one. One file. no reason to make this complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if by any chance there are macro variables in that path they won't resolve because of the single quotes around your file path/name.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 20:24:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-07-29T20:24:04Z</dc:date>
    <item>
      <title>Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937516#M368373</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a PDF file using Jpeg images from a folder but it doesn't seem to like the images 1 to 13 can be attached. Below is a sample of my code.&lt;/P&gt;
&lt;P&gt;Any suggestions is appreciated!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options orientation=landscape
        papersize=A4
        topmargin=.5in
        bottommargin=.5in
        leftmargin=.5in
        rightmargin=.5in;
		ods noproctitle;
ods escapechar="^";

title1 j=left "#S={preimage='&amp;amp;logo'}";
footnote1 "Report generated on &amp;amp;SYSDATE9. and reflects data available at the time of data extraction.";

ods pdf file="&amp;amp;pdf_output_A";
ods graphics on;
ods escapechar="#";


	ods text="#S={backgroundimage='Data\Reports\Report_Images\Image1.jpeg'}";
	ods text="#S={backgroundimage='\Data\Reports\Report_Images\Image2.jpeg'}";
	ods text="#S={backgroundimage='\Data\Reports\Report_Images\Image3.jpeg'}";
	ods text="#S={backgroundimage='\Data\Reports\Report_Images\Image4.jpeg'}";
	ods text="#S={backgroundimage='\Data\Reports\Report_Images\Image5.jpeg'}";
	ods text="#S={backgroundimage='\Data\Reports\Report_Images\Image6.jpeg'}";
	ods text="#S={backgroundimage='\Data\Reports\Report_Images\Image7.jpeg'}";

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jul 2024 19:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937516#M368373</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2024-07-29T19:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937517#M368374</link>
      <description>&lt;P&gt;What symptom(s) do you get that tell you PDF doesn't like the image files?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the path to your image files include the drive or the mount point for the disk they are on? If not the path is likely to be treated as relative to where SAS executes and may not be finding them.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 19:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937517#M368374</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-29T19:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937522#M368375</link>
      <description>&lt;P&gt;Hi ballardw!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies for being unclear. For clarification, the sample code that I provided generates the PDF file but without&amp;nbsp; images1, image2, image3 etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the SAS log that I generated but with only image 1 and 2. (I had the same output results when I tried to run the SAS script with Image 1 to 13 but wanted something trimmed down for this post)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scooby3g_0-1722282073907.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98800i025317A5B04BAC81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Scooby3g_0-1722282073907.png" alt="Scooby3g_0-1722282073907.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 19:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937522#M368375</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2024-07-29T19:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937529#M368377</link>
      <description>&lt;P&gt;Not so tongue-in-cheek comment: if the text of your file paths is so sensitive you can't share them you may have other issues related to security to address.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't answer the question about the paths and can they be seen from where SAS executes with at least READ privileges. If your SAS runs on a server then the SERVER session needs to have access to the path. I see that part of your path starts with \\ so possibly a server name.&lt;/P&gt;
&lt;P&gt;Suggestion: Move a copy of one of those files to some location you know your SAS session can use such as your work library and test the code pointing to that one. One file. no reason to make this complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if by any chance there are macro variables in that path they won't resolve because of the single quotes around your file path/name.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 20:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937529#M368377</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-29T20:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937542#M368380</link>
      <description>&lt;P&gt;From the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsadvug/p1pt77toue3iyun0z4l9gth5as9f.htm" target="_self"&gt;documentation&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT size="3"&gt;&lt;CODE class=" language-sas"&gt; BACKGROUNDIMAGE="string"       specifies an image in a table, table cell, or graph to use as the background.&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;so this option does not set a page background.&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;To do that, use proc template as shown &lt;A href="https://support.sas.com/resources/papers/proceedings13/212-2013.pdf" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Jul 2024 23:46:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937542#M368380</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-07-29T23:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937543#M368381</link>
      <description>&lt;P class="xisDoc-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;What you can also do is create empty graphs that have a background.&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file="~/pdf_output_A.pdf";
goptions border iback='~/IMG.png' imagestyle=fit ;
proc gslide; 
run;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jul 2024 23:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937543#M368381</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-07-29T23:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file using jpeg images</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937549#M368385</link>
      <description>&lt;P&gt;Is it what you are looking for ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path= c:\temp ;

options nodate nonumber;
ods listing gpath="&amp;amp;path." style=htmlblue image_dpi=300;
ods graphics /width=3in height=3in reset=index noborder imagename='FAS' outputfmt=png ;
proc sgplot data=sashelp.class noautolegend ;
reg x=height y=weight/cli clm;
run;

ods graphics /width=3in height=3in reset=index noborder imagename='PPS' outputfmt=png;
proc sgplot data=sashelp.class;
scatter x=age y=weight;
run;

ods graphics /width=3in height=3in reset=index noborder imagename='SS' outputfmt=png ;
proc sgplot data=sashelp.class ;
ellipse x=height y=weight/group=sex;
scatter x=height y=weight/group=sex;
run;

ods graphics /width=3in height=3in reset=index noborder imagename='S' outputfmt=png;
proc sgplot data=sashelp.class;
scatter x=age y=weight/group=sex datalabel=name;
run;

ods pdf file="&amp;amp;path.\want.pdf" style=minimal dpi=300 ;
data x;
x=' ';y=' ';output;
x=' ';y=' ';output;
run;
title;
proc report data=x nowd noheader style={outputwidth=100% };
column x y;
define x/display;
define y/display;
compute y;
n+1;
if n=1 then do;
call define('x','style','style={ preimage="&amp;amp;path\FAS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
call define('y','style','style={ preimage="&amp;amp;path\PPS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
end;
if n=2 then do;
call define('x','style','style={ preimage="&amp;amp;path\SS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
call define('y','style','style={ preimage="&amp;amp;path\S1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
end;
endcomp;
run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1722306002203.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98806i9E8F585792D1D21C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1722306002203.png" alt="Ksharp_0-1722306002203.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 02:20:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-using-jpeg-images/m-p/937549#M368385</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-07-30T02:20:11Z</dc:date>
    </item>
  </channel>
</rss>

