楼主: stata18
16058 11

[原创博文] 怎样控制SAS ODS RTF输出中的字体、位置? [推广有奖]

  • 3关注
  • 6粉丝

已卖:603份资源

教授

70%

还不是VIP/贵宾

-

TA的文库  其他...

MyLib

威望
1
论坛币
4004 个
通用积分
100.0612
学术水平
15 点
热心指数
31 点
信用等级
16 点
经验
157536 点
帖子
724
精华
0
在线时间
1924 小时
注册时间
2010-8-13
最后登录
2025-3-14

楼主
stata18 发表于 2011-5-31 15:22:04 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请教各位大佬:怎样控制SAS ODS RTF输出中的字体、位置?能输入图片吗?还有,为什么输出的pdf文件里中文字体为乱码呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:ods RTF pdf文件 中文字体 PDF 中文字体 图片

回帖推荐

fu686cn 发表于7楼  查看完整内容

我来代为解释下吧, 如有不当还请专家ttklkl 本人来修正O(∩_∩)O~ 楼主: ttklkl 的脚本是进行格式的自定义,并保存在Styles.Custom中,由Styles.rtf继承而来, 其中的这些参数'titlefont'= 等等... 是用来定义表格的标题,字体大小等等...可以自行修改成自己所需要的, 调用的时候只要申明: ods pdf file="style.custom" style=style;

ttklkl 发表于5楼  查看完整内容

proc template; define style Styles.Custom; parent = Styles.RTF; replace fonts / 'TitleFont' = ("Times Roman",13pt,Bold) /* Titles from TITLE statements */ 'TitleFont2' = ("Times Roman",12pt,Bold Italic) /* Procedure titles ("The _____ Procedure")*/ 'StrongFont' = ("Times Roman",10pt,Bold) 'EmphasisFont' = ("Times Roman",10pt,Italic) 'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic) ...

本帖被以下文库推荐

沙发
honghejing 发表于 2011-5-31 16:09:55
pdf不能用rtf 吧?rtf 是doc文档

藤椅
stata18 发表于 2011-5-31 19:07:04
是两个问题,一个是rtf,另外一个是pdf;
本来想生成pdf文件,结果里面的中文字符是乱码;生成的rtf倒是正常的,但是字体大小、位置不能控制,准备先生成rtf,再把rtf转换为pdf的,结果两条路都有问题。
另外,我使用winXP+sas 9.13

板凳
honghejing 发表于 2011-5-31 19:27:53
没做过中文的report,不好意思

报纸
ttklkl 发表于 2011-5-31 19:55:11
proc template;
define style Styles.Custom;
parent = Styles.RTF;
replace fonts /
'TitleFont' = ("Times Roman",13pt,Bold) /* Titles from TITLE statements */
'TitleFont2' = ("Times Roman",12pt,Bold Italic) /* Procedure titles ("The _____
Procedure")*/
'StrongFont' = ("Times Roman",10pt,Bold)
'EmphasisFont' = ("Times Roman",10pt,Italic)
'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic)
'headingFont' = ("Times Roman",10pt) /* Table column and row headings */
'docFont' = ("Times Roman",10pt) /* Data in table cells */
'footFont' = ("Times Roman",10pt) /* 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' = white /* row and column header background */
'fg' = black /* text color */
'bg' = white; /* page background color */;
replace Body from Document /
bottommargin = 0.25in
topmargin = 0.25in
rightmargin = 0.25in
leftmargin = 0.25in;
replace Table from Output /
frame = hsides /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
rules = groups /* internal borders: none, all, cols, rows, groups */
cellpadding = 5pt /* the space between table cell contents and the cell border */
cellspacing = 0pt /* the space between table cells, allows background to show */
borderwidth = 0.5pt /* the width of the borders and rules */;
* Leave code below this line alone ;
style SystemFooter from SystemFooter /
font = fonts("footFont");
end;
run;
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

Stay Hungry. Stay Foolish.

地板
stata18 发表于 2011-5-31 21:27:32
楼上的兄弟,能解释一下吗?什么意思呀?看不太懂。

7
fu686cn 发表于 2012-1-12 10:25:00
我来代为解释下吧, 如有不当还请专家ttklkl 本人来修正O(∩_∩)O~
楼主: ttklkl 的脚本是进行格式的自定义,并保存在Styles.Custom中,由Styles.rtf继承而来, 其中的这些参数'titlefont'= 等等... 是用来定义表格的标题,字体大小等等...可以自行修改成自己所需要的, 调用的时候只要申明: ods pdf file="style.custom" style=style;
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

what will be will be

8
tamtam7010 发表于 2013-7-26 00:43:34
thanks for your sharing, xie xie

9
fossilweng 发表于 2013-7-26 04:07:03
thanks for sharing, ttklkl and fu686cn !!

10
chi4zb 发表于 2014-7-3 15:38:58
收藏了,很棒

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 20:25