PB9.0.3 Build 8836,SQL2000,XP,PB自定义纸张问题

my_yinger 2010-03-09 02:32:05
PB9.0.3 Build 8836,SQL2000,XP,PB自定义纸张问题

原 PB9.0,Windows2000 程序,打印机LQ1600K,自定义纸张 代码如下
dw_2.Object.DataWindow.Print.CustomPage.Length = 71
dw_2.Object.DataWindow.Print.CustomPage.Width = 390
dw_2.Object.Datawindow.Print.Paper.Size = 256
dw_2.print(true)
打印正常

先在的系统换成了XP,打印机LQ1600KIII+,LQ1600KIIIH,LQ1900KII+,程序PB9.0.3 Build 8836编译

打印不正常,现象是使用了系统默认的纸型,PB中自定义的纸张类型没生效。

网上查了下,自定义字形的写法是
dw_2.Object.DataWindow.Print.CustomPage.Length = "71"
dw_2.Object.DataWindow.Print.CustomPage.Width = "390"
dw_2.Object.Datawindow.Print.Paper.Size = "256"

两种写法我都试验了,都是不成功。

所要的效果如图(原来是可以的):

...全文
934 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
fanhua1230 2010-12-22
  • 打赏
  • 举报
回复
打好补丁后,F1 看帮助文件。print.property

Usage

In the painter
Select the DataWindow by deselecting all controls; then set values in the Properties view, Print Specifications tab.
To specify a user-defined paper size, set the Paper.Size property to 255 or 256, then set the Print.CustomPage.Length and Print.Custom.Page.Width properties to the desired size. With Paper.Size set to 255, Length and Width are in the units specified for the DataWindow on the General page in the Properties view. For example:

// DataWindow Units set to 1/1000 inch

dw_1.Modify("DataWindow.Print.Paper.Size=255")

//9.875 inches long

dw_1.Modify("DataWindow.Print.CustomPage.Length=9875")

//7.375 inches wide

dw_1.Modify("DataWindow.Print.CustomPage.Width=7375")

With Paper.Size set to 256, Length and Width are in millimeters:

dw_1.Modify("DataWindow.Print.Paper.Size=256")

//25.4 centimeters long

dw_1.Modify("DataWindow.Print.CustomPage.Length=254")

//19.5 centimeters wide

dw_1.Modify("DataWindow.Print.CustomPage.Width=195")
dgl09 2010-06-28
  • 打赏
  • 举报
回复
看不到回复
wanglv 2010-03-11
  • 打赏
  • 举报
回复
在操作系统中设置好了纸张后,程序重新启动。就没有问题啦
qzyuanmu 2010-03-11
  • 打赏
  • 举报
回复
哇,过年后不能UP了
zllzlw520 2010-03-11
  • 打赏
  • 举报
回复
1hahahhahhahahhahahhahha
myrose 2010-03-10
  • 打赏
  • 举报
回复
LQ1600KIII+,LQ1600KIIIH,LQ1900KII+ 换用老的LQ1600K驱动
hygougou 2010-03-10
  • 打赏
  • 举报
回复
只能说楼主太牛了,补丁要挨个打,补丁打到pb902_7554就支持自定义纸张语句(我是按排序选择性打,也没挨个打),

长、宽只支持数值整型,单位毫米,


楼主中的纸张长(纸张宽倒无所谓)小数整张加起来会误差2.4毫米,可以判断写到INI或者数据库,逢4多加2毫米,清零一次,另外加句题外话,楼主的纸张很不具工业标准
my_yinger 2010-03-09
  • 打赏
  • 举报
回复
1、我是直接在PB9.0上安装的73M的PB903_8836补丁,PB903_8836是PB9最终的补丁了,这样从PB9.0直接安装PB903_8836到PB9.0.3 Build 8836是可以的吧?

2、sybase网站上已经不提供PB9的补丁了(有没有其他地方可以找到PB9的补丁?),而我手上也只有PB903_8836补丁,并且程序都是在PB9.0.3 Build 8836做的,如果把PB降级会不会出现其他问题?

3、
re :jlwei888
我要的最终的纸张大小是 宽行打印纸(US Std Fanfold) 纸宽377.7毫米,纸长279.4毫米,这样一张上能打印下4份。
那么这个最终的纸长279.4毫米,最终的纸宽377.7毫米,具体该怎么写 ?
KaedaRukawa 2010-03-09
  • 打赏
  • 举报
回复
mark
先记下来
bingcat 2010-03-09
  • 打赏
  • 举报
回复
一直以为8836的补丁不是针对PB9.03的啊
提前十分钟 2010-03-09
  • 打赏
  • 举报
回复
9.03 这个版本不如9.02稳定
my_yinger 2010-03-09
  • 打赏
  • 举报
回复
re :jlwei888

我要的最终的纸张大小是 宽行打印纸(US Std Fanfold) 纸宽377.7毫米,纸长279.4毫米,这样一张上能打印下4份。

那么这个最终的纸长279.4毫米,最终的纸宽377.7毫米,具体该怎么写 ?
jlwei888 2010-03-09
  • 打赏
  • 举报
回复
1.注意必须使用针式打印机,我在windows 98/2000/xp/2003 server均测试通过
2.使用Epson 300k, Epson lq1600k, Epson Lq 1600kiii, Epson 580k均测试成功
3.必须使用牵引送纸方式(即使用带孔的打印纸),而不要使用A4这样的打印纸,否则会走整页的纸

www.pdriver.com 陶清
my_yinger 2010-03-09
  • 打赏
  • 举报
回复
re :jlwei888

用PrintSend函数需要查打印的技术手册吧,一是没有技术手册,二是也没法确定打印类型的呀,没法限定用户用什么型号的打印机啊。

re:pb8

以前的Win2000和epson-Lq1600K也是好使的呀,现在换了XP和新式的打印机和9.0.3版本的PB9了后才不好用的嘛。而降级也是不可能的了。
pb8 2010-03-09
  • 打赏
  • 举报
回复
我的pb902,用来楼主第一种写法,win2000与winxp上都很正常,epson的针打~~
jlwei888 2010-03-09
  • 打赏
  • 举报
回复
long ll_job
ll_job = printopen()
if ll_job = -1 then
messagebox("提示","打印机未准备好")
return
end if

//定制行距1/8英寸 1/8英寸 = 0.125 英寸 = 1.875 毫米
PrintSend(ll_job, CHAR(27)+CHAR(48))
//设定页长= 1/8 英寸 * 15 = 1.875 英寸
PrintSend(ll_job, CHAR(27)+CHAR(67)+CHAR(15))
//因为 1 英寸 = 25.4 毫米 ,所以最终的纸长是:
//= 1.875 英寸 * 25.4 = 47.625 毫米
//必须使用printdatawindow,这样才能利用刚才设置的打印控制码
printdatawindow(ll_job,dw_print)
printclose(ll_job)

试试这个吧!

1,075

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