BookmarkSubscribeRSS Feed
PaulDeng
Calcite | Level 5

Hello all,

 

I have been using ODS text="xxxxx" statement to insert texts to PDF files along with graphs and tables. But I found that when I use the following syntax (Just for example), the two lines of texts show in the PDF output as:

 

    The activities of daily    scales
    The number of scales

 

  

Syntax :

 

ODS listing close;
ods pdf file='D:\inline6.pdf';
ODS text='^{style [fontsize=11pt] ^{style[fontsize=11pt fontweight=bold] The activities of daily}scales}';
ODS text='^{style [fontsize=11pt] ^{style[fontsize=11pt fontweight=bold] The number of}scales}';
ods escapechar='^';
title " ";
proc report data=sashelp.shoes nowd
style(column) = {vjust=b};
where product in ('Boot', 'Slipper', "Women's Dress");
column Product Sales N;
define Product / group
style(header)={background=white foreground=black};
define Sales / sum;
define N / '^S={background=white foreground=black}Number of Sales';
run;
ODS pdf close;
ODS listing;

 

Could anyone please tell me why there are some spaces between "The activities of daily" and "scales" in the first line, while there are not in the second line?  This makes me super confused. Thank you in advance!  

 

By the way, I am using SAS 9.4.

1 REPLY 1
ballardw
Super User

The number of spaces is the same, at least when I copy the text from your output and paste into another application. The font rendering for some reason is displaying more space in one line than the other.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 975 views
  • 0 likes
  • 2 in conversation