BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi Friends,

The below code is working well. But the font size in the PDF file is too small. Please tell me how to increase the size of the font.

ods pdf file=pdfout startpage=now;
data _null_;
file print;
set cdhcpgrep;
format mon $month.;
title ' CDHCPG Report';
put mon y2ddol y2dpct y1ddol y1dpct;
run;
2 REPLIES 2
ScottH_SAS
SAS Employee
Using Proc template you can modify the font sizes of the output. I didn't know what version of SAS you were using so I wrote and tested this in 9.1. If you need a earlier version let me know.

To change the font of the data inside a Data Null you have to change the BatchFixedFont setting. I've changed it to 12pt from the initial default of 6.7pt. Try this and see if this helps.

Scott

sample program...

proc template;
define style Styles.biggerfont;
parent = Styles.printer;
replace fonts /
'TitleFont2' = ("Times Roman",12pt,Bold Italic)
'TitleFont' = ("Times Roman",13pt,Bold Italic)
'StrongFont' = ("Times Roman",10pt,Bold)
'EmphasisFont' = ("Times Roman",10pt,Italic)
'FixedEmphasisFont' = ("Courier",9pt,Italic)
'FixedStrongFont' = ("Courier",9pt,Bold)
'FixedHeadingFont' = ("Courier",9pt,Bold)
'BatchFixedFont' = ("SAS Monospace, Courier",12pt)
'FixedFont' = ("Courier",9pt)
'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic)
'headingFont' = ("Times Roman",11pt,Bold)
'docFont' = ("Times Roman",10pt);
end;
run;
ods pdf file='pdfout.pdf' style=Styles.biggerfont;
data _null_;
file print;
set sashelp.class;
title ' Big Fonts Report';
put age sex name;
run;
ods pdf close;
mgrzyb
Quartz | Level 8

1.   Can you please send an example?  I want to make it to a 12 point Arial style.  I'm not good with fonts. 

2.   How would I make this to a  RTF file with Arial 12 font?  

3.  RTF can just be copied and pasted, yes?

 

Thanks. Marysia

 

Here is my code:

 


ods pdf file="C:\sas\a_study\mao\new_sept_18\Case5Means.pdf" style = minimal;
data no;
set pones4;
if c5=0;
proc means n mean stderr min max range;
var final5case_percent
title 'Descriptive Stats for c5=0 Among pgys 1 = Did NOT undergo Case5'
title2 ' Checked normality- skew and kurt is fine';
run;


data yes;
set pones4;
if c5=1;
proc means n mean stderr min max range;
var final5case_percent ;
title 'Descriptive Stats for c5=1 Among pgys 1= DID undergo Case5'
title2 ' Checked normality- skew and kurt is super';
run;
ods pdf close;

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
  • 2 replies
  • 2432 views
  • 0 likes
  • 3 in conversation