Sample 50136: How to control the border around the ODS TEXT= text in the ODS PDF destination
By default, the text that is generated with ODS <destination> TEXT= or the ODS TEXT= statement does not have a border surrounding it. The Full Code tab shows the sample logic needed to add a border around the text.
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 code below surrounds the ODS TEXT= text with a green border, using either PROC TEMPLATE or inline style commands. If the style in use creates a border around the ODS TEXT= text, then set the style attributes border<LOCATION>color= to white.
This logic is applicable in the RTF and HTML destinations as well.
proc template;
define style styles.mystyle ;
parent=styles.pearl;
style UserText from Note / just=c asis=on
borderleftcolor=green borderleftwidth=1pt
borderrightcolor=green borderrightwidth=1pt
borderbottomcolor=green borderbottomwidth=1pt
bordertopcolor=green bordertopwidth=1pt;
end;
run;
ods _all_ close;
options orientation=portrait nodate nonumber;
footnote;
ods escapechar='^';
title "Created with SAS &sysver";
ods pdf file='Style_template.pdf' notoc startpage=no style=styles.mystyle;
proc print data=sashelp.class(obs=1) noobs;
run;
ods text=" This is my interim title ^{newline 1} Showing a line wrap";
proc print data=sashelp.class(obs=1) noobs;
run;
ods pdf close;
ods pdf file='Inline_style_commands.pdf' notoc startpage=no ;
proc print data=sashelp.class(obs=1) noobs;
run;
ods text="^S={just=c asis=on borderleftcolor=green borderleftwidth=1pt
borderrightcolor=green borderrightwidth=1pt
borderbottomcolor=green borderbottomwidth=1pt
bordertopcolor=green bordertopwidth=1pt} This is my interim title ^{newline 1} Showing a line wrap";
proc print data=sashelp.class(obs=1) noobs;
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 control the border around the ODS TEXT= text in the ODS PDF and other destinations.
| Date Modified: | 2022-06-20 09:58:11 |
| Date Created: | 2013-06-07 11:44:47 |
Operating System and Release Information
| SAS System | Base SAS | z/OS | 9.2 TS1M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
| Microsoft® Windows® for x64 | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
| Microsoft Windows XP Professional | 9.2 TS1M0 | |
| Windows Vista | 9.2 TS1M0 | |
| Windows Vista for x64 | 9.2 TS1M0 | |
| 64-bit Enabled AIX | 9.2 TS1M0 | |
| 64-bit Enabled HP-UX | 9.2 TS1M0 | |
| 64-bit Enabled Solaris | 9.2 TS1M0 | |
| HP-UX IPF | 9.2 TS1M0 | |
| Linux | 9.2 TS1M0 | |
| Linux for x64 | 9.2 TS1M0 | |
| OpenVMS on HP Integrity | 9.2 TS1M0 | |
| Solaris for x64 | 9.2 TS1M0 | |