Problem Note 9981: Output from PUT statement shifts when using inline formatting with PDF
ODS works with DATA step in two ways: FILE PRINT ODS can be used when
creating tabular output and FILE PRINT can be used when creating
free-form output.
When FILE PRINT is used to create non-listing output, ODS ESCAPECHAR=
and inline formatting commands can be used on a PUT statement to create
style changes 'on the fly'. With FILE PRINT, the entire contents of a
PUT statement create one cell in the output table.
With PDF, the output table is centered by default. Each line is
centered after being padded with blanks to the full LINESIZE, even if
only a fraction of those characters are actually printed.
Unfortunately, these blanks are added while the inline commands are
still in place. When the inline formatting is stripped off and turned
into formatting, the output is much shorter than the other lines and,
thus, gets centered differently that the other lines. As a work around,
one can specify
OPTION NOCENTER;
The sample program below illustrates the issue. Run with OPTIONS
CENTER specified to see the unexpected alignment. Run again with
OPTIONS NOCENTER to see the desired alignment.
OPTIONS center;
*OPTIONS nocenter;
ODS pdf file='temp.pdf';
ODS escapechar='^';
data _null_;
file print;
put '++++5++++0';
put 'TEST'+1 '^S={font_style=italic font_weight=bold}'
'the PDF output destination';
run;
ODS pdf close;
See also FAQ 4209 ( #24227 ). For
alignment issues when using FILE PRINT ODS see #005486 .
Operating System and Release Information
SAS System | Base SAS | Windows Millennium Edition (Me) | 8.2 TS2M0 | |
Microsoft Windows 95/98 | 8.2 TS2M0 | |
Microsoft Windows NT Workstation | 8.2 TS2M0 | |
Microsoft Windows 2000 Server | 8.2 TS2M0 | |
Microsoft Windows 2000 Professional | 8.2 TS2M0 | |
Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | |
Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | |
Solaris | 8.2 TS2M0 | |
OpenVMS VAX | 8.2 TS2M0 | |
64-bit Enabled Solaris | 8.2 TS2M0 | |
z/OS | 8.2 TS2M0 | |
IRIX | 8.2 TS2M0 | |
OS/2 | 8.2 TS2M0 | |
Linux | 8.2 TS2M0 | |
64-bit Enabled HP-UX | 8.2 TS2M0 | |
HP-UX | 8.2 TS2M0 | |
ABI+ for Intel Architecture | 8.2 TS2M0 | |
CMS | 8.2 TS2M0 | |
OpenVMS Alpha | 8.2 TS2M0 | |
64-bit Enabled AIX | 8.2 TS2M0 | |
Tru64 UNIX | 8.2 TS2M0 | |
AIX | 8.2 TS2M0 | |
Microsoft Windows XP Professional | 8.2 TS2M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2005-03-28 14:58:35 |
Date Created: | 2003-05-06 15:52:32 |