首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网站建设 > PHP > 未公开的Openlaszlo应用打印功能
【标  题】:未公开的Openlaszlo应用打印功能
【关键字】:Openlaszlo
【来  源】:http://blog.csdn.net/lwz7512/archive/2006/06/01/767994.aspx

未公开的Openlaszlo应用打印功能

自从一年前使用openlaslzo以来,就知道它有个缺陷,就是不能打印界面上东西,现在终于在今天的邮件列表中看到了解决方案,是调用flash的打印函数进行打印的,这下终于有办法了,下面的样例文件:

--------------------------------------------------------------------
laszlo print sample code From: "Clint Dickson" <clintjd@hotmail.com>
--------------------------------------------------------------------
<canvas width="400" height="400">

    <view y="50" x="50" id="myview">
  <view width="50" height="50" bgcolor="blue"/>
  <view width="50" height="50" bgcolor="red"/>
  <simplelayout axis="x"/>
    </view>

    <button x="50" y="150">Print It
         <method event="onclick">
                  // create new PrintJob object, and the print dialog to appear
                  var printJob = new PrintJob();

                  // this will wait for an OK from the dialog to print
                  if (printJob.start()) {

                       // get your view as a flash movie
                       var viewAsMovie = myview.__LZmovieClipRef;

                       //create a print area object, which will be relative to myview (just showing the blue
                       // and red views)
                       var printArea = {xMin:0, xMax:100, yMin:0, yMax:50}

                       // add a page to the print job with the movie
                       printJob.addPage(eval(viewAsMovie), printArea);

                      // send it to the printer
                      printJob.send()

                  }
                  delete printJob;

         </method>
    </button>
</canvas>

非常高兴,openlaszlo越来越让人满意了,继续支持!

VBScript 中 Select Case 的三个典型应用 By Stabx:【上一篇】
WEB打印新产品——Turbo ePrinting 试用报告(续1):【下一篇】
【相关文章】
  • OpenLaszlo开发概述
  • OpenLaszlo-Flash到Ajax
  • OpenLaszlo 3.1.1发布了
  • OpenLaszlo 3.0 Released
  • OpenLaszlo 3.1发布--重拾几乎遗忘的RIA理想
  • 【随机文章】
  • iptables 指南1.1.19
  • 在sql*plus里制作报表 (1)
  • 经典T-SQL[MD5算法实现]
  • [连载]--实战PEAR -- PHP程序员进阶手册[8]
  • 全球汽车无线通信平台技术应用现状
  • 广告图片轮显类dh_adShow Ver1.0.2
  • Vi Guide
  • cisco 路由器口令恢复
  • Kakadu中kd_compressed_stats类的解释-JPEG2000一种实现
  • 编写快速高效的VB程序
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.