I want to change the left and right margins in the pdf files I am outputting. Actually, the real problem is that each obs requires more than one line, so I thought I would start with the orientation and margin width. I would welcome suggestions for any other options that would allow me to output one record per line.
partial code:
%macro elemREP (num=);
ods pdf body="G:\Departments\Research\Misc\EVAAS\1415\School Rosters\&num._Verify_Roster_EVAAS.pdf";
options orientation=landscape nodate pageno=1 leftmargin=.1 rightmargin=.1;
proc print data=joinelem4 noobs
HI:
I have a few suggestions. One is to flip your statements and list the margin options BEFORE the ODS PDF statement. This will ensure that ODS will get the NEW options when it starts up. The other option is to specify an exact unit of measure with ODS PDF -- otherwise, you are forcing PDF to translate from the default unit of measure.
options orientation=landscape nodate pageno=1 leftmargin=.1 rightmargin=.1;
ods pdf body="G:\Departments\Research\Misc\EVAAS\1415\School Rosters\&num._Verify_Roster_EVAAS.pdf";
For example, consider the difference in output length and width for just 30 obs in SASHELP.CARS.
cynthia
options orientation=landscape nodate pageno=1 leftmargin=.25in rightmargin=.25in;
ods pdf file='c:\temp\carss.pdf';
proc report data=sashelp.cars(obs=30) nowd;
title '1) take all defaults';
run;
proc report data=sashelp.cars(obs=30) nowd
style(report)={cellpadding=2px font_size=8pt}
style(header)={font_size=9pt}
style(column)={font_size=8pt};
title '2) change some style options';
run;
ods pdf close;
I think you'll need to post some sample data for more help.
Other methods include modifying the template to reduce cell size and padding.
Here's a link to a common style I've used (borrowed from a former colleague). You can modify the cell spacing, padding and font size as needed.
Hope it's helpful.
HI:
I have a few suggestions. One is to flip your statements and list the margin options BEFORE the ODS PDF statement. This will ensure that ODS will get the NEW options when it starts up. The other option is to specify an exact unit of measure with ODS PDF -- otherwise, you are forcing PDF to translate from the default unit of measure.
options orientation=landscape nodate pageno=1 leftmargin=.1 rightmargin=.1;
ods pdf body="G:\Departments\Research\Misc\EVAAS\1415\School Rosters\&num._Verify_Roster_EVAAS.pdf";
For example, consider the difference in output length and width for just 30 obs in SASHELP.CARS.
cynthia
options orientation=landscape nodate pageno=1 leftmargin=.25in rightmargin=.25in;
ods pdf file='c:\temp\carss.pdf';
proc report data=sashelp.cars(obs=30) nowd;
title '1) take all defaults';
run;
proc report data=sashelp.cars(obs=30) nowd
style(report)={cellpadding=2px font_size=8pt}
style(header)={font_size=9pt}
style(column)={font_size=8pt};
title '2) change some style options';
run;
ods pdf close;
Thanks for your help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.