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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.