<?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: PROC ODSTEXT Add Image to Paragraph (P) - am getting default image message in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760242#M25215</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; That white question mark inside the PDF file where you expect an image is like the red X you get in HTML when an image is not found. It's a placeholder for an image, but the image could not be found/accessed when the PDF file was created. Images you point to within the ODS PDF sandwich are actually embedded in the PDF file at the time the PDF file is created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's my test, using a slightly modified version of your code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1628433711038.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62378i3BE686B53857ABAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1628433711038.png" alt="Cynthia_sas_1-1628433711038.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You'll notice that I wrote my PDF file in the SAME location where the image file was located. However a second test using different locations, also worked, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1628433757436.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62379iF82E7B1B4919B846/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1628433757436.png" alt="Cynthia_sas_2-1628433757436.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would recommend putting the images and the output into the same folder to start to make sure that everything is working (as my first example shows). I find that Windows can be "touchy" about C:\Users, which is why I don't ever try to send output there. I suspect some kind of name issue or access issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tell your friend that "how long" depends on each person. If they've made an effort to search for an answer and they've tried debugging on their own and nothing is working, then post a question on the forum. Sometimes, they find that just organizing the question (posting code, explaining the problem) will clarify their thinking and possibly lead to a solution. But if not, then your friend has a question ready to go. My rule of thumb is to ask before I get so frustrated I start yelling at the screen.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;PS I'm not sure what you mean when you indicate that the images don't show in Results Viewer. They may or may not show in the default HTML results because ODS was creating PDF output. Whether or not the images show in the HTML Results Viewer will depend on whether the image is accessible when the HTML file is opened. You should be able to open the PDF file with Adobe Reader (as I show in my screen shots) and see the image if the file names, locations, access privileges are OK.&lt;/P&gt;</description>
    <pubDate>Sun, 08 Aug 2021 14:55:38 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2021-08-08T14:55:38Z</dc:date>
    <item>
      <title>PROC ODSTEXT Add Image to Paragraph (P) - am getting default image message</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760205#M25213</link>
      <description>&lt;P&gt;Objective: To create a legend on a separate page which has the appropriate &lt;STRONG&gt;markers&lt;/STRONG&gt; and &lt;STRONG&gt;images &lt;/STRONG&gt;for my plot.&lt;/P&gt;
&lt;P&gt;I had no issues with the markers.&lt;/P&gt;
&lt;P&gt;The images on the other hand, well, need your assistance please.&lt;/P&gt;
&lt;P&gt;I have two png images that I'd like side by side (very small) with text next to them, like this:&lt;/P&gt;
&lt;P&gt;IMAGE1.png&amp;nbsp; Image1 description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMAGE2.png&amp;nbsp; Image2 description&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Separate question: How long is &lt;EM&gt;too long&lt;/EM&gt; to research something before coming to the forum? Asking for a friend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code with pdf output snapshot below. SAS 9.4M7&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='C:\Users\MelissaMenier\Pictures\stuff.pdf';
title 
"^{style[Just=L PREimage='C:\Users\Public\Pictures\DM00T_NoDM.png']  }" 
"^{style[font_size=50pt color=red]^{unicode '261a'}^{unicode '0020'}}"
"^{style[Just=C background=WH color=BL font_size=24pt ]That is a standard image. Not the image I would like. } ";
 
