Determining ods pdf text size

Accepted Solution Solved
Reply
Contributor
Posts: 47
Accepted Solution

Determining ods pdf text size

Hello

I am having trouble using the ods text function.

I wish to write some text, which is no problem, but I have some trouble when I try to choose a specific text size. I can't seem to get it to work and was hoping that someone could help or explain what is wrong.

Here is my code:

OPTIONS ORIENTATION=LANDSCAPE NODATE ;

ODS OUTPUT CLOSE;         

ODS LISTING CLOSE;

ODS RTF File = "C:AAA " /*STYLE=fancyPrinter*/;

PROC REPORT DATA = Have HEADLINE NOWINDOWS SPLIT='*'

%ReportStyles_2;

WHERE mv > 0.5  AND Performance_AATD NE 0 AND ParentNodeName ='B';

COLUMNS ParentNodeName ;

DEFINE ParentNodeName / 'Type' GROUP STYLE(column) = [cellwidth=40pt font_face=Verdana font_size=1.75] ORDER=DATA;

ods pdf text = "^S=[font_weight=bold font_size=14pt]A. ^mOperatoin Definition: ^S=[font_size=14pt] Hello";

RUN;

TITLE;

ODS RTF CLOSE;


Accepted Solutions
Solution
‎05-01-2014 10:05 AM
Super User
Super User
Posts: 7,942

Re: Determining ods pdf text size

Yes, it should apply to the file as opened.  Hang on, just noticed something in your code.  You are opening an rtf with your ods statement and then using ods pdf text.  As far as I am aware you can't mix it like that.  Maybe try:

ods rtf file="MyFile.rtf" style=custom;

ods text="Some text to output";

print something.

ods rtf close;

View solution in original post


All Replies
Super User
Super User
Posts: 7,942

Re: Determining ods pdf text size

I think you need to modify your template to get that, style usertext I believe.  Have a look at this article:

SAS(R) 9.2 Output Delivery System: User's Guide

Contributor
Posts: 47

Re: Determining ods pdf text size

Hello

Thanks for the link.

But I am quite new to sas, so I am still having some trouble.

I've made the following template but when using the proc report, I do still not get the wished size. Could you help me?

Proc template;

Define style Style.Custom;

parent=styles.default;

Style fonts /

Font_Face = "Times, Helvtica, sans-serif"

Font_size = 8pt

FONT_WEIGHT = bold

FONT_STYLE = italic

FOREGROUND = cx002288

BACKGROUND = cxe0e0e0;

end;

run;

Super User
Super User
Posts: 7,942

Re: Determining ods pdf text size

Hi,

Try this:

Proc template;

Define style Style.Custom;

parent=styles.default;

style usertext from usertext /

      font_size=8pt

      font_weight=bold;

end;

run;

Contributor
Posts: 47

Re: Determining ods pdf text size

hmm doesn't seems to work.

Correct me if I am wrong, but after I run the template, I am onlu supposed to in the ods statement supposed to write style=Custom, right?

e.g. rtf file ="AA.rtf" style=Custom;

Solution
‎05-01-2014 10:05 AM
Super User
Super User
Posts: 7,942

Re: Determining ods pdf text size

Yes, it should apply to the file as opened.  Hang on, just noticed something in your code.  You are opening an rtf with your ods statement and then using ods pdf text.  As far as I am aware you can't mix it like that.  Maybe try:

ods rtf file="MyFile.rtf" style=custom;

ods text="Some text to output";

print something.

ods rtf close;

Contributor
Posts: 47

Re: Determining ods pdf text size

Thanks, it helped Smiley Happy

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 413 views
  • 0 likes
  • 2 in conversation