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
SAS Super FREQ

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
SAS Super FREQ
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

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 3842 views
  • 0 likes
  • 3 in conversation