The SAS Output Delivery System and reporting techniques

ods rtf text

Reply
Regular Contributor
Posts: 199

ods rtf text

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.
SAS Super FREQ
Posts: 8,868

Re: ods rtf text

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
Super User
Posts: 11,343

Re: ods rtf text

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 .
Ask a Question
Discussion stats
  • 2 replies
  • 193 views
  • 0 likes
  • 3 in conversation