BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
How do I increase the size of text when using ods rtf text?
Also, is it possible to move rtf text vertically on a page?
So far I have been able to do this, but font_size did not work.
ods escapechar="^";
ods rtf text="^S={outputwidth=100% just=c font_weight=bold}Test";
Thank you.
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
I only see font_weight in your syntax, not font_size. This works for me:

[pre]
ods path work.temp(update) sashelp.tmplmst(read);

proc template;
define style styles.utext;
parent=styles.rtf;
style usertext from usertext /
just=center
font_size=20pt
font_weight=bold
foreground=purple;
end;
run;

ods rtf file='c:\temp\usetext2.rtf' style=styles.utext;

proc print data=sashelp.class(obs=3);
run;

ods rtf text='Test';
ods rtf close;
[/pre]

I find it more reliable to ensure alignment with a style template change to the UserText element. As long as I am using a style template, I just move all the other changes for UserText into the template instead of using ODS ESCAPECHAR.

cynthia
ballardw
Super User
Depending on what you mean by move vertically one option that may help is to use the TOPMARGIN= element in the style section. This will move the first line of text down from the top of the page the amount specified. Example: TOPMARGIN=2in starts 2 inches from the top of the page.

If you need blank spaces between sections of text the function is NEWLINE

^{newline 3} inserts 3 blank lines BEFORE then next printable character .
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1583 views
  • 0 likes
  • 3 in conversation