Method and device for embedding watermark in primitive file, storage medium and product
By embedding the watermark in the Figure Metallurgical File, the problem of low watermark loading efficiency and lack of environmental safety in the existing technology, and the efficient and stable watermark drawing and secure printing environment, and prevent the disclosure of the secret information of the documentation.
Patent Information
- Application Number
- CN202411499530.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, when printing documents, the watermark loading efficiency is low and the printing environment is insufficient, resulting in the leakage of secret information of the document content.
By embedded in the watermark in the Figure Map file, the WEB interface is used to configure watermark parameters to generate watermarking strategies, and loaded the watermark graph file on the client, embedded in the printing meta file to be printed, and independent of a specific system framework or printing environment.
The watermark drawing efficiency and stability of the document content has been improved, the security of the printing environment is enhanced, the secret information is leaked, and the source of the leakage can be traced back to ensure the security of the secret printing environment.
Smart Images

Figure CN119377922A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information security technology, and in particular to a method, device, storage medium and product for embedding a watermark in a metafile. Background Art
[0002] With the rapid development of the information society, the content of documents can be easily illegally obtained and tampered with during the dissemination of document information. Therefore, people's awareness of information security protection is gradually increasing, and the protection of important documents is particularly important.
[0003] In the related art, a text watermarking scheme is usually used to protect the information security of documents. In order to prevent the leakage of various document contents such as pictures and scanned copies printed on the Windows operating system, some unique identification information can be added to the printed output paper. For example, these unique identification information can be text containing the current printing user information, so that the output paper content retains the watermark information. However, when printing a large number of documents or pictures, the text printing method of the related art usually relies on a specific system framework or printing environment, resulting in low watermark loading efficiency and low security of the printing environment, which leads to the leakage of confidential information of the document content. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a method, device, storage medium and product for embedding watermarks in graphic metafiles, which are independent of a specific system framework or printing environment, thereby improving the efficiency and stability of watermark drawing of document content and the security of the printing environment, thereby effectively preventing the leakage of confidential information in the printed document content, and tracing the source of leakage through watermark information after the secret information is leaked, thereby ensuring the security of the confidential printing environment.
[0005] In a first aspect, the embodiments of the present disclosure provide a method for embedding a watermark in a metafile, which adopts the following technical solution:
[0006] Get the watermark parameters configured by the user on the Web interface;
[0007] Generating a watermark strategy according to the watermark parameters, wherein the watermark strategy is a strategy for adding a watermark to a metafile to be printed;
[0008] Sending a watermark drawing request carrying the watermark strategy to the client, so that the client loads and generates a watermark bitmap file according to the watermark strategy in the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server;
[0009] The watermark information is received, and the watermark information is embedded into the metafile to be printed.
[0010] In some embodiments, sending a watermark drawing request carrying the watermark strategy to a client includes:
[0011] By calling the graphics device interface GDI, the watermark drawing request is sent to the client, so that the client parses the received watermark drawing request to obtain the watermark strategy;
[0012] Receiving a loading request carrying a watermark bitmap file sent by the client, wherein the watermark bitmap file is generated by the client based on the watermark parameters obtained according to the watermark policy;
[0013] The watermark information of the watermark bitmap file is loaded into the memory.
[0014] In some embodiments, loading the watermark information of the watermark bitmap file into the memory includes:
[0015] Obtaining the first handle of the metafile to be printed;
[0016] Draw the first handle into the device context DC to obtain the metafile source DC;
[0017] Load the watermark bitmap file and obtain a second handle of the watermark bitmap file;
[0018] Create a memory device context that is compatible with the device context DC;
[0019] The second handle is loaded into the memory by calling the SelectObject function, and the metafile source DC is saved into the memory.
[0020] In some embodiments, receiving the watermark information and embedding the watermark information into the to-be-printed metafile includes:
[0021] By calling the StretchBlt function, the metafile source DC of the metafile to be printed is ANDed with each RGB value of the watermark bitmap file to obtain the metafile DC after the ANDing operation;
[0022] The metafile DC after the AND operation is OR-operated with each RGB value of the metafile source DC to obtain a metafile to be printed with the watermark information drawn thereon.
[0023] In some embodiments, the method further comprises:
[0024] Set the rectangle parameters of the target rectangle and the source rectangle by calling the StretchBlt function;
[0025] Based on the rectangular parameters, an image adjustment operation is performed on the watermark bitmap file.
[0026] In some embodiments, the method further comprises:
[0027] Performing a bitmap restoration operation on the to-be-printed metafile having the watermark information drawn thereon, to obtain a bitmap object after restoration and display;
[0028] Release the bitmap object;
[0029] YY+242156P
[0030] Releases the memory device context.
[0031] In a second aspect, the embodiment of the present disclosure further provides a method for embedding a watermark in a metafile, the method comprising:
[0032] Receiving a watermark drawing request carrying a watermark strategy sent by a server, wherein the watermark strategy is generated by the server based on watermark parameters acquired by the user configured in a Web interface, and the watermark strategy is a strategy for adding a watermark to a metafile to be printed;
[0033] A watermark bitmap file is loaded and generated according to the received watermark drawing request, and watermark information of the watermark bitmap file is sent to the server, so that the server embeds the received watermark information into a metafile to be printed.
[0034] In a third aspect, the embodiment of the present disclosure further provides a device for embedding a watermark in a metafile, which adopts the following technical solution:
[0035] An acquisition unit is configured to acquire watermark parameters configured by a user in a web interface;
[0036] A generating unit, configured to generate a watermark strategy according to the watermark parameters, wherein the watermark strategy is a strategy for adding a watermark to a metafile to be printed;
[0037] a sending unit configured to send a watermark drawing request carrying the watermark strategy to a client, so that the client loads and generates a watermark bitmap file according to the watermark strategy in the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server;
[0038] The embedding unit is configured to receive the watermark information and embed the watermark information into the to-be-printed metafile.
[0039] In a fourth aspect, the embodiment of the present disclosure further provides a device for embedding a watermark in a metafile, which adopts the following technical solution:
[0040] A receiving unit is configured to receive a watermark drawing request carrying a watermark strategy sent by a server, wherein the watermark strategy is generated by the server based on watermark parameters configured by a user in a Web interface, and the watermark strategy is a strategy for adding a watermark to a metafile to be printed;
[0041] The watermark embedding unit is configured to load and generate a watermark bitmap file according to the received watermark drawing request, and send the watermark information of the watermark bitmap file to the server, so that the server embeds the received watermark information into the metafile to be printed.
[0042] In a fifth aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:
[0043] The computer device comprises:
[0044] at least one processor; and,
[0045] a memory communicatively connected to the at least one processor; wherein,
[0046] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the above-mentioned methods for embedding a watermark in a metafile.
[0047] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned methods for embedding a watermark in a metafile.
[0048] In a seventh aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0049] The disclosed embodiment provides a method for embedding a watermark in a metafile, which is independent of a specific system framework or printing environment, thereby improving the efficiency and stability of drawing watermarks for document contents and the security of the printing environment, thereby effectively preventing the leakage of confidential information in the printed document contents and tracing the source of leakage through watermark information after the confidential information has been leaked, thereby ensuring the security of the confidential printing environment.
[0050] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 A schematic diagram of a flow chart of a method for embedding a watermark in a metafile provided by an embodiment of the present disclosure;
[0053] Figure 2 A schematic flow chart of another method for embedding a watermark in a metafile provided by an embodiment of the present disclosure;
[0054] Figure 3 A schematic diagram of the structure of a device for embedding a watermark in a metafile provided by an embodiment of the present disclosure;
[0055] Figure 4 A schematic diagram of the structure of another device for embedding a watermark in a metafile provided by an embodiment of the present disclosure;
[0056] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0057] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0058] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0059] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0060] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0061] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0062] like Figure 1 As shown, Figure 1 The present invention provides a flow chart of a method for embedding a watermark in a metafile provided by an embodiment of the present invention. The present invention provides a method for embedding a watermark in a metafile, which is executed on a server side. The method includes the following steps:
[0063] S101. The server obtains watermark parameters configured by the user in the Web interface.
[0064] Administrators configure watermark content on the web interface, that is, configure watermark parameters. Watermark parameters can include watermark text, watermark text color, watermark text tilt angle, watermark font, watermark font size, or watermark text transparency.
[0065] S102: The server generates a watermark strategy according to the watermark parameters, wherein the watermark strategy is a strategy for adding a watermark to a metafile to be printed.
[0066] The metafile to be printed is an enhanced metafile, which is a cache file used by the Windows operating system. The original metafile to be printed is a file sent to the Windows buffer without being processed.
[0067] S103. The server sends a watermark drawing request carrying a watermark policy to the client, so that the client generates a watermark bitmap file by loading according to the watermark policy in the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server.
[0068] Optionally, the client is a print output terminal, for example, the print output terminal is a printer device.
[0069] The disclosed embodiment mainly calls the GDI (Graphic Device Interface) of the Windows system, which provides an interface library for drawing watermarks. The server can turn on or off the watermark policy in the Web interface, and can also customize the watermark parameters in the Web interface. The client generates a watermark bitmap file based on the watermark drawing request sent by the server.
[0070] S104: The server receives the watermark information and embeds the watermark information into the metafile to be printed.
[0071] Optionally, the watermark drawn in the embodiment of the present disclosure is a transparent watermark, and the transparent watermark is drawn into a metafile to be printed, and the metafile to be printed with the transparent watermark drawn thereon is printed out.
[0072] In order to prevent the leakage of printed content when printing pictures, scanned copies and other documents on the Windows operating system, the embodiments of the present disclosure add some unique identification information to the metafile to be printed. For example, a watermark is added to the metafile to be printed, which can effectively prevent the leakage of secret information of the metafile to be printed. After the secret information of the metafile to be printed is leaked, the source of leakage can be traced through the watermark information, thereby ensuring the security of the confidential printing environment.
[0073] The method for embedding a watermark in a metafile provided by the disclosed embodiment supports a wider range of Windows operating systems, is independent of a specific system framework or printing environment, has a simple and efficient operation process, a stable drawing process, and a fast drawing speed, and has a higher performance advantage. It not only improves the efficiency and stability of watermark drawing of document content, but also improves the security of the printing environment, thereby effectively preventing the leakage of secret information of the printed document content, and tracing the source of leakage through watermark information after the secret information is leaked, thereby ensuring the security of the confidential printing environment.
[0074] In some embodiments, the server sends a watermark drawing request carrying a watermark policy to the client, so that the client generates a watermark bitmap file according to the watermark policy in the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server, including:
[0075] The server sends a watermark drawing request carrying a watermark strategy to the client by calling the graphics device interface GDI of the Windows system, so that the client parses the received watermark drawing request to obtain the watermark strategy;
[0076] The server receives a loading request carrying a watermark bitmap file sent by the client, wherein the watermark bitmap file is generated based on the watermark parameters obtained by the client according to the watermark policy;
[0077] The server loads the watermark information of the watermark bitmap file into the memory.
[0078] The watermark drawing process of the embodiment of the present disclosure is simple and flexible. The watermark drawing is achieved by calling the library file provided by the Windows system. It does not rely on a specific framework or a specific operating environment, does not require the installation of additional components, and is easy for users to use.
[0079] In some embodiments, the server loads the watermark information of the watermark bitmap file into the memory, including:
[0080] The server obtains the first handle of the metafile to be printed;
[0081] The server draws the first handle into the device context DC and obtains the metafile source DC;
[0082] The server loads the watermark bitmap file and obtains the second handle of the watermark bitmap file;
[0083] The server creates a memory device context that is compatible with the device context DC;
[0084] The server loads the second handle into memory by calling the SelectObject function and saves the metafile source DC into memory.
[0085] The disclosed embodiment loads the second handle of the watermark bitmap file into the memory by calling the SelectObject function and saves the source DC of the metafile into the memory. The algorithm is simple and clear, easy for users to understand, and has small memory usage and fast drawing speed.
[0086] In some embodiments, the server receives watermark information and embeds the watermark information into a to-be-printed metafile, including:
[0087] The server calls the StretchBlt function to perform an AND operation on the source DC of the metafile of the metafile to be printed and each RGB value of the watermark bitmap file to obtain the metafile DC after the AND operation;
[0088] The server performs an OR operation on the operated metafile DC and each RGB value of the metafile source DC to obtain a metafile to be printed with watermark information drawn thereon.
[0089] Optionally, the disclosed embodiment first performs an AND operation on the metafile source DC of the metafile to be printed and each RGB value of the watermark bitmap file by calling the StretchBlt function. At this time, the black part of the watermark bitmap file remains black on the background image, and the white part remains the original color. Secondly, the StretchBlt function is called to perform an OR operation on each RGB value of the metafile DC after the AND operation and the metafile source DC. The black part of the watermark bitmap file still maintains the color of the metafile source DC, and the white part becomes transparent. The watermark information is successfully drawn on the metafile to be printed.
[0090] The disclosed embodiment calls the StretchBlt function to perform an "AND (SRCAND) operation" or an "OR (SRCPAINT) operation" on the RGB values of the to-be-printed metafile and the watermark bitmap file. The algorithm is simple and clear, easy for users to understand, and has a small memory footprint and a fast drawing speed.
[0091] In some embodiments, the method further comprises:
[0092] The server sets the rectangle parameters of the target rectangle and the source rectangle by calling the StretchBlt function;
[0093] The server performs an image adjustment operation on the watermark bitmap file based on the rectangle parameters.
[0094] The disclosed embodiment can set the coordinates, width, height and other rectangle parameters of the target rectangle and the source rectangle by calling the StretchBlt function, so that according to user needs, image adjustment operations such as tiling, centering, stretching and scaling can be performed on the watermark bitmap file during the watermark drawing process, thereby realizing the operation of adjusting the drawn transparent watermark.
[0095] In some embodiments, the method further comprises:
[0096] The server performs a bitmap restoration operation on the to-be-printed metafile with the watermark information drawn thereon, and obtains a bitmap object after restoration and display;
[0097] The server releases the bitmap object;
[0098] The server releases the memory device context.
[0099] The embodiments of the present disclosure can reduce memory usage by releasing bitmap objects and memory device contexts.
[0100] like Figure 2As shown, Figure 2 The present invention provides another method for embedding a watermark in a metafile according to an embodiment of the present invention. The present invention also provides a method for embedding a watermark in a metafile, which is executed on a client. The method includes the following steps:
[0101] S201. The client receives a watermark drawing request carrying a watermark strategy sent by a server, wherein the watermark strategy is generated by the server based on watermark parameters configured by the user in a Web interface, and the watermark strategy is a strategy for adding a watermark to a graphic element file to be printed.
[0102] S202: The client generates a watermark bitmap file by loading it according to the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server, so that the server embeds the received watermark information into the metafile to be printed.
[0103] The method for embedding a watermark in a metafile provided by the disclosed embodiment supports a wider range of Windows operating systems, is independent of a specific system framework or printing environment, has a simple and efficient operation process, a stable drawing process, and a fast drawing speed, and has a higher performance advantage. It not only improves the efficiency and stability of watermark drawing of document content, but also improves the security of the printing environment, thereby effectively preventing the leakage of secret information of the printed document content, and tracing the source of leakage through watermark information after the secret information is leaked, thereby ensuring the security of the confidential printing environment.
[0104] like Figure 3 As shown, Figure 3 The present invention provides a schematic diagram of a structure of a device for embedding a watermark in a metafile according to an embodiment of the present invention. The present invention also provides a device for embedding a watermark in a metafile, including:
[0105] The acquisition unit 31 is configured to acquire the watermark parameters configured by the user in the Web interface;
[0106] A generating unit 32, configured to generate a watermark strategy according to the watermark parameters, wherein the watermark strategy is a strategy for adding a watermark to a metafile to be printed;
[0107] The sending unit 33 is configured to send a watermark drawing request carrying a watermark policy to the client, so that the client loads and generates a watermark bitmap file according to the watermark policy in the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server;
[0108] The embedding unit 34 is configured to receive watermark information and embed the watermark information into the metafile to be printed.
[0109] like Figure 4 As shown, Figure 4This is a schematic diagram of the structure of another device for embedding a watermark in a metafile provided by an embodiment of the present disclosure. The embodiment of the present disclosure also provides a device for embedding a watermark in a metafile, including:
[0110] The receiving unit 41 is configured to receive a watermark drawing request carrying a watermark strategy sent by the server, wherein the watermark strategy is generated by the server based on the watermark parameters configured by the user in the Web interface, and the watermark strategy is a strategy for adding a watermark to a metafile to be printed;
[0111] The watermark embedding unit 42 is configured to load and generate a watermark bitmap file according to the received watermark drawing request, and send the watermark information of the watermark bitmap file to the server, so that the server embeds the received watermark information into the metafile to be printed.
[0112] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.
[0113] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device executes all or part of the steps of the method for embedding a watermark in a metafile in the aforementioned embodiments of the present disclosure.
[0114] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.
[0115] like Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 5 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0116] like Figure 5As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0117] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 5 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0118] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of a method for embedding a watermark in a metafile of an embodiment of the present disclosure are executed.
[0119] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0120] The computer-readable storage medium according to the embodiment of the present disclosure stores non-transitory computer-readable instructions, which, when executed by a processor, execute all or part of the steps of the method for embedding a watermark in a metafile in the above-mentioned embodiments of the present disclosure.
[0121] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).
[0122] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0123] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0124] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0125] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0126] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0127] Various changes, substitutions and modifications of the techniques described herein may be made without departing from the teachings of the appended claims. Moreover, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufacture, compositions of things, means, methods and actions described above. There may be utilized currently existing or later developed processes, machines, YY+242156P that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein.
[0128] Accordingly, the appended claims include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or actions.
[0129] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0130] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for embedding a watermark in a metafile, characterized in that: The method comprises: Get the watermark parameters configured by the user on the Web interface; Generating a watermark strategy according to the watermark parameters, wherein the watermark strategy is a strategy for adding a watermark to a metafile to be printed; Sending a watermark drawing request carrying the watermark strategy to the client, so that the client loads and generates a watermark bitmap file according to the watermark strategy in the received watermark drawing request, and sends the watermark information of the watermark bitmap file to the server; The watermark information is received, and the watermark information is embedded into the metafile to be printed.
2. The method for embedding a transparent watermark in a metafile according to claim 1, characterized in that: Sending a watermark drawing request carrying the watermark strategy to the client includes: By calling the graphics device interface GDI, the watermark drawing request is sent to the client, so that the client parses the received watermark drawing request to obtain the watermark strategy; Receiving a loading request carrying a watermark bitmap file sent by the client, wherein the watermark bitmap file is generated by the client based on the watermark parameters obtained according to the watermark policy; The watermark information of the watermark bitmap file is loaded into the memory.
3. The method for embedding a watermark in a metafile according to claim 2, characterized in that: Loading the watermark information of the watermark bitmap file into the memory includes: Obtaining the first handle of the metafile to be printed; Draw the first handle into the device context DC to obtain the metafile source DC; Load the watermark bitmap file and obtain a second handle of the watermark bitmap file; Create a memory device context that is compatible with the device context DC; The second handle is loaded into the memory by calling the SelectObject function, and the metafile source DC is saved into the memory.
4. The method for embedding a watermark in a metafile according to claim 3, characterized in that: Receiving the watermark information and embedding the watermark information into the to-be-printed metafile includes: By calling the StretchBlt function, the metafile source DC of the metafile to be printed is ANDed with each RGB value of the watermark bitmap file to obtain the metafile DC after the ANDing operation; The metafile DC after the AND operation is OR-operated with each RGB value of the metafile source DC to obtain a metafile to be printed with the watermark information drawn thereon.
5. The method for embedding a watermark in a metafile according to claim 4, characterized in that: The method further comprises: Set the rectangle parameters of the target rectangle and the source rectangle by calling the StretchBlt function; Based on the rectangular parameters, an image adjustment operation is performed on the watermark bitmap file.
6. The method for embedding a watermark in a metafile according to claim 5, characterized in that: The method further comprises: Performing a bitmap restoration operation on the to-be-printed metafile having the watermark information drawn thereon, to obtain a bitmap object after restoration and display; Release the bitmap object; YY+242156P Releases the memory device context.
7. A method for embedding a watermark in a metafile, characterized in that: The method comprises: Receiving a watermark drawing request carrying a watermark strategy sent by a server, wherein the watermark strategy is generated by the server based on watermark parameters acquired by the user configured in a Web interface, and the watermark strategy is a strategy for adding a watermark to a metafile to be printed; A watermark bitmap file is loaded and generated according to the received watermark drawing request, and watermark information of the watermark bitmap file is sent to the server, so that the server embeds the received watermark information into a metafile to be printed.
8. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for embedding a watermark in a metafile as described in any one of claims 1 to 6 or claim 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for embedding a watermark in a metafile as described in any one of claims 1 to 6 or claim 7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 or claim 7 are implemented.