DATA Step, Macro, Functions and more

ODS Layout positioning in PDF files

Regular Contributor
Posts: 186

ODS Layout positioning in PDF files

[ Edited ]



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.



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

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.






Super User
Posts: 2,513

Re: ODS Layout positioning in PDF files

Posted in reply to BenConner

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?

Regular Contributor
Posts: 186

Re: ODS Layout positioning in PDF files

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 printed fine.


Thanks for replying!



Ask a Question
Discussion stats
  • 2 replies
  • 1 like
  • 2 in conversation