现在的位置: 首页 > 综合 > 正文

Creating your own ODS Style Template for PDF Output

2018年10月23日 ⁄ 综合 ⁄ 共 1791字 ⁄ 字号 评论关闭

******************摘录********************************;
proc template;
   define style Styles.Custom;

   parent = Styles.Printer;

      replace fonts /

'TitleFont' = ("Times Roman",13pt,Bold Italic) /* Titles from TITLE statements */
'TitleFont2' = ("Times Roman",12pt,Bold Italic) /* Proc titles ("The XX Procedure")*/
'StrongFont' = ("Times Roman",10pt,Bold)
'EmphasisFont' = ("Times Roman",10pt,Italic)
'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic)
'headingFont' = ("Times Roman",11pt,Bold) /* Table column and row headings */
'docFont' = ("Times Roman",10pt) /* Data in table cells */
'footFont' = ("Times Roman",13pt) /* Footnotes from FOOTNOTE statements */
'FixedEmphasisFont' = ("Courier",9pt,Italic)
'FixedStrongFont' = ("Courier",9pt,Bold)
'FixedHeadingFont' = ("Courier",9pt,Bold)
'BatchFixedFont' = ("Courier",6.7pt)
'FixedFont' = ("Courier",9pt);

      replace color_list /

'link' = blue /* links */
'bgH' = grayBB /* row and column header background */
'bgT' = white /* table background */
'bgD' = white /* data cell background */
'fg' = black /* text color */
'bg' = white; /* page background color */;

      replace Table from Output /

frame = box /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
rules = all /* internal borders: none, all, cols, rows, groups */
cellpadding = 4pt /* the space between table cell contents and the cell border */
cellspacing = 0.25pt /* the space between table cells, allows background to show */
borderwidth = 0.75pt /* the width of the borders and rules */;

* Leave code below this line alone ;
style SystemFooter from SystemFooter /
   font = fonts("footFont");
style Data from Data /
   background=color_list('bgD');
end;
run;

options nodate nonumber papersize="4x6 Card" orientation=landscape;
ods noptitle;

ods pdf file='c:/sample.pdf' style=Custom;
   title 'My Sample Title';
   footnote 'My Sample Footnote';
   proc report data=sashelp.class nowd;
      column age height weight;
      define age / group;
      define height / mean f=8.;
      define weight / mean f=8.;
      run;
ods pdf close;

 

 

抱歉!评论已关闭.