Sample 41703: How to wrap text to the right of an image in a title or footnote in an ODS PDF file
When using any of the SAS/GRAPH® justification options J=L, J=C, and J=R, SAS divides titles and footnotes into equal thirds on an ODS PRINTER (PCL/PDF/PS) page. Because this is an equal split, it is difficult to wrap text across the height of an image included with the PREIMAGE style attribute.
The Full Code tab contains sample code that uses the CELLWIDTH= style attribute and the inline style command for a new line (escapechar+n) to wrap text beside an image in either a TITLE or FOOTNOTE statement in the ODS PDF destination.
The sample code is also applicable to the PS and PCL destinations.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The sample code uses the PREIMAGE inline style attribute to include an image on the left side of a footnote. The J=C portion of the FOOTNOTE statement uses the following inline style attributes: JUST=L to left justify the subsequent text, VJUST=M to vertically justify the text to the middle, CELLWIDTH= to create a wider cell width than one third of the page, ^1n to split the text across lines, and ^2n to move the text even farther up relative to the image.
NOTE: The text will not span more than two "thirds" of the page, so this footnote text will not move any farther left.
ods escapechar="^";
options nodate nonumber;
title;
ods pdf file="&sysver.file.pdf" NOTOC ;
footnote j=l "^S={preimage='c:\ods_code\cropped.jpg'}"
j=c "^S={just=l vjust=m cellwidth=5in}'Centered' footnote with a really really really long string of ^n
text which we can control relative to the image's height.^2n";
proc report nowd data=sashelp.class;
run;
ods pdf close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to wrap text to the right of an image in a title or footnote in an ODS PDF file.
| Date Modified: | 2010-12-01 09:10:33 |
| Date Created: | 2010-11-30 09:49:18 |
Operating System and Release Information
| SAS System | Base SAS | 64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | |
| 64-bit Enabled AIX | 9.1 TS1M3 SP4 | |
| Windows Vista for x64 | 9.1 TS1M3 SP4 | |
| Windows Vista | 9.1 TS1M3 SP4 | |
| Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
| Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
| Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
| z/OS | 9.1 TS1M3 SP4 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
| 64-bit Enabled Solaris | 9.1 TS1M3 SP4 | |
| HP-UX IPF | 9.1 TS1M3 SP4 | |
| Linux | 9.1 TS1M3 SP4 | |
| Linux on Itanium | 9.1 TS1M3 SP4 | |
| OpenVMS Alpha | 9.1 TS1M3 SP4 | |
| Solaris for x64 | 9.1 TS1M3 SP4 | |
| Tru64 UNIX | 9.1 TS1M3 SP4 | |