proc odstext;
	P "^{style [preimage=""C:\Users\Public\Pictures\DM00T_NoDM.png""]Image does not print in Results Viewer; PDF opens with white question mark in green circle'}";
	p "I'd prefer the image in a PARAGRAPH (P) line, but will settle for a TITLE or FOOTNOTE statement if that's a limitation.";
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="PDF Output Snapshot.jpg" style="width: 806px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62374i41F4899C131BB40F/image-size/large?v=v2&amp;amp;px=999" role="button" title="PDF Output Snapshot.jpg" alt="PDF Output Snapshot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 01:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760205#M25213</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2021-08-08T01:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT Add Image to Paragraph (P) - am getting default image message</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760242#M25215</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; That white question mark inside the PDF file where you expect an image is like the red X you get in HTML when an image is not found. It's a placeholder for an image, but the image could not be found/accessed when the PDF file was created. Images you point to within the ODS PDF sandwich are actually embedded in the PDF file at the time the PDF file is created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's my test, using a slightly modified version of your code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1628433711038.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62378i3BE686B53857ABAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1628433711038.png" alt="Cynthia_sas_1-1628433711038.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You'll notice that I wrote my PDF file in the SAME location where the image file was located. However a second test using different locations, also worked, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1628433757436.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62379iF82E7B1B4919B846/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1628433757436.png" alt="Cynthia_sas_2-1628433757436.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would recommend putting the images and the output into the same folder to start to make sure that everything is working (as my first example shows). I find that Windows can be "touchy" about C:\Users, which is why I don't ever try to send output there. I suspect some kind of name issue or access issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tell your friend that "how long" depends on each person. If they've made an effort to search for an answer and they've tried debugging on their own and nothing is working, then post a question on the forum. Sometimes, they find that just organizing the question (posting code, explaining the problem) will clarify their thinking and possibly lead to a solution. But if not, then your friend has a question ready to go. My rule of thumb is to ask before I get so frustrated I start yelling at the screen.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;PS I'm not sure what you mean when you indicate that the images don't show in Results Viewer. They may or may not show in the default HTML results because ODS was creating PDF output. Whether or not the images show in the HTML Results Viewer will depend on whether the image is accessible when the HTML file is opened. You should be able to open the PDF file with Adobe Reader (as I show in my screen shots) and see the image if the file names, locations, access privileges are OK.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 14:55:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760242#M25215</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-08-08T14:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT Add Image to Paragraph (P) - am getting default image message</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760243#M25216</link>
      <description>&lt;P&gt;Have tried placing ALL the Style information after the / ub a P statement in proc odstext? Such as:&lt;/P&gt;
&lt;P&gt;I don't have your image file or any other at hand that seem like a good test so this is untested.&lt;/P&gt;
&lt;PRE&gt; 
proc odstext;
	P "Image does not print in Results Viewer; PDF opens with white question mark in green circle"
     /style= [preimage="C:\Users\Public\Pictures\DM00T_NoDM.png"];
	p "I'd prefer the image in a PARAGRAPH (P) line, but will settle for a TITLE or FOOTNOTE statement if that's a limitation.";
run;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;The generic syntax for the P statement has style information after the expression it is applied to.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV class="xis-procStatement"&gt;
&lt;DIV class="xis-procStatementSyntax"&gt;
&lt;DIV class="xis-syntaxSimple"&gt;
&lt;DIV class="xis-syntaxLevel"&gt;P &lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A title="Description of syntax: expression" href="http://127.0.0.1:63705/help/odsproc.hlp/n0e7qz6zmq3ocan1bjoi267fixeva.htm#n0cuk1ymbzqeqln1drmg78c0bpyga" target="_blank"&gt;expression&lt;/A&gt;&lt;/SPAN&gt; / &lt;SPAN class="xis-argOptional"&gt;&amp;lt;&lt;SPAN class="xis-keyword"&gt;&lt;A title="Description of syntax: FORMAT=format-name" href="http://127.0.0.1:63705/help/odsproc.hlp/n0e7qz6zmq3ocan1bjoi267fixeva.htm#n0ja9kfi8iogqnn1bzc3uloqqvtoa" target="_blank"&gt;FORMAT&lt;/A&gt;&lt;/SPAN&gt;=&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;format-name&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="xis-argOptional"&gt;&amp;lt;&lt;SPAN class="xis-keyword"&gt;&lt;A title="Description of syntax: STYLE=&amp;lt;style-element-name &amp;gt;[style-attribute-name=style-attribute-value&amp;lt;… style-attribute-name=style-attribute-value&amp;gt;]" href="http://127.0.0.1:63705/help/odsproc.hlp/n0e7qz6zmq3ocan1bjoi267fixeva.htm#n1h705aeszpv3an1d0ms7vmivjh2a" target="_blank"&gt;STYLE&lt;/A&gt;&lt;/SPAN&gt;=&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;style-override&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; ;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 14:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760243#M25216</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-08T14:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT Add Image to Paragraph (P) - am getting default image message</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760311#M25217</link>
      <description>Thank you so much! &lt;BR /&gt;For everything!&lt;BR /&gt;I actually was on the right path, so that's good.&lt;BR /&gt;It turns out, something is wrong with my image. Perhaps it's not big enough? I used another image from the same location &amp;amp; it worked like a charm! &lt;BR /&gt;However, I can work with the image issue (re-scaling, etc).</description>
      <pubDate>Mon, 09 Aug 2021 05:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-Add-Image-to-Paragraph-P-am-getting-default-image/m-p/760311#M25217</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2021-08-09T05:38:46Z</dc:date>
    </item>
  </channel>
</rss>

