BookmarkSubscribeRSS Feed
Kiteulf
Quartz | Level 8

Hi

 

I want the table that is printed to be in the middle of the page. How do I do that?

 

 

proc template;
define style formel1;
parent = styles.printer;
class body / backgroundimage = "\\blabla.jpg";
style fit/
fontsize = 4
fontfamily = impact;

STYLE SystemTitle /
 FONT_FACE = "Times New Roman, Times "
 FONT_SIZE = 6
 FONT_WEIGHT = bold
 FONT_STYLE = italic;
 STYLE SystemFooter /
 FONT_FACE = "Times New Roman, Times "
 FONT_SIZE = 6
 FONT_WEIGHT = bold
 FONT_STYLE = italic
;

end;
run;
GOPTIONS device=ACTXIMG;
/*Lager Pdf og macro i mail teksten*/

ods listing close;

options orientation=landscape topmargin="0.5cm" ;
options pdfsecurity=none
pdfpassword=(open="SCB");
ods pdf file="\\blablaba_&Periode..pdf" style=formel1 STARTPAGE=NEVER;

/*   STARTER MED RESULTATENE */
Title "apps";

proc print data=work.paidoutratio_m NOOBS ;
run;

;
ods pdf startpage=now; 



ods _all_ close;

ods listing close;

 

5 REPLIES 5
Ksharp
Super User
options orientation=landscape topmargin="0.5cm"  center ;
Kiteulf
Quartz | Level 8

Perhaps I was a bit unclear

 

 

I want the table to be in the middle of page, making it just as long from the top of the page to the bottom

Cynthia_sas
Diamond | Level 26

Hi:

  For ODS PDF, you would need to adjust your top and bottom margins for the placement you want. Or, investigate ODS LAYOUT to see if vertical alignment is possible. If your table always has the exact same number of rows, then the ABSOLUTE Layout should let you adjust the vertical placment. The CENTER system option is for horizontal alignment within the boundaries set by the right/left margins.

cynthia

Kiteulf
Quartz | Level 8

 

I have tried this but since I also have a background picture this picture is being moved downwards as well...

Cynthia_sas
Diamond | Level 26
Hi: The documentation for BACKGROUNDIMAGE does not indicate that it is supported by ODS PDF. Please refer to this doc page: http://support.sas.com/documentation/cdl/en/odsproc/69834/HTML/default/viewer.htm#n19a4b40swc766n18q...

The doc says that BACKGROUNDIMAGE is only supported by "Restriction The BACKGROUNDIMAGE= attribute is valid in markup family destinations, the PCL destination, and the PS destination. It is also valid in the TAGSETS.RTF destination, but the background image applies to the RTF document and not to a table or a table cell. "

Are you using BACKGROUNDIMAGE, when you only need to have a logo or picture appear above the table??? Either way, you may want to work with Tech Support on this. If you are using ODS PDF, then I am not sure you can use BACKGROUNDIMAGE the way you have attempted.

cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 4418 views
  • 0 likes
  • 3 in conversation