您的位置:程序门 -> powerbuilder -> 基础类



头痛了我好长时间的打印问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


头痛了我好长时间的打印问题[已结贴,结贴人:command_zhang]
发表于:2007-05-26 12:45:11 楼主
环境是pb6.5.1,windows   2000
在程序中有五六种打印格式和纸张。虽然可以自动设置默认打印机,可我认为这样还是很麻烦,想问问怎么用程序能设置windows2000的打印服务器属性的大小。我改过注册表可没效果,是不是还有别的地方要修改呢!
有没有搞过这种打印的高手啊,我只想用一个打印机来打印全部格式。
发表于:2007-05-26 13:03:081楼 得分:0
同样的问题,
关注中。。。
发表于:2007-05-26 15:00:572楼 得分:3
看能不能通过api的方法处理呢。我现在也是人工的处理,
发表于:2007-05-26 15:26:573楼 得分:0
高手机   帮帮我
api也行   什么命令都行
发表于:2007-05-28 09:20:104楼 得分:4
假如你的datawindow的名字叫dw_1
你用一下dw_1.object.datawindow.print.paper.size的这个属性。
pb中的print的参数有许多,你可以自己封一个userobject来设置打印属性。
顺便交个朋友,呵呵!
发表于:2007-05-28 09:38:075楼 得分:3
paper.size an   integer   indicating   the   size   of   the   paper   that   will   be   used   for   the   output:
0   ?default   paper   size   for   the   printer
1   ?letter   8   1/2   x   11   in
2   ?lettersmall   8   1/2   x   11in
3   ?tabloid   17   x   11   inches
4   ?ledger   17   x   11   in
5   ?legal   8   1/2   x   14   in
6   ?statement   5   1/2   x   8   1/2   in
7   ?EXECutive   7   1/4   x   10   1/2   in
8   ?a3   297   x   420   mm
9   ?a4   210   x   297   mm
10   ?a4   small   210   x   297   mm
11   ?a5   148   x   210   mm
12   ?b4   250   x   354   mm
13   ?b5   182   x   257   mm
14   ?folio   8   1/2   x   13   in
15   ?quarto   215   x   275mm
16   ?10x14   in
17   ?11x17   in
18   ?note   8   1/2   x   11   in
19   ?envelope   #9   3   7/8   x   8   7/8
20   ?envelope   #10   4   1/8   x   9   1/2
21   ?envelope   #11   4   1/2   x   10   3/8
22   ?envelope   #12   4   x   11   1/276
23   ?envelope   #14   5   x   11   1/2
24   ?c   size   sheet
25   ?d   size   sheet
26   ?e   size   sheet
27   ?envelope   dl   110   x   220mm
28   ?envelope   c5   162   x   2
29   mm29   ?envelope   c3   324   x   458   mm
30   ?envelope   c4   229   x   324   mm
31   ?envelope   c6   114   x   162   mm
32   ?envelope   c65   114   x   229   mm
33   ?envelope   b4   250   x   353   mm
34   ?envelope   b5   176   x   250   mm
35   ?envelope   b6   176   x   125   mm
36   ?envelope   110   x   230   mm
37   ?envelope   monarch   3.875   x   7.5   in
38   ?6   3/4   envelope   3   5/8   x   6   1/2   in
39   ?us   std   fanfold   14   7/8   x   11   in
40   ?german   std   fanfold   8   1/2   x   12   in
41   ?german   legal   fanfold   8   1/2   x   13   in
256   ?user-defined   paper   size
to   specify   a   user-defined   paper   size   at   runtime,   set   the   paper.size   property   to   256,   then   set   the   print.custompage.length   and   print.custom.page.width   properties   to   the   desired   size   in   millimeters.   these   properties   cannot   be   set   in   the   painter.   for   example:dw_1.object.datawindow.print.paper.size   =   256
  dw_1.object.datawindow.print.custompage.length   =   254   //10   inches
  dw_1.object.datawindow.print.custompage.width   =   190.5   //7   inchespainter:   paper   size   option
发表于:2007-05-28 16:53:096楼 得分:3
使用函数printsetup()来动态设置
发表于:2007-05-31 10:59:057楼 得分:3
printersetup()用以显示打印前打印机的设置,如果要设置格式之类的,就设备datawindow的打印参数了
发表于:2007-05-31 14:55:298楼 得分:4
print.paper.size这个属性怎么可能在6.5里有?!偶第一此用这个属性是在9.0里,还要打补丁。觉得楼主现在最彻底的办法就是用api,封装一uo
发表于:2007-06-05 10:07:569楼 得分:0
我解决了,用的是printcontrol.dll 很好用的 大家也可以试试


快速检索

最新资讯
热门点击