来源:蜘蛛抓取(WebSpider)
时间:2018-05-08 08:55
标签:
A.M
豆丁微信公众号
君,已阅读到文档的结尾了呢~~
基于lodop的web方式单据打印技术的改进及实现
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
基于lodop的web方式单据打印技术的改进及实现
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='http://www.docin.com/DocinViewer--144.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口Lodop3.0技术手册
CAOSOFT_WEB_PRINT_LODOP.OCX, 有特殊需要的使用者可以将该文件自主签名, 用传统的 OCX 安装方式发布 (RegSvr32
c:\windows\system32\CAOSOFT_WEB_PRINT_lodop.ocx) 。
CheckActivX.js
该文件是用来引导安装控件的一个 JS 文件,是个样例,但建议直接采用。其中 CheckLodop 的任务是检查控件是否安装、是否最新版本、并引导安装或升级。文件内容 如下:
function CheckLodop(){
var oldVersion=LODOP.V
newVerion="3.0.0.0";
if (oldVersion==null){
document.write("打印控件未安装 ! 点击这里 ,安装后请刷新页面。 ");
if (navigator.appName=="Netscape")
document.write("(Firefox 浏 览 器 用 户 需 先 点 击 这 里 ) ");
} else if (oldVersion<newVerion)
document.write("打印控件需要升级 ! 点击这里 ,升级后请重新进入。 ");
其中的关键点是 Version 函数, Lodop 提供了一个“读版本号”功能, 这样控件的安 装和升级任务就交给 JS 来实现, 以下是控件在页面内的调用代码, 其中包含 CheckLodop 的利用:
以上两段代码相互配合实现了 Lodop 的安装、 调用和升级。 之所以将 CheckActivX.js 作为一个资源文件来部署,既可以利用浏览器的缓存减少页面内容的重复下载,同时还
Lodop技术手册_计算机软件及应用_IT/计算机_专业资料 暂无评价|0人阅读|0次下载|举报文档 Lodop技术手册_计算机软件及应用_IT/计算机_专业资料。WEB 打印控件 Lodop...最新版WEB打印控件LODOP技术手册 - 目 录 一、概述...SET_PRINT_PAGESIZE (2, 0, 0,&A4&); 设置纸张为 A4(按操作系统定义的 A4 尺寸) ,横向打印 9 Lodop 技术手册 ADD_PRINT_HTM 名称:增加超文本打印项(...LODOP.On_Return=function(TaskID,Value){ if (Value) alert(&已发出实际打印...Lodop3.0技术手册 22页 1下载券
web打印控件(Lodop) 7页 1下载券 喜欢...如果将 4 Lodop 技术手册 其复制或改名为 uninstall_lodop32.exe (或 uninstall_lodop64.exe)就可用来卸载控 件。 Lodop 安装后,在操作系统 Program Files\...Lodop6.1技术手册_冶金/矿山/地质_工程科技_专业资料 暂无评价|0人阅读|0次下载|举报文档Lodop6.1技术手册_冶金/矿山/地质_工程科技_专业资料。Lodop 技术手册 ...云打印C-Lodop技术手册 - C-Lodop 技术手册 C-Lodop 技术手册 Ver 2.0.9.0 Email:
QQ: ...Lodop技术手册6.2.1.5 - Lodop 技术手册 WEB 打印控件 Lodop 技术手册 Ver 6.2.1.5 Email:
QQ: 93...云打印C-Lodop技术手册2.1.1.2 - C-Lodop 技术手册 C-Lodop 技术手册 Ver 2.1.1.2 Email:
QQ: 93...WEB 打印控件 Lodop 技术手册 Ver 6.0.1.7 Email:
QQ:...Lodop6.0技术手册 42页 免费 Lodop5.0技术手册 35页 免费 spring3.0技术手册140...jquery - Javascript TypeError: this.init is not a function Error - Stack Overflow
Stack Overflow for Teams
A private, secure home for your team's questions and answers.
to customize your list.
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
This is my Javascript code
Html5Template_300x250 = function(config) {
this.config =
var self =
this.init();
Html5Template_300x250.prototype = {
// Function That Creates Element Var
d: function(id) {
return document.getElementById(id);
// Initialize DCO HTML5 template
init: function() {
alert("test1");
this.startAd();
startAd: function() {
alert("test2");
From the HTML file i am creating method like this
var sr_Config = {
bgColor:'#fff',
ctaText:'Learn More',
border: 'true'
var Html5Template = new Html5Template_300x250(sr_Config);
But i am getting Error
TypeError: this.init is not a function this.init();
I am not sure what is wrong here i have also tried self.init() but still it is not working.
I am new to javascript and learning OOPS in Javascript if anyone can tell me what i am doing wrong here that would be great. Thanks in advance
10.8k84676
You need to assing the methods to the prototypes properties (at least thats how i do it). You also need to do so before you call the function (above).
Html5Template_300x250 = function(config) {
this.config =
var self =
Html5Template_300x250.prototype.d = function(id) {
return document.getElementById(id);
Html5Template_300x250.prototype.startAd = function() {
alert("test2");
// Initialize DCO HTML5 template
Html5Template_300x250.prototype.init = function() {
alert("test1");
this.startAd();
self.init();
Another way to do this w/o the prototype-stuff would be sth. like that:
Html5Template_300x250 = function(config) {
this.config =
var self =
this.d = function(id) {
return document.getElementById(id);
// and so on..
self.d('myid');
See this working
with some sample code.
Further interesting reading on the topic OOP in JS is provided by JS-G)
6,91022243
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled利用lodop打印控件轻松实现批量打印 - ThinkPHP框架
最近在做一个打印程序,要实现批量打印功能,在网上找了很多天,也在tp官网咨询大牛们,对大家的的提议我一一进行了研究,总结如下:
要实现批量打印可以有两个办法:
一是利用专业的报表程序,能实现十分复杂的需求,但学习报表也是很痛苦的一件事,我专心研究了一天都没啥进展,也许我实在太菜了。这种方法推荐锐浪报表,免费还好用。
二是利用js插件实现,也在网上找了很多,最后感谢hunduncn,他建议我使用lodop(详见:http://www.thinkphp.cn/topic/12938.html),由于对html+css十分熟悉,所以上手不难,真的很好用。
Lodop(标音:劳道谱,俗称:露肚皮)是专业WEB控件,用它既可裁剪输出页面内容,又可用程序代码直接实现复杂打印。控件功能强大,却简单易用,所有调用如同javascript扩展语句。官网:http://www.lodop.net/,从官网下载的程序中有很多例子,也非常全面。
下面奉上代码:&html&xmlns=&http://www.w3.org/1999/xhtml&&
&meta&http-equiv=&Content-Type&&content=&text/&charset=utf-8&&/&
&title&无标题文档&/title&
&script&language=&javascript&&src=&LodopFuncs.js&&&/script&
&form&id=&form1&&
&a&href=&javascript:prn1_preview()&&打印预览&/a&&br/&
&a&href=&javascript:prn1_print()&&直接打印&/a&
&script&language=&javascript&&type=&text/javascript&&&&&
&&&&&&&&var&LODOP;&//声明为全局变量&
&&&&function&prn1_preview()&{&&&&
&&&&&&&&CreateOneFormPage();&&&&
&&&&&&&&LODOP.PREVIEW();&&&&
&&&&function&prn1_print()&{&&&&&&&&
&&&&&&&&CreateOneFormPage();
&&&&&&&&LODOP.PRINT();&&&&
&&&&function&CreateOneFormPage(){
&&&&&&&&LODOP=getLodop();&&
&&&&&&&&LODOP.PRINT_INIT(&打印控件功能演示_Lodop功能_表单一&);
&&&&&&&&LODOP.SET_PRINT_STYLE(&FontSize&,18);
&&&&&&&&LODOP.SET_PRINT_STYLE(&Bold&,1);
&&&&&&&&LODOP.ADD_PRINT_TEXT(50,231,260,39,&&);
&&&&&&&&LODOP.ADD_PRINT_HTM(88,200,350,600,document.getElementById(&form1&).innerHTML);
&/html&应该都能看懂,通过id操作,要是实现打印时候的样式导入,代码如下:&&&&function&CreateOneFormPage(){
&&&&&&&&LODOP=getLodop();&
&&&&&&&&var&strStyleCSS=&&link&href='print.css'&type='text/css'&rel='stylesheet'&&;
&&&&&&&&var&strFormHtml=strStyleCSS+&&body&&+document.getElementById(&form1&).innerHTML+&&/body&&;
&&&&&&&&LODOP.PRINT_INIT(&打印准考证&);
&&&&&&&&LODOP.ADD_PRINT_HTM(0,0,&100%&,&100%&,strFormHtml);
&&&&};ps:lodop的A4纸张,打印区域大小为758px*1090px
liangkaihua
积分:2739
ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。