CN108646988B - Document printing method and system - Google Patents

Document printing method and system Download PDF

Info

Publication number
CN108646988B
CN108646988B CN201810229525.0A CN201810229525A CN108646988B CN 108646988 B CN108646988 B CN 108646988B CN 201810229525 A CN201810229525 A CN 201810229525A CN 108646988 B CN108646988 B CN 108646988B
Authority
CN
China
Prior art keywords
function
text page
content
parameter value
printing
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
CN201810229525.0A
Other languages
Chinese (zh)
Other versions
CN108646988A (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.)
Beijing Wondersoft Technology Co Ltd
Original Assignee
Beijing Wondersoft Technology 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 Beijing Wondersoft Technology Co Ltd filed Critical Beijing Wondersoft Technology Co Ltd
Priority to CN201810229525.0A priority Critical patent/CN108646988B/en
Publication of CN108646988A publication Critical patent/CN108646988A/en
Application granted granted Critical
Publication of CN108646988B publication Critical patent/CN108646988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1222Increasing security of the print job
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1238Secure printing, e.g. user identification, user rights for device usage, unallowed content, blanking portions or fields of a page, releasing held jobs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page
    • G06F3/1243Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server

Abstract

The embodiment of the invention provides a document printing method and a system, wherein the method comprises the following steps: intercepting a StartDoc function; obtaining a first HDC parameter value of the StartDoc function; intercepting an ExtTextOut function; acquiring a second HDC parameter value of the ExtTextOut function; if the first HDC parameter value is the same as the second HDC parameter value, acquiring text page content to be printed in the ExtTextOut function; judging whether the content of the text page comprises preset keywords or not; if yes, adding a preset watermark to the content of the text page when an EndPage function is intercepted; printing the text page content added with the preset watermark; if not, printing the text page content when an EndPage function is intercepted. The invention can only print the watermark aiming at the text page with the sensitive data, thereby greatly reducing the service processing burden, ensuring the safety of the printed sensitive data and avoiding the risk that the sensitive data is embezzled due to the watermark-free printing.

Description

