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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 957 views
  • 0 likes
  • 2 in conversation