Problem Note 56784: Inline style overrides might affect spacing in the ODS PDF destination
Inline style overrides and inline style commands might display extra spaces or compressed spacing in the ODS PDF destination. The problem is most likely to occur when you use a sans-serif font.
To circumvent the problem, add the DPI=600 option to the existing ODS PDF statement in the code. Here is an example:
ods pdf file="filename.pdf" dpi=600;
Another way to circumvent the problem is to use a serif font such as Times New Roman. When you use a serif font, it is imperative that you include a space after the inline style specification.
The sample code on the Full Code tab illustrates the problem and the circumvention using a serif font. Click the Output tab to see the results.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | 9.4 TS1M7 |
z/OS 64-bit | 9.3 TS1M0 | 9.4 TS1M7 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.4 TS1M7 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.4 TS1M7 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.4 TS1M7 |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | 9.4 TS1M7 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.4 TS1M7 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.4 TS1M7 |
HP-UX IPF | 9.3 TS1M0 | 9.4 TS1M7 |
Linux | 9.3 TS1M0 | 9.4 TS1M7 |
Linux for x64 | 9.3 TS1M0 | 9.4 TS1M7 |
Solaris for x64 | 9.3 TS1M0 | 9.4 TS1M7 |
*
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.
The test code below creates four titles in the PDF file, FILE.PDF. The first two titles contain extra space because a sans-serif font is being used. The circumvention is to use a serif font, such as Times. When you use a serif font, it is imperative that you include a space after the inline style specification.
ods _all_ close;
ods pdf file="file.pdf" notoc;
ods escapechar="^";
/* Albany AMT is in effect by default in SAS 9.4 via the Pearl style */
title "Testing^{style [fontstyle=italic] text}and more text";
title2 "Testing^{super 2}";
/* Circumvention */
title3 "^{style [font_face=times]Testing ^{style [fontstyle=italic] text} and more text}";
title4 f=times "Testing^{super 2}";
proc print data=sashelp.cars(obs=1) noobs;
run;
ods pdf close;
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2023-01-12 12:37:36 |
Date Created: | 2015-10-13 16:21:12 |