BookmarkSubscribeRSS Feed
BenConner
Pyrite | Level 9

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

5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
I can't see what your margin settings are. ODS PDF automatically reserves space for margins, I think. So it's possible that somehow it thinks that your region won't fit. Otherwise, I think you're going to have to work with Tech Support.

I do note that in this paper on page 4, insider tip #2, there is a recommendation as to margins:
http://support.sas.com/resources/papers/proceedings15/SAS1836-2015.pdf

cynthia
BenConner
Pyrite | Level 9

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

 

 

 

BenConner
Pyrite | Level 9
Still waiting for clarification from SAS Tech Support. Sigh... --Ben
mjsstat
Calcite | Level 5

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.

BenConner
Pyrite | Level 9

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

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