- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-24-2016 05:32 PM
(6114 views)
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
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