CN101256488A - Design and implementing method of WEB printing component - Google Patents
Design and implementing method of WEB printing component Download PDFInfo
- Publication number
- CN101256488A CN101256488A CNA2008100154593A CN200810015459A CN101256488A CN 101256488 A CN101256488 A CN 101256488A CN A2008100154593 A CNA2008100154593 A CN A2008100154593A CN 200810015459 A CN200810015459 A CN 200810015459A CN 101256488 A CN101256488 A CN 101256488A
- Authority
- CN
- China
- Prior art keywords
- beginprint
- command
- out task
- web
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000013461 design Methods 0.000 title claims abstract description 4
- 238000005259 measurement Methods 0.000 claims description 5
- 238000012856 packing Methods 0.000 claims description 2
- 238000005538 encapsulation Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 2
- 241000208125 Nicotiana Species 0.000 description 1
- 235000002637 Nicotiana tabacum Nutrition 0.000 description 1
Abstract
The invention provides a design and implementing method for a WEB print component. The component is embedded into a browser in component manner, business recipe and report are printed in a WEB browser, controls are based on plane rectangular coordinate system, the left upper corner of the screen is the origin (0, 0), the right is the x axis, the lower is the y axis; the WEB print is implemented by the following control commands: writing a print task command doPrint (), the print task codes needed to be done are written in the method; a print task starts to call command beginPrint(), the command notifies a printer: if a print task exists, Windows displays a printer icon in the right lower corner of a screen, the printer receives the command and starts printing formally; calling a command endPrint() when the print task is finished, canceling the print task with abortPritn() before beginPrint (), the command must match with beginPrint(), calling the method after executing the print codes, thus realizing print of texts, graphs and charts, and supporting color print and embedded print.
Description
Technical field
The present invention relates to computer software fields, be mainly used in the printing of the business paper and the complex report forms of WEB application system, is a kind of assembly of realizing browser print function.
Technical background
The exploitation of OCX control is fast simple, and it is convenient to use and dispose, and the ActiveX power makes the WEB application system be extensive use of, and is used to realize specific function.The tobacco operation system is printed in the face of various business paper and the query preview of various complex report forms is printed, through summing up experience for many years, form the perfect document print format control of a cover, the preview of complex figure table table, wieldy document is printed and the form developing instrument.In the operation system use, enjoy the client to welcome.
Summary of the invention
The objective of the invention is to realize,, make the OCX control, install, solve the problem that browser is printed document and complex report forms by the WEB browser downloads by Dephi encapsulation printing function based on the ActiveX framework.
The objective of the invention is to realize in the following manner, realize that WEB of the present invention prints, embed browser with kit form, under the WEB browser, realize print service document, form, control is based on plane right-angle coordinate, is origin (0,0) with the upper left corner of screen, being to the right the x axle, is downwards the y axle; Control command is as follows:
Write print out task order doPrint (), the print out task code that do is write in the method;
Print out task begins call instruction beginPrint (), this order notice printer: print out task is arranged, and Windows can show printer icon in the screen lower right corner, and after printer received this order, beginning was formally printed;
Print out task finishes call instruction endPrint (), at beginPrint () before, cancels print out task with abortPrint (), and this order must be matched with beginPrint (), calls this method after carrying out print code.
Printing English character measurement unit measurement unit is 0.1mm, is unit description with the inch, and maximal accuracy is 0.5 inch.
Call the Windows printing interface by Dephi, with printing character, line, figure, the chart function package becomes interface, packing is packaged into the OCX control, calls among the js, based on plane right-angle coordinate, be easy to the location and write print routine, download and install after the OCX control, realize printing, preview, self-defined paper size and margin setting.
Excellent effect of the present invention is to use simply, and the exploitation business paper is printed, and programming is simple, easily, increases work efficiency.
Embodiment:
When the present invention uses, only need in the page, to quote this control, realize the printing interface of unified encapsulation, in interface is realized, call the method for encapsulation, finish the realization that business paper is printed.
This control is based on plane right-angle coordinate.The upper left corner with screen is origin (0,0).Being to the right the x axle, is downwards the y axle.
For example, it is then as follows to print a character string:
PrintStr (x1, y1, " String "); String: the character that print, it can from left to right print a character string.Measurement unit is 0.1mm, and providing in addition with the inch is the method for unit, and for example: printable character string printStrInch (x, y, " String ") x, y is to be the coordinate of unit description with the inch.If with the inch is unit description, maximal accuracy is 0.5 inch.
Write the method doPrint () of print out task, the print out task code that do is write in the method; Print out task begins call method beginPrint (), this method notice printer: print out task is arranged, and Windows can show printer icon in the screen lower right corner.At endPrint () before, your code of straight line band is costly, can cancel print out task with abortPrint ().Print out task finishes call method endPrint (), and after printer received this order, beginning was formally printed.This method must be matched with beginPrint ().Must after carrying out print code, call this method.
The printing function use-case:
<html>
<script?language=”javascript”>
function?doPrint(){
SetPrintName (" printing test ");
setPageSize(2970,2100);
setOrientation(1);
BeginPrint (); // must call this method
DrawText (" printable character string ", 500,500,1910,2700,7);
setFontSize(20);
DrawText (" printable character string ", 1000,1000,1910,2700,7);
setFontSize(10);
setFontColor(255);
setFontStyle(15);
SetFontName (" regular script _ GB2312 ");
DrawText (" printable character string ", 1000,1500,1910,2700,7);
drawLine(500,500,1000,1000,10);
DrawText (" printable character string ", 1000,2000,1910,2700,7);
PrintStr (1000,2000, " printable character string ");
drawPicture(200,300,500,700,”d:\\picture\\print.jpg”,0,0,0)
drawPicture(600,800,1500,2000,”http://www.163.com/print.jpg”,0,0,0)
EndPrint (); // must call this method
}
</script>
<body>
<input type=" button " name=" printBtn " onclick=" excusePrint () " value=" test "
/>
</body>
</html>。
Claims (3)
1, the design of WEB print components and implementation method, it is characterized in that, WEB prints with kit form and embeds browser, print service document, form under the WEB browser, control is based on plane right-angle coordinate, is origin (0,0) with the upper left corner of screen, being to the right the x axle, is downwards the y axle; Control command is as follows:
Write print out task order doPrint (), the print out task code that do is write in the method;
Print out task begins call instruction beginPrint (), this order notice printer: print out task is arranged, and Windows can show printer icon in the screen lower right corner, and after printer received this order, beginning was formally printed;
Print out task finishes call instruction endPrint (), at beginPrint () before, cancels print out task with abortPrint (), and this order must be matched with beginPrint (), calls this method after carrying out print code.
2, implementation method according to claim 1 is characterized in that, printing English character measurement unit measurement unit is 0.1mm, is unit description with the inch, and maximal accuracy is 0.5 inch.
3, implementation method according to claim 1, it is characterized in that, call the Windows printing interface, with printing character, line, figure by Dephi, the chart function package becomes interface, packing is packaged into the OCX control, calls in js, based on plane right-angle coordinate, conveniently locate and write print routine, download and install after the OCX control, realize printing, preview, self-defined paper size and margin setting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100154593A CN101256488A (en) | 2008-03-28 | 2008-03-28 | Design and implementing method of WEB printing component |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100154593A CN101256488A (en) | 2008-03-28 | 2008-03-28 | Design and implementing method of WEB printing component |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101256488A true CN101256488A (en) | 2008-09-03 |
Family
ID=39891335
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008100154593A Pending CN101256488A (en) | 2008-03-28 | 2008-03-28 | Design and implementing method of WEB printing component |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101256488A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101387948A (en) * | 2008-11-07 | 2009-03-18 | 用友软件股份有限公司 | Form printing method and system |
CN104228368A (en) * | 2014-07-31 | 2014-12-24 | 东莞市福欣电脑科技有限公司 | Method for continuous printing without page division under WINDOWS system |
CN104394291A (en) * | 2014-10-30 | 2015-03-04 | 浙商银行股份有限公司 | Endorsement scanning and content input fixed point printing method based on an all-in-one scanner and printer |
CN107608640A (en) * | 2016-07-12 | 2018-01-19 | 顺丰速运有限公司 | Bluetooth print preview method |
CN109976683A (en) * | 2019-02-28 | 2019-07-05 | 广州达安临床检验中心有限公司 | Method of printing, device, equipment and the storage medium of data |
-
2008
- 2008-03-28 CN CNA2008100154593A patent/CN101256488A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101387948A (en) * | 2008-11-07 | 2009-03-18 | 用友软件股份有限公司 | Form printing method and system |
CN104228368A (en) * | 2014-07-31 | 2014-12-24 | 东莞市福欣电脑科技有限公司 | Method for continuous printing without page division under WINDOWS system |
CN104228368B (en) * | 2014-07-31 | 2018-08-31 | 东莞市福欣电脑科技有限公司 | A kind of method of continuous not print page under WINDOWS systems |
CN104394291A (en) * | 2014-10-30 | 2015-03-04 | 浙商银行股份有限公司 | Endorsement scanning and content input fixed point printing method based on an all-in-one scanner and printer |
CN104394291B (en) * | 2014-10-30 | 2018-02-27 | 浙商银行股份有限公司 | Endorsement scanner uni content input fixed point Method of printing based on integrating scanning and printing machine |
CN107608640A (en) * | 2016-07-12 | 2018-01-19 | 顺丰速运有限公司 | Bluetooth print preview method |
CN109976683A (en) * | 2019-02-28 | 2019-07-05 | 广州达安临床检验中心有限公司 | Method of printing, device, equipment and the storage medium of data |
CN109976683B (en) * | 2019-02-28 | 2022-08-02 | 广州达安临床检验中心有限公司 | Data printing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102622211B (en) | A kind of method and apparatus of application development | |
CN106528006B (en) | Page printing method and device | |
CN101256488A (en) | Design and implementing method of WEB printing component | |
AU2008363368B2 (en) | Label printer API using program scripting language | |
CN108228180A (en) | Real time workshop method and system based on visual interface design | |
CN104461412A (en) | Web page designated area printing method and system | |
CN102831154B (en) | The method and apparatus of data in the Text Entry of preservation and display web page | |
CN101078989A (en) | Visio file cross-platform network browser implementation method and software | |
KR101682455B1 (en) | System and method for injecting run-time programming code in a printing device | |
CN101146119A (en) | A device and method for browser-cross self-adapted call of local function | |
CN102662984A (en) | HTML(hypertext markup language)-based multi-platform message handling method | |
JP2004341675A (en) | Development system, electronic form using system, server, program, and recording medium | |
JP2017033052A (en) | Control device and program in image forming apparatus | |
CN100383790C (en) | HTTP web page dynamic outputting method and system | |
JP4783225B2 (en) | Print control program and information processing apparatus | |
CN100543700C (en) | The method of customizing extract operation information and device in a kind of software execute process | |
JP2008234119A (en) | Print controller capable of coping with xml document format | |
JP2007241877A (en) | Print controller, print control method, print control program, and storage medium | |
JP2007018029A (en) | Network device | |
CN102662844B (en) | A kind of method of data tracking when linux kernel starts | |
JP6160291B2 (en) | Screen creation support program, screen creation support device, and screen creation support method | |
JP7234687B2 (en) | modules and programs | |
JP2013080386A (en) | Information processing device and address management method | |
JP7290073B2 (en) | program | |
JP5600960B2 (en) | Host computer, print data generation method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |