[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN102866868B - GDI hook technology is utilized to realize the method for watermark printing - Google Patents

GDI hook technology is utilized to realize the method for watermark printing Download PDF

Info

Publication number
CN102866868B
CN102866868B CN201210327726.7A CN201210327726A CN102866868B CN 102866868 B CN102866868 B CN 102866868B CN 201210327726 A CN201210327726 A CN 201210327726A CN 102866868 B CN102866868 B CN 102866868B
Authority
CN
China
Prior art keywords
watermark
printing
bitmap
page
gdi
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.)
Active
Application number
CN201210327726.7A
Other languages
Chinese (zh)
Other versions
CN102866868A (en
Inventor
牟流
金魁
宋非
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
360 Digital Security Technology Group Co Ltd
Original Assignee
SHENYANG GENERALSOFT CO Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHENYANG GENERALSOFT CO Ltd filed Critical SHENYANG GENERALSOFT CO Ltd
Priority to CN201210327726.7A priority Critical patent/CN102866868B/en
Publication of CN102866868A publication Critical patent/CN102866868A/en
Application granted granted Critical
Publication of CN102866868B publication Critical patent/CN102866868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of method that the GDI of utilization hook technology realizes watermark printing, the method comprises acquisition watermark feature, install to print and filter, catch printing, analyze printing, generate watermark bitmap, draw watermark, the method is applicable to dissimilar printer apparatus, by adopting GDI hook technology, when not replacing printed driver, can to being set to text, picture, the watermark of handwriting tracks is carried out accurately, printing speed, simultaneously, this method has nothing to do with the application program initiating printing, achieve the versatility that watermark prints, drastically increase the efficiency printing watermark, efficient salvo is provided for printing behavior mandate and divulging a secret to trace to the source.

Description

GDI hook technology is utilized to realize the method for watermark printing
Technical field
The invention belongs to computer security technique field, relate to the watermark Method of printing that a kind of protected data prevents from safely divulging a secret, particularly relate to a kind of method that the GDI of utilization hook technology realizes watermark printing.
Background technology
At present, printing device has been widely used in working environment, for people bring convenience while also improve the risk that confidential information leaks.In order to authorize the document print behavior comprising the important informations such as company's secret, finance, need a kind of printed signature technology, meanwhile, this signature technology is also traced to the source for divulging a secret and is provided important evidence.Current, printed signature technology mainly contains two kinds: the first is manual mode, requires that printing person or other related personnel sign, when file number of pages is a lot of on each page file printed, one by one in every one page good sign name very labor intensive and time, efficiency is very low; The second utilizes watermark printing technique by signature process robotization, in print procedure, is automatically every page and embeds watermark, not only substantially increase work efficiency, also maintain unitarity and the accuracy of signature contents simultaneously.
In the prior art, the method realizing watermark printing is the printed driver printed by the watermark that provides support, and is embedded in printer page, completes watermark print procedure by this driver by watermark.The driver that the method first must adjust every platform printer is arranged, and original driver is replaced with the driver supporting that watermark prints.In a fairly large network environment, some printers may be there are, in adjustment network, the driver of all printers arranges and can consume certain manpower and time, produce extra cost, and when purchasing new printer or movement and again settle printer, also need to adjust its driver.
Therefore need a kind of watermark Method of printing, under the prerequisite of not replacing the original printed driver of printer, realize watermark and print.
Summary of the invention
The invention provides and utilize GDI(Graphics Device Interface) hook technology realize watermark print method, for solving the deficiencies in the prior art part.Under the prerequisite of not replacing printed driver, realize watermark and print.
For solving the problems of the technologies described above, the present invention adopts following technical scheme:
Utilize GDI hook technology to realize the method for watermark printing, comprise following steps:
A. watermark feature is obtained: obtain watermark feature, by this watermark characteristic storage in internal memory;
Described watermark feature comprises: watermark Source Type, watermark source value, transparency, angle;
Described watermark Source Type comprises: text, picture, handwriting tracks;
B. install print filter: by carry GDI(Graphics Device Interface) printed document event notice routine, complete install print filter.
C. printing is caught: utilize printing filtration to catch printing, obtain the contextual information entrained by printing;
Described contextual information comprises: event type, device context handle (device context handle);
Described event type comprises: create device context, start print job, start the page, terminate the page, terminate print job, sweep equipment context, reconfiguring equipment context;
D. analyze printing: the event type in the contextual information entrained by printing judges, if event type starts the page, then continue to perform step e; If event type is not start the page, then terminate;
E. watermark bitmap is generated: create a compatible bitmap (compatible bitmap), according to described watermark Source Type, transparency, angle, watermark source value be plotted in described compatible bitmap;
F. watermark is drawn: be plotted on printer page by described watermark bitmap.
In described step f, described watermark bitmap is plotted on printer page, further comprising the steps:
F1. obtain the background mixed mode (background mix mode) of device context handle, this background mixed mode is kept in internal memory;
F2. the background mixed mode of device context handle is set to transparent mode;
F3. watermark bitmap is plotted on printer page;
F4. the background mixed mode of device context handle is reverted in step f1 the background mixed mode be kept in internal memory.
Beneficial effect of the present invention is: the method is applicable to dissimilar printer apparatus; by adopting GDI hook technology; when not replacing printed driver; can to be set to text, picture, handwriting tracks watermark carry out accurately, printing speed; simultaneously; this method has nothing to do with the application program initiating printing; achieve the versatility that watermark prints; drastically increase the efficiency printing watermark, provide efficient salvo for printing behavior mandate and divulging a secret to trace to the source.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method that watermark of the present invention prints;
Fig. 2 is the process flow diagram of the step f of the method that watermark of the present invention prints;
Fig. 3 is the structural representation of embodiments of the invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with real-time mode and accompanying drawing, the present invention is described in further details.At this, the shows in schematic form of the embodiment of the present invention and illustrating for explaining the embodiment of the present invention, but not as the restriction to the embodiment of the present invention.
As shown in Figure 3, such as in a large-scale network environment, this network environment comprises hand-written drawing input equipment 301, computing machine 302, printing server 303, public printing device, this public printing device is the printer 304 that a Daepori is logical, by obtaining watermark feature on computer 302, installing operations such as printing filtration, then, realize printer 304 watermark is printed accurately and efficiently.Such as, printing personnel print the EXCEL document that a number of pages is 100 pages, document title is " company Annual financial statement .xls " on computer 302, in order to guarantee company's financial statement output safety, need printing personnel on every one page of corporate financial statements, sign the name " Han Mei " of printing personnel in the mode of watermark, printing personnel by inputting " Han Mei " on hand-written drawing input equipment 301, and generate " signature .jpg " picture, by USB interface will " signature .jpg " be saved to computing machine 302 D: work under path.Meanwhile, require that the transparency of " signature .jpg " is set to 80% by printing personnel, the angle in corporate financial statements is set to+15 degree (horizontal level).
As shown in Figure 1, the GDI of the utilization hook technology of the present invention step that realizes watermark Method of printing is as follows:
A. obtain watermark feature 101: computing machine 302 obtains watermark feature: watermark Source Type is picture, watermark source value be D: work signature .jpg, transparency 80%, angle+15 spend (horizontal level), and by described watermark characteristic storage in internal memory;
B. install and print filtration 102: computing machine 302, by the printed document event notice routine of carry Graphics Device Interface (GDI), completes to install to print and filters;
C. printing 103 is caught: computing machine 302 utilizes printing filtration to catch printing, obtains event type " the beginning page ", device context handle (device context handle) entrained by printing;
D. analyze printing 104: the event type that computing machine 302 carries according to printing judges, this event type of the present embodiment starts the page, continues to perform step e, to generate watermark bitmap; (if event type is not start the page, then terminate, can not generate watermark bitmap);
E. watermark bitmap 105 is generated; Computing machine 302 creates a compatible bitmap (compatible bitmap), is plotted in described compatible bitmap by described watermark Source Type " picture ", watermark source value " D: work signature .jpg ", transparency 80%, angle+15 degree (horizontal level);
F. watermark 106 is drawn: described compatible bitmap is plotted on printer page, below concrete steps by computing machine 302:
Step 201: the background mixed mode (background mix mode) " non-transparent mode " of the device context handle that computing machine 302 obtaining step 103 captures, by this background mixed mode---" non-transparent mode " is kept in internal memory;
Step 202: the background mixed mode of described device context handle is set to transparent mode by computing machine 302;
Step 203: the compatible bitmap that step 105 generates by computing machine 302 is plotted on printer page;
Step 204: the background mixed mode " transparent mode " of device context handle is reverted to step 201 and is kept at " non-transparent mode " in internal memory by computing machine 302.
Pass through said method, without the need to adjusting the driver of printing server 303, computing machine 302 is according to the compatible bitmap of watermark feature-modeling, and this compatible bitmap is plotted on printer page, then, perform common printing, it is the corporate financial statements .xls of 100 pages embeds transparency is 80%, angle be+15 degree (horizontal level) words to sign the print procedures of " Han Mei " that printer 304 can complete number of pages.
Said method avoids by artificial mode the process of the more document of number of pages carrying out a large amount of signature, save the more time, not only increase the work efficiency of signature, ensure that accuracy and the unitarity of signature, also improve the security of confidential document simultaneously, effectively stop the behavior that leaks of confidential document.
Method of the present invention is not only applicable to the watermark pattern of picture, and is applicable to handwriting tracks and text.Under comparatively complex network environment, by adopting GDI hook technology, without the need to replacing printed driver, all can realize the accurate printing of watermark, achieving the versatility that watermark prints, saving a large amount of manpowers and material resources, greatly improve work efficiency.

Claims (2)

1. utilize GDI hook technology to realize a method for watermark printing, comprise following steps:
A. watermark feature is obtained: obtain watermark feature, by this watermark characteristic storage in internal memory;
Described watermark feature comprises: watermark Source Type, watermark source value, transparency, angle;
Described watermark Source Type comprises: text, picture, handwriting tracks;
B. install to print and filter: by the printed document event notice routine of carry GDI, complete to install to print and filter;
C. printing is caught: utilize printing filtration to catch printing, obtain the contextual information entrained by printing;
Described contextual information comprises: event type, device context handle;
Described event type comprises: create device context, start print job, start the page, terminate the page, terminate print job, sweep equipment context, reconfiguring equipment context;
D. analyze printing: the event type in the contextual information entrained by printing judges, if event type starts the page, then continue to perform step e; If event type is not start the page, then terminate;
E. watermark bitmap is generated: create a compatible bitmap, according to described watermark Source Type, transparency, angle, watermark source value be plotted in described compatible bitmap;
F. watermark is drawn: be plotted on printer page by described watermark bitmap.
2. utilize GDI hook technology to realize the method for watermark printing as claimed in claim 1, it is characterized in that: in described step f, watermark bitmap is plotted on printer page, comprises the following steps:
F1. obtain the background mixed mode of device context handle, this background mixed mode is kept in internal memory;
F2. the background mixed mode of device context handle is set to transparent mode;
F3. watermark bitmap is plotted on printer page;
F4. the background mixed mode of device context handle is reverted in step f1 the background mixed mode be kept in internal memory.
CN201210327726.7A 2012-09-07 2012-09-07 GDI hook technology is utilized to realize the method for watermark printing Active CN102866868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210327726.7A CN102866868B (en) 2012-09-07 2012-09-07 GDI hook technology is utilized to realize the method for watermark printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210327726.7A CN102866868B (en) 2012-09-07 2012-09-07 GDI hook technology is utilized to realize the method for watermark printing

Publications (2)

Publication Number Publication Date
CN102866868A CN102866868A (en) 2013-01-09
CN102866868B true CN102866868B (en) 2015-09-02

Family

ID=47445753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210327726.7A Active CN102866868B (en) 2012-09-07 2012-09-07 GDI hook technology is utilized to realize the method for watermark printing

Country Status (1)

Country Link
CN (1) CN102866868B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268205A (en) * 2013-04-16 2013-08-28 深圳市科曼医疗设备有限公司 Embedded laser printing method and printing device
CN109388352A (en) * 2017-10-24 2019-02-26 浙江华途信息安全技术股份有限公司 Print water mark method and system
CN112035804B (en) * 2020-09-01 2024-03-15 珠海豹趣科技有限公司 Method and device for inserting watermark identification in document page, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089807A (en) * 2006-06-16 2007-12-19 光宝科技股份有限公司 Printing method and device for floating print
CN101882059A (en) * 2009-05-05 2010-11-10 山东新北洋信息技术股份有限公司 Method and device for controlling and processing watermark printing
US8234496B1 (en) * 2009-03-06 2012-07-31 Trend Micro, Inc. Image leak prevention using digital watermark

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101408836B (en) * 2007-10-09 2010-08-18 北京书生国际信息技术有限公司 Print implementing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089807A (en) * 2006-06-16 2007-12-19 光宝科技股份有限公司 Printing method and device for floating print
US8234496B1 (en) * 2009-03-06 2012-07-31 Trend Micro, Inc. Image leak prevention using digital watermark
CN101882059A (en) * 2009-05-05 2010-11-10 山东新北洋信息技术股份有限公司 Method and device for controlling and processing watermark printing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于HOOK 技术的本地打印监控系统开发;李华来等;《计算机工程与设计》;20110131;第32卷(第1期);第374-375页 *

Also Published As

Publication number Publication date
CN102866868A (en) 2013-01-09

Similar Documents

Publication Publication Date Title
CN103500296A (en) Inlaying method and device of digital watermarks in text documents
CN104516891A (en) Layout analyzing method and system
CN104572597A (en) Automatic word analysis report generation method and device
CN102866868B (en) GDI hook technology is utilized to realize the method for watermark printing
EP2345956A3 (en) Information processing apparatus, information processing apparatus control method, and storage medium
Arndt et al. 3D structural model of the Federal State of Hesse (Germany) for geopotential evaluation
CN101859225A (en) Method for implementing words and tables rapidly entering by digital red drawing
CN102467519B (en) Visualization plotting method and system based on geographic information system
JP2009265903A (en) Information management system, form definition management server and information management method
CN102591849B (en) Document format conversion method and device
DE102019131230A1 (en) ENERGY EFFICIENT TOUCH PROCESSING
CN102135865B (en) Method and device for printing engineering drawings in batches
CN102541483A (en) Method and system for digital printing of book
CN103810564A (en) Quality control Addon management system
CN109388812A (en) A kind of modularization automatic map delivery method and system based on cloud computing
CN106020740B (en) The method of backup is printed under a kind of Windows environment
CN104423898A (en) Digital printing method and device
CN103324396A (en) Method for performing editing on handwriting image
CN103942187A (en) Page makeup method and device
CN103559271A (en) Method for generating bitmap font library with gray level
CN109741417B (en) Method and device for generating graphic file, computing equipment and storage medium
CN104933021A (en) Prepress checking and version transmitting method and apparatus
CN107783737A (en) A kind of cross-platform Method of printing and system
JP2012008799A (en) Electronic document creation device, electronic document creation method and computer program
KR101048309B1 (en) Method and apparatus for printing document

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP02 Change in the address of a patent holder

Address after: Hunnan New District Wenhui street Shenyang city Liaoning province 110002 No. 19 Jin Penglong high tech Industrial Park No. 21

Patentee after: Shenyang GeneralSoft Co.,Ltd.

Address before: 2, 8-1 floor, 110002 Antu street, Heping District, Liaoning, Shenyang

Patentee before: Shenyang GeneralSoft Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210720

Address after: 100020 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee after: Beijing Hongteng Intelligent Technology Co.,Ltd.

Address before: No. 21, jinpenglong high tech Industrial Park, No. 19, Wenhui street, Hunnan New District, Shenyang, Liaoning 110002

Patentee before: SHENYANG GENERALSOFT Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100020 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee after: Sanliu0 Digital Security Technology Group Co.,Ltd.

Address before: 100020 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee before: Beijing Hongteng Intelligent Technology Co.,Ltd.