The SAS Output Delivery System and reporting techniques

ODS PDF Insert Image

Reply
New Contributor
Posts: 3

ODS PDF Insert Image

Hi,

 

I am trying to insert an image into a PDF document I am creating thru SAS but I am running thru a host of problems. I saw some codes on here which I tried but it didn't work.

 

One of the errors I am getting is this:

Unrecognized SAS option name ESCAPECHAR

 

Also the image doesn't load into my pdf document.

 

Please can anyone help with a simple piece of code that works.

 

Thanks,

 

Efe

 

 

 

 

Super User
Posts: 11,343

Re: ODS PDF Insert Image

Please provide the code you are attempting. Best would be the code from the log with the error message.

 

Also, which version of SAS are you running?

SAS Super FREQ
Posts: 8,868

Re: ODS PDF Insert Image

Hi:
ESCAPECHAR is NOT a system option. It is a separate statement:
ODS ESCAPECHAR='^';
to declare your ESCAPECHAR to use for inline formatting.

Also, the image will not even be attempted by ODS until the ESCAPECHAR syntax is correct. So posting your code will be useful.

This documentation example shows you the correct syntax for everything except PREIMAGE:
http://support.sas.com/documentation/cdl/en/odsug/67921/HTML/default/viewer.htm#p11xia2ltavr8ln17srq...

My suggestion is that, if you don't want to post your code, you should try to get this documentation example working and then once it works, look at using PREIMAGE to get your image into the PDF document following this example:
http://support.sas.com/kb/24/229.html

My only additional comment to the above Tech Support note is that ODS PDF has to be able to FIND the image at the point in time when the PDF file is being created, so if a relative name for the file location does not work, try an absolute path.

title j=l '^S={preimage="saslogo.jpg"}';
OR
title j=l '^S={preimage="c:\images\saslogo.jpg"}';

cynthia

Ask a Question
Discussion stats
  • 2 replies
  • 1096 views
  • 0 likes
  • 3 in conversation