0

print 问题急!!

asked 2009-09-27 08:34:27 +0800

tabsuny gravatar image tabsuny
102

updated 2009-09-27 10:20:55 +0800

代码如下:
<window title="Listbox" border="normal">
<vbox>
<listbox rows="1" mold="select">
<listitem label="option1"/>
<listitem label="option2"/>
<listitem label="option3"/>
</listbox>

<separator bar="true"/>
<listbox width="250px">
<listhead sizable="true">
<listheader label="Name" sort="auto"/>
<listheader label="Gender" sort="auto"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="female"/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="male"/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="female"/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="male"/>
</listitem>
</listbox>
<button label="Print it" onClick="Clients.print()"/>
</vbox>
</window>
点击按钮打印,可是
listheader 的label(Name | Gender) 内容没有打印出来,用浏览器提供的打印也是如此。
环境:zk-bin-3.5.2 | apache-tomcat-5.5.27 | Eclipse | IE7 | WinXP SP2
Firefox 倒是可以。
其他的没试过。

delete flag offensive retag edit

10 Replies

Sort by » oldest newest

answered 2009-09-27 08:41:44 +0800

tabsuny gravatar image tabsuny
102

如何解决,高人指点谢谢=.=~

link publish delete flag offensive edit

answered 2009-09-28 01:24:36 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@tabsuny

您好,經過測試,這段程式碼打印出來的內容是正常的。
不知道您所描述的問題是什麼?

/Joy

link publish delete flag offensive edit

answered 2009-09-28 01:47:59 +0800

tabsuny gravatar image tabsuny
102

updated 2009-09-28 01:57:41 +0800

Hi Joy,
代码:
<listheader label="Name" sort="auto"/>
<listheader label="Gender" sort="auto"/>
这两个Listheader的Label(Name 和 Gender)也能打印出来吗?
能否告知您的浏览器及其版本、配置环境。
为什么我在打印预览里和打印出来的纸上都看不到Listheader的 Label 值呢??
3Q!!

link publish delete flag offensive edit

answered 2009-09-28 03:06:50 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@tabsuny

您好,我是用Firefox3.5.3測的,的確都可以印出。
剛測過IE7,確實無法列印。不過這是IE7有個設定沒有勾選的關係。

工具->進階->列印->唯一的選項打勾

如此便可於IE7列印。

各種瀏覽器可能有不同的預設配置,如果遇到這種情形,就需要手動設置。

Regards
/Joy

link publish delete flag offensive edit

answered 2009-09-28 07:01:42 +0800

tabsuny gravatar image tabsuny
102

Dear Joy,

谢谢你的建议,我想应该是IE浏览器设置的问题。(我用Google 浏览器试了下,打印出来也是没问题的)

可是我依然有点小问题,我试着用您给的方法去更改浏览器的打印設置,可是找不到浏览器相应的设置,

您能不能给我一个更具体的设置步骤呢

Best Regards
Tab

link publish delete flag offensive edit

answered 2009-09-28 07:44:15 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@tabsuny

我用的是英文版IE瀏覽器,不常用中文瀏覽器,可能講的名稱跟你們不一致。
英文版的話是在 Tools -> Internet Options -> Advanced -> Settings -> Printing -> Print background colors and images
這個部分可能要您自行上網查查,因為我們的Forum目前並沒有提供圖象上傳,無法直接拍圖給您參考,請見諒。

Regards
/Joy

link publish delete flag offensive edit

answered 2009-09-28 08:28:32 +0800

tabsuny gravatar image tabsuny
102

Hi Joy,

是不是選擇此選項,然后Reboot瀏覽器?

可是我這樣做仍然沒有打出來,您有試嗎?

是否还有其他选项我没有设置呢?

Look forward to your reply.

Best Regards
Tab

link publish delete flag offensive edit

answered 2009-09-28 11:07:14 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

updated 2009-09-28 11:41:20 +0800

@tabsuny

如果您還是不行的話,請試試 <listhead sizable="true"> 加上style參數吧。
變成 <listhead ... style="position: relative">。

看起來是Browser issue,會造成一些CSS設定上的衝突。

Regards
/Joy

link publish delete flag offensive edit

answered 2009-09-28 12:12:56 +0800

tabsuny gravatar image tabsuny
102

Dear Joy,

It's OK now。Ho~~,Ho~~

Thank you very much!

Best Regards

Tab

附:
absolute:绝对定位,CSS 写法“ position: absolute; ”,它的定位分两种情况,如下:

  1. 没有设定 Top、Right、Bottom、Left 的情况,默认依据父级的“内容区域原始点”为原始点。

  2. 有设定 Top、Right、Bottom、Left 的情况,这里又分了两种情况如下:

  (1). 父级没 position 属性,浏览器左上角(即 Body)为“坐标原始点”进行定位,位置由 Top、Right、Bottom、Left 属性决定。

  (2). 父级有 position 属性,父级的“坐标原始点”为原始点。

  relative:相对定位,CSS 写法“ position: relative; ”,参照父级的“内容区域原始点”为原始点,无父级则以 Body 的“内容区域原始点”为原始点,位置由 Top、Right、Bottom、Left 属性决定,且有“撑开或占据高度”的作用。

(希望对大家有所帮助)

再次感谢 Joy

link publish delete flag offensive edit

answered 2013-08-23 08:23:05 +0800

yuanbohan gravatar image yuanbohan
258 2 7

你好,请问下 你测试过直接通过zk的某个页面来打印一个简单的内存中的string字符串么?使用客户端默认的打印机,客户端直接将后台处理的字符串打印到客户端的打印机上?期待答复

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2009-09-27 08:34:27 +0800

Seen: 463 times

Last updated: Aug 23 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More