Document printing method and system
Technical Field
The invention relates to the technical field of computer security, in particular to a document printing method and a document printing system.
Background
As more and more office systems are shifted to a B/S (browser/server) structure, a user can conveniently perform a function operation using a browser without installing additional terminal software. However, when a browser accesses a business system to request a document (e.g., a financial form, a business report) to be printed, the prior art watermark control method for the document mainly includes inhibiting printing, or adding a watermark indiscriminately, or allowing printing, but the printed document has no watermark.
As shown in fig. 1, in the prior art, after intercepting a printing operation, if a data source of a document to be printed is found to be a sensitive business system, watermarks are inserted into all documents to be printed from the sensitive business system, so as to print the document with the watermarks; and if the data source of the document to be printed is not the sensitive service system, the watermark picture is not inserted into the document to be printed, and the document to be printed is directly output to the printer for printing.
However, in practical applications, all the data printed in the sensitive business system are not sensitive documents, and on the contrary, most of the documents are only common data (i.e., no watermark needs to be added); and a small amount of documents of the printed data in the non-sensitive business system relate to sensitive data, so that watermarks need to be added, and data embezzlement is avoided. In the prior art, the scheme of whether the service system purely depending on the data source is a sensitive system or a non-sensitive system is used as a basis for adding the watermark to the print data, so that the service burden is increased unnecessarily, the service is inconvenient, and the security of the sensitive data is reduced.
Disclosure of Invention
The invention provides a document printing method and a document printing system, which aim to solve the problems of large business processing burden and low safety of printed sensitive data in a document printing scheme in the prior art.
In a first aspect, an embodiment of the present invention provides a document printing method, where the method includes:
intercepting a StartDoc function;
obtaining a first HDC parameter value of the StartDoc function;
intercepting an ExtTextOut function;
acquiring a second HDC parameter value of the ExtTextOut function;
if the first HDC parameter value is the same as the second HDC parameter value, acquiring text page content to be printed in the ExtTextOut function;
judging whether the content of the text page comprises preset keywords or not;
if yes, adding a preset watermark to the content of the text page when an EndPage function is intercepted;
printing the text page content added with the preset watermark;
if not, printing the text page content when an EndPage function is intercepted.
In a second aspect, an embodiment of the present invention further provides a document printing system, where the document printing system includes:
the first interception module is used for intercepting a StartDoc function;
a first obtaining module, configured to obtain a first HDC parameter value of the StartDoc function;
the second interception module is used for intercepting an ExtTextOut function;
a second obtaining module, configured to obtain a second HDC parameter value of the ExtTextOut function;
a third obtaining module, configured to obtain text page content to be printed in the ExtTextOut function if the first HDC parameter value is the same as the second HDC parameter value;
the first judgment module is used for judging whether the content of the text page comprises preset keywords or not;
the first adding module is used for adding a preset watermark to the text page content when an EndPage function is intercepted if the first judging module judges that the text page content comprises a preset keyword;
the first printing module is used for printing the text page content added with the preset watermark;
and the second printing module is used for printing the text page content when an EndPage function is intercepted if the first judging module judges that the text page content does not comprise the preset keywords.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the document printing method.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the document printing method.
Compared with the prior art, the invention has the following advantages:
the invention intercepts each page of text content in the printed document in real time, searches the preset keywords, adds the watermark to the page of text content for printing when the preset keywords are contained in the text content, and does not add the watermark for printing under other conditions, thereby only carrying out the watermark printing on the text page with the sensitive data, greatly reducing the business processing burden, ensuring the safety of the printed sensitive data and avoiding the risk that the sensitive data is embezzled due to the waterless printing.
Drawings
FIG. 1 is a flow chart of a document printing method in the prior art;
FIG. 2 is a flowchart illustrating the steps of one embodiment of a method for printing a document in accordance with the present invention;
FIG. 3 is a flowchart illustrating the steps of another method embodiment of the present invention for printing a document;
FIG. 4 is a block diagram of a document printing system embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to FIG. 2, a flow chart of steps of one embodiment of a method of printing a document of the present invention is shown; FIG. 3 is a flow chart illustrating the steps of another document printing method embodiment of the present invention.
The document printing method of the present invention will be described in detail below with reference to fig. 2 and 3.
Windows provides several functions for printers only. The functions that are limited to the printer (including StartDoc, EndDoc, StartPage, and EndPage) are responsible for printing the output texture of the printer onto the sheet. The document printing method of the embodiment of the invention needs to intercept the StartDoc and EndPage functions.
Referring to fig. 2, the method may specifically include the following steps:
step 101, intercepting a StartDoc function;
in one example, as shown in fig. 3, when the browser starts to perform a print operation, the method of an embodiment of the present invention may intercept the StartDoc function, thereby determining a target browser that invokes a print command;
when the interception operation is specifically performed, as shown in fig. 3, the StartDoc module may perform the operation of step 101.
When the StartDoc function is intercepted, the StartDoc function can be intercepted by using the Hook technology, and the function is the first function which is necessarily called after a printing command is sent out, so that the method of the embodiment of the invention can determine that printing is about to start by intercepting the StartDoc function; in addition, in the StartDoc function, the method of the embodiment of the present invention may determine which browser to invoke the print command is, so that in a subsequent process, the printing behavior of the browser may be supervised all the time, and the printed document may be watermarked according to an actual scene.
Step 102, obtaining a first HDC parameter value of the StartDoc function;
the StartDoc module may also obtain a value of an HDC parameter (e.g., HDC handle value) of the StartDoc function.
Optionally, step 103, storing the first HDC parameter value to a global memory;
in the following step, it is determined whether behaviors of the browser calling the StartDoc function and the subsequent ExtTextOut function are printing behaviors by comparing two HDC parameter values, and the two functions are not in one process but in different processes, so in order to compare the parameter values of the two functions, the first HDC parameter value of the StartDoc function needs to be stored in a global memory and is recorded as S _ HDC, so that the subsequent comparison is facilitated.
Step 104, intercepting an ExtTextOut function;
since it is determined which browser calling the StartDoc function is, named as the target browser, when step 101 is executed, the ExtTextOut function called by the target browser may be intercepted when step 104 is executed, so as to supervise and add watermark control to the printing behavior of the target browser.
As shown in FIG. 3, the execution of step 104 may be implemented by an ExtTextOut module, which may utilize Hook technology to intercept an ExtTextOut function into which all text content that needs to be printed, e.g., text content of different pages, is entered, so the method of embodiments of the present invention requires the interception of the ExtTextOut function.
Wherein ExtTextOut may provide an optional rectangle for cropping or opacity or both. A character string is drawn with the currently selected font, background color and body color.
Step 105, acquiring a second HDC parameter value of the ExtTextOut function;
as shown in fig. 3, the ExtTextOut module may also obtain an HDC parameter value (e.g., HDC handle value) of the ExtTextOut function.
Optionally, step 106, storing the second HDC parameter value to a global memory;
as shown in fig. 3, in the subsequent step, it needs to compare two HDC parameter values of the StartDoc function and the ExtTextOut function to determine whether behaviors of the browser calling the StartDoc function and the ExtTextOut function are printing behaviors, and the two functions are not in one process but in different processes, so in order to compare the parameter values of the two functions, it is necessary to store the second HDC parameter value of the ExtTextOut function in the global memory, which is denoted as E _ HDC, so as to facilitate the subsequent comparison.
Optionally, in step 107, it is determined whether the first HDC parameter value and the second HDC parameter value stored in the global memory are the same.
As shown in fig. 3, comparing the first HDC parameter value and the second HDC parameter value in the global memory;
optionally, as shown in fig. 3, if the parameter values of S _ HDC and E _ HDC are different, the watermarking printing behavior of the method according to the embodiment of the present invention is not performed, that is, the process is not processed, and the flow is ended.
If the parameter values of S _ HDC and E _ HDC are the same, step 108, acquiring the text page content to be printed in the ExtTextOut function;
when the first HDC parameter value and the second HDC parameter value are the same, it indicates that the two functions are called by the browser due to the printing action, rather than the normal screen display, and therefore, the text page content to be printed in the ExtTextOut function needs to be acquired here.
Since the printed text is generally in page units, the text content input to the ExtTextOut function is a page of content to be printed, and certainly, the document to be printed does not only include only a page of content, but the flow of the method of the embodiment of the present invention is the flow of the method shown in fig. 2 and 3 performed on each page of text content input to the ExtTextOut function, so as to monitor the entire content of a document and flexibly determine whether to add a watermark to each page of content.
Step 109, judging whether the content of the text page comprises preset keywords;
as shown in fig. 3, a keyword library may be obtained, where the keyword library is preset with all keywords related to sensitive information, each preset keyword in the keyword library and text page content to be printed (i.e., text character strings) in the ExtTextOut function are input into a keyword scanning engine module of the system of the present invention, and then the keyword scanning engine module matches each character string in the text page content with each preset keyword, so as to determine whether the text page content includes preset keywords, i.e., sensitive data.
For the policy how to define that the text page content includes the preset keyword (that is, when the text page content and the preset keyword have what matching result, it is determined that the text page content and the preset keyword match), it may be that the text page content includes at least one preset keyword, and then it is determined that the text page content includes the preset keyword (that is, it is determined that the text page content and the preset keyword match); or determining the preset keywords of the text page content package only when the text page content includes a preset number of keywords (namely determining that the two are matched); it may also be determined that the text page content includes the preset keyword (i.e. it is determined that the two are matched) only when the number of the preset keyword included in the text page content is more than a preset percentage of the total number of the characters of the text page content. Of course, the policy is not limited thereto, and may be other non-enumerated policies.
Alternatively, as shown in fig. 3, if the text page content does not include the preset keyword (i.e. they do not match), when the EndPage function is intercepted (where, since the EndPage function is called before the end of the printed page of document, when the EndPage function is intercepted, it indicates that the content of the document to be printed is coming in, the text page content is left unprocessed (i.e. without adding the watermark), and the text page content is printed, i.e. output to the printer for waterless printing.
As shown in fig. 3, the EndPage module may intercept an EndPage function called by the target browser by using Hook technology. The EndPage function is called by the browser before the end of printing a page of text content, so that when the EndPage function is intercepted, the end of transferring the page of text content can be determined, namely the page is about to be printed, and the text page content can be output to the printer for waterless printing processing.
The EndPage function is used to complete the printing of one page and prepare the device scene for printing the next page.
Therefore, no matter the document where the text page content is located belongs to a sensitive service system or a non-sensitive service system, as long as the text page content does not relate to sensitive data, the method of the embodiment of the invention can perform non-watermark fast printing on the text page content, thereby reducing the service processing pressure, reducing the service processing burden and not performing watermark printing on the non-sensitive document.
Optionally, if the content of the text page includes preset keywords, after step 109, the method according to the embodiment of the present invention may further include:
adding a preset mark to the content of the text page;
if the keyword scanning engine module according to the embodiment of the present invention finds that the content of the text page includes the preset keyword through matching, a preset mark (for example, a mark indicating that a watermark needs to be added) may be added to the content of the text page;
then, as shown in fig. 3, the keyword scan engine module may also pass the text page content added with the preset mark to the EndPage module.
Optionally, if the content of the text page includes a preset keyword, step 110, when an EndPage function is intercepted, adding a preset watermark to the content of the text page;
in step 110, when an EndPage function called by the target browser is intercepted, a preset watermark is added to the content of the text page to which the preset mark is added.
As shown in fig. 3, the EndPage module may intercept an EndPage function called by the target browser by using Hook technology. The EndPage function is called by the browser before the end of printing a page of text content, so that when the EndPage function is intercepted, the end of transferring the page of text content can be determined, that is, the page of text content is to be printed, whether a complete text page content in the EndPage function has a preset mark or not can be judged, and if the complete text page content in the EndPage function has the preset mark, a preset watermark can be added to the text page content (namely, a watermark picture is obtained, and then the watermark picture is embedded into the text page content).
And step 111, printing the text page content added with the preset watermark.
Wherein, when step 111 is executed, the text page content added with the preset watermark may be output to a printer to print the text page content.
By means of the technical scheme of the embodiment of the invention, each page of text content in the printed document is intercepted in real time by using the Hook technology, the preset keywords are searched for, the watermark is added to the text page content for printing when the preset keywords are contained, and the watermark is not added for printing under other conditions, so that the watermark can be printed only on the text page with the sensitive data, the business processing burden is greatly reduced, the safety of the printed sensitive data is ensured, and the risk that the sensitive data is stolen because of being printed without the watermark is avoided.
In practical applications, the preset keyword may include, but is not limited to, a company brand name, a company contact address, and the like.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Corresponding to the method provided by the embodiment of the present invention, referring to fig. 4, a block diagram of a document printing system embodiment of the present invention is shown, and may specifically include the following modules:
a first interception module 41 for intercepting the StartDoc function;
a first obtaining module 42, configured to obtain a first HDC parameter value of the StartDoc function;
a second interception module 43 for intercepting an ExtTextOut function;
a second obtaining module 44, configured to obtain a second HDC parameter value of the ExtTextOut function;
a third obtaining module 45, configured to obtain text page content to be printed in the ExtTextOut function if the first HDC parameter value is the same as the second HDC parameter value;
a first judging module 46, configured to judge whether the content of the text page includes a preset keyword;
a first adding module 47, configured to add a preset watermark to the text page content when an EndPage function is intercepted if the first determining module 46 determines that the text page content includes a preset keyword;
a first printing module 48, configured to print text page content added with the preset watermark;
a second printing module 49, configured to print the text page content when the EndPage function is intercepted if the first determining module 46 determines that the text page content does not include the preset keyword.
Optionally, the first capture module 41 includes:
the first intercepting submodule is used for intercepting a StartDoc function and determining a target browser for calling a printing command;
the second interception module 43 comprises:
the second interception submodule is used for intercepting an ExtTextOut function called by the target browser;
the first adding module 47 includes:
and the first adding submodule is used for adding a preset watermark to the content of the text page when an EndPage function called by the target browser is intercepted.
Optionally, the system further comprises:
the first storage module is used for storing the first HDC parameter value to a global memory;
the second storage module is used for storing the second HDC parameter value to a global memory;
and the second judging module is used for judging whether the first HDC parameter value and the second HDC parameter value stored in the global memory are the same or not.
Optionally, the system further comprises:
the second adding module is used for adding a preset mark to the text page content if the first judging module judges that the text page content comprises a preset keyword;
the first adding module 47 includes:
and the second adding submodule is used for adding a preset watermark to the content of the text page added with the preset mark when an EndPage function is intercepted.
Optionally, the first printing module 48 comprises:
and the printing sub-module is used for outputting the text page content added with the preset watermark to a printer to print the text page content.
For the system embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program, when executed by the processor, implements each process of the above-mentioned document printing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned document printing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The document printing method and the document printing c system provided by the invention are described in detail, and the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A method of printing a document, comprising:
intercepting a StartDoc function;
obtaining a first HDC parameter value of the StartDoc function;
intercepting an ExtTextOut function;
acquiring a second HDC parameter value of the ExtTextOut function;
if the first HDC parameter value is the same as the second HDC parameter value, acquiring text page content to be printed in the ExtTextOut function;
judging whether the content of the text page comprises preset keywords or not;
if yes, adding a preset watermark to the content of the text page when an EndPage function is intercepted;
printing the text page content added with the preset watermark;
if not, printing the content of the text page when an EndPage function is intercepted;
wherein the text page content represents a page of content to be printed.
2. The method of claim 1,
the intercepting StartDoc function includes:
intercepting a StartDoc function, and determining a target browser for calling a printing command;
the intercepting ExtTextOut function comprises:
intercepting an ExtTextOut function called by the target browser;
when an EndPage function is intercepted, adding a preset watermark to the content of the text page, including:
and when an EndPage function called by the target browser is intercepted, adding a preset watermark to the content of the text page.
3. The method according to claim 1, wherein before the obtaining of the text page contents to be printed in the ExtTextOut function if the first HDC parameter value and the second HDC parameter value are the same, the method further comprises:
storing the first HDC parameter value to a global memory;
storing the second HDC parameter value to a global memory;
and judging whether the first HDC parameter value and the second HDC parameter value stored in the global memory are the same.
4. The method of claim 1,
after judging whether the text page content comprises preset keywords, the method further comprises the following steps:
if so, adding a preset mark to the content of the text page;
when an EndPage function is intercepted, adding a preset watermark to the content of the text page, including:
and when an EndPage function is intercepted, adding a preset watermark to the content of the text page added with the preset mark.
5. The method according to claim 1, wherein the printing the text page content added with the preset watermark comprises:
and outputting the text page content added with the preset watermark to a printer to print the text page content.
6. A document printing system, comprising:
the first interception module is used for intercepting a StartDoc function;
a first obtaining module, configured to obtain a first HDC parameter value of the StartDoc function;
the second interception module is used for intercepting an ExtTextOut function;
a second obtaining module, configured to obtain a second HDC parameter value of the ExtTextOut function;
a third obtaining module, configured to obtain text page content to be printed in the ExtTextOut function if the first HDC parameter value is the same as the second HDC parameter value;
the first judgment module is used for judging whether the content of the text page comprises preset keywords or not;
the first adding module is used for adding a preset watermark to the text page content when an EndPage function is intercepted if the first judging module judges that the text page content comprises a preset keyword;
the first printing module is used for printing the text page content added with the preset watermark;
the second printing module is used for printing the text page content when an EndPage function is intercepted if the first judging module judges that the text page content does not comprise preset keywords;
wherein the text page content represents a page of content to be printed.
7. The system of claim 6,
the first catch module includes:
the first intercepting submodule is used for intercepting a StartDoc function and determining a target browser for calling a printing command;
the second interception module comprises:
the second interception submodule is used for intercepting an ExtTextOut function called by the target browser;
the first adding module comprises:
and the first adding submodule is used for adding a preset watermark to the content of the text page when an EndPage function called by the target browser is intercepted.
8. The system of claim 6, further comprising:
the first storage module is used for storing the first HDC parameter value to a global memory;
the second storage module is used for storing the second HDC parameter value to a global memory;
and the second judging module is used for judging whether the first HDC parameter value and the second HDC parameter value stored in the global memory are the same or not.
9. The system of claim 6,
the system further comprises:
the second adding module is used for adding a preset mark to the text page content if the first judging module judges that the text page content comprises a preset keyword;
the first adding module comprises:
and the second adding submodule is used for adding a preset watermark to the content of the text page added with the preset mark when an EndPage function is intercepted.
10. The system of claim 6, wherein the first printing module comprises:
and the printing sub-module is used for outputting the text page content added with the preset watermark to a printer to print the text page content.
11. A mobile terminal, comprising: memory, processor and computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of a document printing method as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps in a document printing method according to any one of claims 1 to 5.
CN201810229525.0A 2018-03-20 2018-03-20 Document printing method and system Active CN108646988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810229525.0A CN108646988B (en) 2018-03-20 2018-03-20 Document printing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810229525.0A CN108646988B (en) 2018-03-20 2018-03-20 Document printing method and system

Publications (2)

Publication Number Publication Date
CN108646988A CN108646988A (en) 2018-10-12
CN108646988B true CN108646988B (en) 2021-04-16

Family

ID=63744440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810229525.0A Active CN108646988B (en) 2018-03-20 2018-03-20 Document printing method and system

Country Status (1)

Country Link
CN (1) CN108646988B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579386A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Monitoring method and device of printing equipment
CN113312010A (en) * 2020-02-27 2021-08-27 奇安信科技集团股份有限公司 Watermark processing method and device for printed file, electronic equipment and storage medium
CN112506448A (en) * 2020-12-01 2021-03-16 北京鸿腾智能科技有限公司 Printing auditing method, equipment, storage medium and device based on printer
CN113641312A (en) * 2021-08-11 2021-11-12 北京天空卫士网络安全技术有限公司 File printing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014208342A1 (en) * 2013-06-28 2014-12-31 スター精密株式会社 Information processing terminal and wireless connection control program
CN105323209A (en) * 2014-06-05 2016-02-10 江苏博智软件科技有限公司 Cloud data security protection method adopting fully homomorphic encryption technology and multiple digital watermarking technology

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4376933B2 (en) * 2007-12-07 2009-12-02 日立ソフトウエアエンジニアリング株式会社 Print management system, print management method, and program
KR20130033785A (en) * 2011-09-27 2013-04-04 인포섹(주) Apparatus and method for marking persnol information in text using api hook, and program storing medium for executing the method
JP2013156916A (en) * 2012-01-31 2013-08-15 Brother Ind Ltd Data processing device, printing system, and printing control program
US10380387B2 (en) * 2012-09-25 2019-08-13 Seagull Scientific, Inc. Integrated smart card printing and encoding
CN103605487A (en) * 2013-11-18 2014-02-26 江苏敏捷科技股份有限公司 Method for transparently capturing print data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014208342A1 (en) * 2013-06-28 2014-12-31 スター精密株式会社 Information processing terminal and wireless connection control program
CN105323209A (en) * 2014-06-05 2016-02-10 江苏博智软件科技有限公司 Cloud data security protection method adopting fully homomorphic encryption technology and multiple digital watermarking technology

Also Published As

Publication number Publication date
CN108646988A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
CN108646988B (en) Document printing method and system
KR101074624B1 (en) Method and system for protecting abusinng based browser
CN104486140B (en) It is a kind of to detect device and its detection method that webpage is held as a hostage
EP2537090B1 (en) Preventing unauthorized font linking
CN108563930A (en) A kind of method, apparatus, medium and the system of confidential document addition watermark
US9954880B2 (en) Protection via webpage manipulation
JP2016531346A (en) Method and device for displaying web pages
CN102932370A (en) Safety scanning method, equipment and system
US20140233055A1 (en) Method, device and computer readable medium for managing print jobs
CN102169534A (en) Method and device for displaying watermark
CN113810375B (en) Webshell detection method, device and equipment and readable storage medium
CN109145581B (en) Anti-simulation login method and device based on browser rendering performance and server
US9189628B2 (en) Data driven system for responding to security vulnerability
CN106462700B (en) Canceling request
US20210165904A1 (en) Data loss prevention
WO2023115968A1 (en) Method and device for identifying violation data at user end, medium, and program product
US9088735B2 (en) Computer-based system and method for adding variable security data in printing operations
JP2005134995A (en) System, method and program for security management
JP2017021654A (en) Document management server and system
KR102473436B1 (en) Method and apparatus for managing of physical memory layout, computer-readable storage medium and computer program
JP5320007B2 (en) Information filter device
JP4360418B2 (en) Image processing apparatus, viewer, image processing program, and image processing system
CN114168950B (en) Method, device, equipment and product for repairing cross-site scripting attack vulnerability
JP2010257376A (en) Confidential information masking system
CN113918862A (en) Web application protection method, system and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant