BookmarkSubscribeRSS Feed
BenConner
Pyrite | Level 9

Hi,

 

Several months ago I created some proof-of-concept code for a PDF report that used the ODS absolute layout functionality.  It worked fairly well.   Am now revisiting it to apply the final tweaks now that the project has been approved and am finding oddities in terms of positioning.

 

I thought the absolute layout would measure from the edge of the paper for the x/y values.  If it was too close it would just truncate them based on the limitations of the printer I printed on.  Now I'm finding that it appears to add the top and left unprintable margins to the x/y values I chose.

 

Example:

%let path=c:\user\ben\;
ods html close;
title;

options orientation=landscape nodate nonumber center ;
options topmargin=.001IN bottommargin=.001IN leftmargin=.001IN rightmargin=.001IN ;
ods graphics / noborder;

ods PDF file="&path.test.pdf" notoc;
ods layout absolute y=.5in x=.5in;
ods region y=.0in x=.0in height=.15in width=10in style={background=black};
ods text="^{style[background=black]}";
ods layout end;
ods pdf close;

 

AFAIK, this should produce a solid bar across the top of the page (8.5x11) in landscape mode with the upper left point at .5" down and .5" to the right.  The bar should be 10" long.  What I'm seeing is the start of the bar is 21/32" from the left and 21/32" from the top, and the bar is 9 5/8" long.

 

I have to be missing something as this used to work.  Am on vsn 9.4 TS1M3, printing the pdf file to a Xerox WorkCentre 7970 printer.

 

Thanks!

 

--Ben

 

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

This question would be better asked to the ODS community.

 

Why not set the margins to 1/4" as this is the most common printer margin?

BenConner
Pyrite | Level 9

Would love to; this is a government-approved document I'm trying to match.  Exactly.

 

Found the root cause today: I was printing it in Acrobat Reader with the default 'fit to page'.  Arghhh...  Should have been using the 'Actual size' setting.  Once that was changed...it printed fine.

 

Thanks for replying!

 

--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
  • 2 replies
  • 665 views
  • 1 like
  • 2 in conversation