Hi,
I have a sample program:
%let path=c:\users\bconner\;
ods escapechar='^';
options orientation=landscape;
dm 'clear log';
ods PDF file="&path.test.pdf" notoc;
ods layout absolute y=.25in x=.25in width=10.5in height=8in;
ods region y=.32in x=8.125in width=2in height=.8125in style={background=green};
ods text = "^{style[background=lightgreen]Line 1}";
ods region y=2.025in x=.1in width=5in height=.25in style={background=blue};
ods text = "Line 2";
ods layout end;
ods pdf close;
That generates the following log:
7162 options orientation=landscape;
7163
7164 dm 'clear log';
7165 ods PDF file="&path.test.pdf" notoc;
SYMBOLGEN: Macro variable PATH resolves to c:\users\bconner\
NOTE: Writing ODS PDF output to DISK destination "c:\users\bconner\test.pdf", printer "PDF".
7166 ods layout absolute y=.25in x=.25in width=10.5in height=8in;
7167
7168
7169 ods region y=.32in x=8.125in width=2in height=.8125in style={background=green};
7170 ods text = "^{style[background=lightgreen]Line 1}";
7171
7172 ods region y=2.025in x=.1in width=5in height=.25in style={background=blue};
WARNING: WIDTH exceeds LAYOUT WIDTH for PDF destination. This option will be ignored.
7173
7174 ods text = "Line 2";
7175
7176 ods layout end;
7177 ods pdf close;
NOTE: ODS PDF printed 1 page to c:\users\bconner\test.pdf.
I can't see why the warning gets generated. The layout width is 10". The region starts at .1" and goes for 5", ending at 5.1". ??
Thanks!
--Ben
Hi Cynthia,
Sorry, had forgotten to copy the margin spec into the example:
options topmargin=.001IN bottommargin=.001IN leftmargin=.001IN rightmargin=.001IN ;
Adding this to the sample code just makes it get weirder:
66 dm 'clear log';
67 options topmargin=.001IN bottommargin=.001IN leftmargin=.001IN rightmargin=.001IN orientation=landscape;
68 ods PDF file="&path.test.pdf" notoc;
NOTE: Writing ODS PDF output to DISK destination "c:\users\bconner\test.pdf", printer "PDF".
69 ods layout absolute y=.25in x=.25in width=10.5in height=8in;
WARNING: LAYOUT placement exceeds available space for PDF destination. Setting Y=0.153333in.
70
71
72 ods region y=.32in x=8.125in width=2in height=.8125in style={background=green};
73 ods text = "^{style[background=lightgreen]Line 1}";
74
75 ods region y=2.025in x=.1in width=5in height=.25in style={background=blue};
WARNING: WIDTH exceeds LAYOUT WIDTH for PDF destination. This option will be ignored.
76 ods text = "Line 2";
77
78 ods layout end;
79 ods pdf close;
NOTE: ODS PDF printed 1 page to c:\users\bconner\test.pdf.
Will run this by TS for clarification. Thanks!
--Ben
Hi,
I am facing similar issue, where i have specified pdf page size, margins and layouts. But while specifing ODS Region, it's producing warning.
please post the solution/fix any if it has been resolved.
Thanks.
This took a good while to research, but the issue relates to having the width and height specified on the region statement. Removing these two parameters made the problem go away. It shouldn't have been an issue but is in the current release.
In my case it was workable as I have white backgrounds on the region anyway and it worked just fine.
--Ben
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.