A method, apparatus, and storage medium for processing printed documents with variable areas.
By establishing a database and an automated printing method, the problem of manually modifying variable serial numbers in large-scale printing was solved, enabling efficient and accurate printing of images and patterns.
Patent Information
- Application Number
- CN202411640697.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-11-15
AI Technical Summary
In the process of mass printing, traditional methods require manual modification of the variable number on each artwork, which results in a heavy workload for designers, low efficiency, and a high risk of errors, affecting production and marketing results.
A database containing variable fill patterns is established. Through the collaborative work of image processing software and printers, the coordinates of variable areas are automatically calculated and calibrated to achieve accurate positioning and printing of images and patterns.
It reduces pre-press workload, improves printing efficiency, ensures the accuracy of numbering and patterns, avoids errors, and is suitable for various printing scenarios.
Smart Images

Figure CN119536671B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printer technology, and in particular to a method, apparatus and storage medium for processing printed documents with variable areas. Background Technology
[0002] In daily printing workflows, we often encounter situations where we need to print the same artwork repeatedly on a large scale. "Large scale" here doesn't mean just a few dozen copies, but hundreds or thousands, or even more, covering various scenarios such as product labels for mass production, promotional materials in complex business activities, and package information slips in the logistics process.
[0003] However, a complex and challenging issue exists: each artwork must have a unique serial number or product number, displayed as a barcode or QR code. These numbers are crucial for product identification, tracking, and management; they act like the product's "identity card." An error in any of these numbers could disrupt the entire logistics, sales, or production management chain.
[0004] In this situation, the traditional approach typically requires designers to manually modify the variable parts of the artwork. Each modification means creating a new prepress file, as each artwork with a different number needs to be processed individually. As the number of print runs increases, especially when the number of artworks to be printed is large, this method results in a massive number of different prepress files.
[0005] This undoubtedly places a heavy burden on designers, significantly increasing their workload. Designers need to spend a lot of time and energy on these repetitive revisions, and during this process, they also need to maintain a high level of concentration to ensure the accuracy of each number and the correctness of the artwork format, avoiding numbering errors or layout problems. The consequences of errors are unimaginable. For example, in product label printing, incorrect numbering may prevent products from being accurately identified in inventory management, leading to chaotic inventory data and affecting production plan adjustments; in promotional materials, incorrect QR codes may prevent potential customers from obtaining the correct product information or promotional offers, reducing marketing effectiveness; on logistics parcel information slips, incorrect numbering may cause packages to be lost or delayed during transportation, leading to customer dissatisfaction and complaints, and damaging the company's reputation. These serious consequences not only affect the company's daily operations but may also cause incalculable damage to the company's market competitiveness and brand image in the long term.
[0006] Therefore, there is an urgent need for a print document processing method with variable regions. Summary of the Invention
[0007] In order to solve the above-mentioned technical problems, the present invention provides a method, device and storage medium for processing printed documents with variable areas.
[0008] The technical solution of this invention is implemented as follows:
[0009] A method for processing print files with variable regions includes the following steps:
[0010] S1, Establish a database containing all variable fill patterns;
[0011] S2, Load the image to be printed into the image processing software and establish a coordinate system in the image;
[0012] S3, Based on the coordinate system, input the coordinates of the variable region and set the coordinate region as a variable region;
[0013] S4: Select the graphic file from the database, import it into the printer, and simultaneously import the image into the printer for printing. The printer reads the printing data line by line. For each line of data, it calculates the position of the current line in the XY direction of the entire pattern according to the pre-set algorithm and performs the printing operation.
[0014] Preferably, step S4 specifically involves comparing the calculated current row coordinates in the X and Y directions with the preset values of the corresponding patterns stored in the database. If the position meets the requirements, the graphic file in the database is printed; if the position does not meet the requirements, the image is printed instead.
[0015] Preferably, in step S1, the database includes generating number patterns and generating QR code patterns, and the variable fill pattern includes serial number patterns and QR code patterns.
[0016] Preferably, in step S3, when the variable region is preset, the shape of the variable region is a default square, the size of the variable region is a preset value S, and when the variable region is preset, the variable region is provided with a buffer, the area of the buffer is Sa.
[0017] Preferably, step S3 further includes the following sub-steps:
[0018] S31, the image processing software connects to the database and obtains the resolution of the variable fill pattern;
[0019] S32, after obtaining the resolution, compare it with the resolution of the image to be printed;
[0020] S33, Set a blank coordinate system, place the image to be printed and the variable fill pattern in the blank coordinate system;
[0021] S34, virtually print the image to be filled and the variable fill pattern blank coordinate system, calibrate the printing information of the image to be printed and the variable fill pattern, and send the coordinate data of the filled blank coordinate system to the printer after calibration; the coordinate data includes the coordinate data of each pixel of the image to be printed and the coordinate data of the variable fill pattern.
[0022] Preferably, in step S4, based on the comparison result of step S32, when the resolutions are inconsistent, the printer first prints the image to be printed at the resolution of the image to be printed, and then the paper feed motor returns to the printing medium, and performs a second printing of the variable fill pattern in the blank coordinate system after filling in the same printing medium.
[0023] Preferably, when performing a second printing of the variable fill pattern in the blank coordinate system after filling, white ink is first printed, covering an area S equal to the area of the variable region, and then the variable fill pattern is printed.
[0024] Preferably, when printing white ink to cover variable areas, the concentration of white ink and the number of coverage layers can be automatically adjusted according to the color depth of the variable area and the contrast of the background image.
[0025] A print document processing device with a variable area includes at least one processor, at least one memory, and computer program instructions stored in the memory, which implement the above-described print document processing method with a variable area when executed by the processor.
[0026] A storage medium storing computer program instructions, characterized in that, when the computer program instructions are executed by a processor, the aforementioned method for processing print documents with variable areas is implemented.
[0027] This invention solves the problem of the large amount of prepress documents that need to be processed, greatly reducing the workload of prepress. Moreover, by establishing a database and preset variable areas, this invention can quickly adapt to different printing needs. By using coordinate calculation and comparison, it ensures that graphics and images are printed in the correct positions, avoiding misalignment. It automatically adjusts the resolution and calibrates the printing information, so that the images and patterns are perfectly combined, making it suitable for a variety of situations. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of a print document processing method with variable areas according to the present invention. Detailed Implementation
[0029] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. In the following description relating to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.
[0030] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0031] Example 1
[0032] A method for processing print files with variable regions includes the following steps:
[0033] S1, Establish a database containing all variable fill patterns;
[0034] Step S1 specifically involves the following steps: In a printed document, the variable fill pattern is a pre-defined pattern template. The template contains variable areas, such as numbers, serial numbers, dates, or production numbers, as well as fixed areas, such as trademark patterns or product icons. The information of the variable areas, such as the date, is calculated according to a set algorithm. For example, the date is changed by reading the Internet date. For example, the number is used to print n copies of the document, with each copy numbered 1, 2, ..., n. The fixed area refers to a fixed area in a single printed document, which is different in different printed documents.
[0035] S2, Load the image to be printed into the image processing software and establish a coordinate system in the image;
[0036] Step S2 specifically involves processing the image to be printed using image processing software with vector data, such as Photoshop, in a print file.
[0037] S3. According to the coordinate system, input the coordinates of the variable area and set the coordinate area as the variable area. In step S3, the purpose is to input the image information to be printed and the variable fill pattern for unified calibration and comparison to avoid errors during printing, such as the variable area size being insufficient to completely fill the variable fill pattern, or the resolution between the two being incorrect, causing the print head to have boundary deviations during printing.
[0038] Preferably, step S3 further includes the following sub-steps:
[0039] S31, the image processing software connects to the database and obtains the resolution of the variable fill pattern;
[0040] S32, after obtaining the resolution, compare it with the resolution of the image to be printed;
[0041] S33, Set a blank coordinate system, place the image to be printed and the variable fill pattern in the blank coordinate system;
[0042] S34, virtually print the image to be filled and the variable fill pattern blank coordinate system, calibrate the printing information of the image to be printed and the variable fill pattern, and send the coordinate data of the filled blank coordinate system to the printer after calibration; the coordinate data includes the coordinate data of each pixel of the image to be printed and the coordinate data of the variable fill pattern.
[0043] S4: Select the graphic file from the database, import it into the printer, and simultaneously import the image into the printer for printing. The printer reads the printing data line by line. For each line of data, it calculates the position of the current line in the XY direction of the entire pattern according to the pre-set algorithm and performs the printing operation.
[0044] Preferably, step S4 specifically involves comparing the calculated current row coordinates in the X and Y directions with the preset values of the corresponding patterns stored in the database. If the position meets the requirements, the graphic file in the database is printed; if the position does not meet the requirements, the image is printed instead.
[0045] Preferably, in step S1, the database includes generating number patterns and generating QR code patterns, and the variable fill pattern includes serial number patterns and QR code patterns.
[0046] Preferably, in step S3, when the variable region is preset, the shape of the variable region is a default square, the size of the variable region is a preset value S, and when the variable region is preset, the variable region is provided with a buffer, the area of the buffer is Sa.
[0047] Preferably, in step S4, based on the comparison result of step S32, when the resolutions are inconsistent, the printer first prints the image to be printed at the resolution of the image to be printed, and then the paper feed motor returns to the printing medium, and performs a second printing of the variable fill pattern in the blank coordinate system after filling in the same printing medium.
[0048] Preferably, when performing a second printing of the variable fill pattern in the blank coordinate system after filling, white ink is first printed, covering an area S equal to the area of the variable region, and then the variable fill pattern is printed.
[0049] Preferably, when printing white ink to cover variable areas, the concentration of white ink and the number of coverage layers can be automatically adjusted according to the color depth of the variable area and the contrast of the background image.
[0050] Preferably, in the variable area, when the variable fill pattern is determined to not completely fill the variable area, the remaining part of the variable area includes color fill and no fill color. The color fill is white fill by default, or other colors can be selected for filling, which needs to be processed in pre-press. The no fill color, that is, the remaining part is the part of the image to be printed that is not filled by the variable fill pattern.
[0051] A print document processing device with a variable area includes at least one processor, at least one memory, and computer program instructions stored in the memory, which implement the above-described print document processing method with a variable area when executed by the processor.
[0052] A storage medium storing computer program instructions, characterized in that, when the computer program instructions are executed by a processor, the aforementioned method for processing print documents with variable areas is implemented.
[0053] Example 2
[0054] The difference between this embodiment and Embodiment 1 lies in that a method for processing print documents with variable areas includes the following steps:
[0055] S1, the printer creates a print template, determining the layout and style of pattern A and pattern B. Pattern A is designed as a fixed background element. Its position, size, color, and transparency on the printed page are determined to ensure consistency with the overall printing style. For example, the company logo is placed in the upper left corner of the page, and fixed information such as the product's generic name is displayed using specific colors and fonts.
[0056] Pattern B, as a variable pattern, has its basic shape and structure designed, such as a rectangle, circle, or a specific graphic frame. Simultaneously, the display position and formatting requirements for variable information within Pattern B are determined, such as the font, size, and color of text, and the precision of numbers. For example, Pattern B might be a rectangular frame with reserved space inside for displaying variable information such as product number and production date. The product number could be displayed in 10-point font in black, and the production date format could be "YYYY-MM-DD".
[0057] Integrate Pattern A and Pattern B to form a print template. In the design software, combine Pattern A and Pattern B according to a predetermined layout, adjusting their relative positions and hierarchical relationships. Ensure that the variable areas of Pattern B are clearly identified and positioned in the template to facilitate the subsequent filling of variable information. After completing the design, save the print template in a printer-recognizable format, such as PDF or a specific printer instruction file format.
[0058] S2. Prepare to print pattern A. Check the integrity of pattern A's materials. Open the source file of pattern A on your computer and check if all components are complete, such as the existence of image files and the correct installation of fonts. If any materials are missing or damaged, repair or replace them promptly to ensure pattern A can be printed normally. Perform color calibration and optimization on pattern A using color management tools to ensure consistent colors displayed and printed on different devices. Optimize and adjust the colors of pattern A according to printing needs, such as increasing contrast and adjusting color saturation, to achieve better printing results.
[0059] Before printing a large quantity of pattern A, conduct a small-scale test print. Check for issues such as blurriness, ghosting, and color deviation in the printed pattern A. Based on the test results, adjust printer parameters such as print resolution, ink volume, and color balance until satisfactory print quality is achieved. Record the optimal printer settings for use in subsequent large-scale printing.
[0060] S3. Prepare variable pattern B. Based on the printing task requirements, collect materials related to variable pattern B, such as databases, spreadsheets, or text files used to generate variable information. Ensure that the data in the materials is accurate and formatted correctly. Organize and preprocess the materials, such as removing duplicate data and correcting incorrect formats.
[0061] Determine the generation rules for variable pattern B. Based on the printing business logic, determine the generation rules and algorithms for variable information in variable pattern B. For example, the product number generation rule might be based on a certain coding system combined with date and serial number; the barcode or QR code generation rule is based on the corresponding coding standard, converting product information into a scannable graphic. Simultaneously, consider the length range and possible changes of variable information to ensure that variable pattern B can adapt to different data content.
[0062] Create a template file for the variable pattern B. If the structure of the variable pattern B is relatively complex or requires frequent modifications, a template file for the variable pattern B can be created in the graphic design software. In the template file, define the position, shape, and style of the variable areas and establish a connection with the data source that generates the variable information. This way, whenever the variable pattern B needs to be generated, it can be quickly generated based on the template file, improving work efficiency.
[0063] S4. Establish variable information for variable pattern B, including data source connection and data extraction. Based on the generation rules of variable pattern B, connect to the corresponding data source. Use database query statements or data reading functions to accurately extract the required variable information data from the data source. During the extraction process, perform data integrity checks to ensure that no important data is missed.
[0064] Data format conversion and validation involves converting the extracted variable information data according to the format requirements defined in Pattern B. For example, numeric data is converted to a specified precision format, and date data is converted to "YYYY-MM-DD" format. Simultaneously, the converted data is validated to ensure it conforms to business rules and printing requirements, such as the uniqueness of product numbers and the reasonableness of dates. If data errors are found, they are promptly corrected or the user is prompted for further action.
[0065] Generate the graphic file of variable pattern B. Based on the variable information data and pre-defined generation rules, use a graphics processing library or plugin to generate the graphic file of variable pattern B. During the generation process, ensure that the variable information is accurately filled into the corresponding positions of pattern B and displayed according to the set style. For example, display the product number in a specified font and color in the numbering area of pattern B, and generate the barcode or QR code into a graphic according to the correct encoding standard and place it in the appropriate position. The generated graphic file of variable pattern B should be saved in a printer-recognizable format, such as PNG, JPEG, or PDF.
[0066] S5. Input print pattern A into the printer for the first print run. In the printer driver or print management software, set appropriate printer parameters according to the characteristics of pattern A and the printing requirements. This includes selecting paper type, paper size, print quality, print color mode, and number of copies. Ensure that the printer parameters match the design of pattern A and the printing needs to achieve the best print results.
[0067] For print job submission and monitoring, send the prepared print pattern A to the printer to submit the print job. During the printing process, monitor the printing progress in real time. You can view the number of pages printed and the total number of pages through the progress bar provided by the printer driver or the task status display in the print management software. At the same time, pay attention to the printer's working status, such as whether there is a paper jam or whether the ink cartridges are functioning properly. If any abnormalities are found, stop the print job immediately and handle it to avoid wasting print media and time.
[0068] After printing, check and process the printed paper. Once pattern A is printed, remove the printed paper from the printer's output tray and perform a preliminary inspection. Check if the print quality of pattern A meets the requirements, including whether the colors are accurate, the image is clear, and the text is complete. If minor printing defects are found, such as slight color deviations or unclear ink dots, decide whether to fine-tune the printer and reprint, depending on the specific situation. For acceptable printed pattern A, arrange it neatly in the designated location, ready for the next step of printing pattern B.
[0069] S6, the paper feed motor retracts the printing media for the second printing, printing pattern B. The printer control system sends a command to the paper feed motor to accurately return the printing media to the starting printing position of pattern B. This ensures the position of the printing media matches the positioning of pattern B in the template, preventing printing misalignment of pattern B. This may require the printer to have precise paper feed motor control and positioning sensors to achieve millimeter-level positioning accuracy.
[0070] Adjust printer parameters: Based on the characteristics and printing requirements of pattern B, double-check the printer parameters to ensure they are appropriate. If pattern B differs from pattern A in print quality, color mode, or paper handling, adjust the printer parameters accordingly. For example, if pattern B is a color barcode requiring higher printing precision, you may need to set the print quality to high resolution, select a color printing mode, and adjust parameters such as ink volume to ensure pattern B can be printed clearly and accurately on the paper already printed with pattern A.
[0071] Pattern B printing and quality inspection: The generated variable pattern B graphic file is sent to the printer for a second print run. During the printing process, the printer's operating status and printing progress are closely monitored to ensure that pattern B is printed successfully. After printing, a comprehensive quality inspection of the entire printed page is performed. This includes checking whether the variable information in pattern B is displayed correctly, such as whether the product number and production date match the data source; whether the barcode or QR code can be scanned and read normally; and whether the combination of pattern B and pattern A is natural and aesthetically pleasing, without overlap or misalignment. If any problems are found, appropriate measures are taken according to the type of problem, such as regenerating and printing variable pattern B, adjusting printer parameters and printing again, or adjusting the printing media and reprinting.
[0072] Preferably, in a printing task, pattern A is a fixed printing task, and pattern B is an optional task. In the Nth printing task, the variable information of pattern B changes N times. In each printing task, the variable information of pattern B is identified through image recognition. The printing result of the (N-1)th printing task is compared with the printing result of the Nth printing task to determine whether there is a problem with the calculation logic of the variable information of pattern B.
[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for processing printed documents with variable regions, characterized in that, Includes the following steps: S1, Establish a database containing all variable fill patterns; S2, Load the image to be printed into the image processing software and establish a coordinate system in the image; S3, Based on the coordinate system, input the coordinates of the variable region and set the coordinate region as a variable region; S4: Select the graphic file from the database, import it into the printer, and simultaneously import the image into the printer for printing. The printer reads the print data line by line. For each line of data, it calculates the position of the current line in the XY direction within the entire pattern according to a pre-set algorithm and performs the printing operation. Step S3 further includes the following sub-steps. S31, the image processing software connects to the database and obtains the resolution of the variable fill pattern; S32, after obtaining the resolution, compare it with the resolution of the image to be printed; S33, Set a blank coordinate system, place the image to be printed and the variable fill pattern in the blank coordinate system; S34, virtually print the image to be filled and the variable fill pattern blank coordinate system, calibrate the printing information of the image to be printed and the variable fill pattern, and send the coordinate data of the filled blank coordinate system to the printer after calibration; the coordinate data includes the coordinate data of each pixel of the image to be printed and the coordinate data of the variable fill pattern. Step S4 specifically involves comparing the calculated current row coordinates (X and Y directions) with the preset values of the corresponding patterns stored in the database. If the position meets the requirements, the graphic file from the database is printed; otherwise, the image is printed instead. In step S4, based on the comparison result of step S32, when the resolutions are inconsistent, the printer first prints the image to be printed at the required resolution, and then the paper feed motor returns to the printing medium, and the variable fill pattern in the blank coordinate system after filling is printed a second time on the same printing medium; When performing a secondary printing of the variable fill pattern in the blank coordinate system after filling, white ink is first printed, covering an area S equal to the area of the variable region, and then the variable fill pattern is printed. When printing white ink over variable areas, the concentration of the white ink and the number of overlay layers can be automatically adjusted according to the color depth of the variable area and the contrast of the background image.
2. The method for processing print documents with variable regions according to claim 1, characterized in that, In step S1, the database includes generating number patterns and generating QR code patterns, and the variable fill pattern includes serial number patterns and QR code patterns.
3. The method for processing printed documents with variable regions according to claim 1, characterized in that, In step S3, when a variable region is preset, the shape of the variable region is a default square, the size of the variable region is a preset value S, and the variable region is set with a buffer with an area of Sa.
4. A printing document processing device with a variable area, characterized in that, It includes at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method described in any one of claims 1-3.
5. A storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, the method described in any one of claims 1-3 is implemented.
Citation Information
Patent Citations
Label printing method and device, electronic equipment and storage medium
CN117971140A