Print file processing method with variable area, equipment and storage medium
By establishing a database and preset variable areas, using image processing software and printers to work together, the complexity and high workload of manual artwork in traditional methods are solved, and efficient and accurate printing file processing is achieved.
Patent Information
- Application Number
- CN202411640697.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-15
AI Technical Summary
When performing a large number of repeated printing operations, traditional methods require manual modification of variable parts of the artwork, resulting in the generation of massive different prepress files, increasing the workload of designers, and risking numbering errors and artwork layout problems.
By establishing a database containing all variable fill patterns, loading the image with image processing software and setting the coordinates of the variable area, printing with the graphics files and printers in the database, and using a pre-set algorithm to calculate the position of the current row in the XY direction in the entire pattern for printing.
It greatly reduces the workload before printing, quickly adapts to different printing needs, ensures that the graphics and images are printed in the accurate position, avoids misalignment, automatically adjusts the resolution and calibrates the printing information, and perfectly combines the image and pattern.
Smart Images

Figure CN119536671A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of printers, and in particular to a method, a device and a storage medium for processing a print file with a variable area. Background Art
[0002] In the daily printing process, we often encounter a situation where we need to print the same artwork repeatedly in large quantities. The "large quantities" here do not simply mean dozens of copies, but hundreds, thousands, or even more, covering various scenarios such as product labels for mass production, promotional materials for complex commercial activities, and package information sheets in logistics.
[0003] However, there is a complex and thorny problem here, that is, each drawing must have a different serial number or product number, and these numbers are displayed in the form of barcodes or QR codes. These numbers are crucial for product identification, tracking and management. They are like the "identity cards" of products. Any number error may cause chaos in the entire logistics, sales or production management chain.
[0004] In this case, the traditional operation method usually requires the designer to manually modify the variable parts of the artwork. Each modification means creating a new prepress file, because each artwork with a different number needs to be processed separately. As the number of prints increases, especially when the number of artworks to be printed is huge, this method will result in a large number of different prepress files.
[0005] This undoubtedly brings a heavy burden to designers and greatly increases their workload. Designers need to spend a lot of time and energy on these repetitive modification work, and in this process, they also need to concentrate highly to ensure the accuracy of each number and the correctness of the artwork format, and avoid numbering errors or artwork layout problems. Once an error occurs, the consequences are disastrous. For example, in product label printing, numbering errors may make it impossible to accurately identify the product in inventory management, resulting in confusion in inventory data and affecting the adjustment of production plans; in commercial promotional materials, QR code errors will prevent potential customers from obtaining correct product information or promotional activities, reducing marketing effectiveness; on logistics package information sheets, numbering errors may cause packages to be lost or delayed during transportation, causing customer dissatisfaction and complaints, and damaging the company's reputation. These serious consequences will not only affect the daily operations of the company, but may also cause immeasurable damage to the company's market competitiveness and brand image in the long run.
[0006] Therefore, there is an urgent need for a printing file processing method with a variable area. 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 a print file with a variable area.
[0008] The technical solution of the present invention is achieved in this way:
[0009] A method for processing a print file with a variable area comprises the following steps:
[0010] S1, establish a database containing all variable filling patterns;
[0011] S2, loading the image to be printed into the image processing software and establishing a coordinate system on the image;
[0012] S3, inputting the coordinates of the variable area according to the coordinate system, and setting the coordinate area as the variable area;
[0013] S4, select a graphic file from the database, import it into the printer, and import the image into the printer for printing at the same time. The printer reads the print data line by line. For each line of data, the position of the current line in the XY direction of the entire pattern is calculated according to a pre-set algorithm for printing.
[0014] Preferably, step S4 specifically includes comparing the calculated X and Y direction positions of the current row coordinates with the preset values of the corresponding pattern stored in the database. When the position meets the requirements, printing of the graphic file in the database begins; when the position does not meet the requirements, printing of the image is switched.
[0015] Preferably, in step S1, the database includes generating a numbering pattern and generating a QR code pattern, and the variable filling pattern includes a serial numbering pattern and a QR code pattern.
[0016] Preferably, in step S3, when the variable area is preset, the shape of the variable area is a default square, the size of the variable area is a preset value S, and when the variable area is preset, the variable area is provided with a buffer zone, and the area of the buffer zone is Sa.
[0017] Preferably, the step S3 further comprises the following sub-steps:
[0018] S31, the image processing software is connected to the database to obtain the resolution of the variable filling pattern;
[0019] S32, after obtaining the resolution, comparing it with the resolution of the image to be printed;
[0020] S33, setting a blank coordinate system, placing the image to be printed and the variable filling pattern in the blank coordinate system;
[0021] S34, virtually print the image to be filled and the blank coordinate system of the variable fill pattern, 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, according to the comparison result of step S32, when the resolutions are inconsistent, the printer first prints the image to be printed according to the resolution of the image to be printed, and then the paper feed motor returns the printing medium, and prints the variable fill pattern in the filled blank coordinate system for the second time in the same printing medium.
[0023] Preferably, when the variable filling pattern in the filled blank coordinate system is printed for the second time, white ink printing is performed first, the coverage area is the area S of the variable region, and then the variable filling pattern is printed.
[0024] Preferably, when white ink printing is performed to cover the variable area, the concentration and number of covering layers of the white ink can be automatically adjusted according to the color depth of the variable area and the contrast of the background image.
[0025] A print file processing device with a variable area includes at least one processor, at least one memory and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the print file processing method with a variable area is implemented.
[0026] A storage medium stores computer program instructions, wherein when the computer program instructions are executed by a processor, the above-mentioned method for processing a print file with a variable area is implemented.
[0027] The present invention solves the current problem of requiring a large amount of processing of prepress files, greatly reducing the prepress workload. The present invention can quickly adapt to different printing needs by establishing a database and presetting variable areas, and uses coordinate calculation and comparison to ensure that graphics and images are printed at accurate positions to avoid misalignment, automatically adjust resolution, calibrate printing information, and perfectly combine images and patterns, making it suitable for a variety of situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of a printing file processing method with a variable area of the present invention. DETAILED DESCRIPTION
[0029] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.
[0030] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0031] Example 1
[0032] A method for processing a print file with a variable area comprises the following steps:
[0033] S1, establish a database containing all variable filling patterns;
[0034] Step S1 is specifically that, in a print file, the variable fill pattern is a pre-set drawing template, and the template contains variable areas, such as numbers, serial numbers, dates or production numbers, etc., and also contains fixed areas, such as trademark patterns or product icons, etc. The information of the variable area is calculated according to the set algorithm, such as the date, which is changed by reading the Internet date, such as the numbering, printing n copies of the file, each numbered 1st, 2nd, ....n; and the fixed area refers to a fixed area in a single print file, which is also different in different print files.
[0035] S2, loading the image to be printed into the image processing software and establishing a coordinate system on the image;
[0036] Step S2 specifically includes, in a print file, using image processing software with vector data such as PS to process the image to be printed.
[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 is not enough to completely fill the variable fill pattern, or the resolution between the two is not right, resulting in deviation of the boundary of the print head during printing, etc.;
[0038] Preferably, the step S3 further comprises the following sub-steps:
[0039] S31, the image processing software is connected to the database to obtain the resolution of the variable filling pattern;
[0040] S32, after obtaining the resolution, comparing it with the resolution of the image to be printed;
[0041] S33, setting a blank coordinate system, placing the image to be printed and the variable filling pattern in the blank coordinate system;
[0042] S34, virtually print the image to be filled and the blank coordinate system of the variable fill pattern, 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 a graphic file from the database, import it into the printer, and import the image into the printer for printing at the same time. The printer reads the print data line by line. For each line of data, the position of the current line in the XY direction of the entire pattern is calculated according to a pre-set algorithm for printing.
[0044] Preferably, step S4 specifically includes comparing the calculated X and Y direction positions of the current row coordinates with the preset values of the corresponding pattern stored in the database. When the position meets the requirements, printing of the graphic file in the database begins; when the position does not meet the requirements, printing of the image is switched.
[0045] Preferably, in step S1, the database includes generating a numbering pattern and generating a QR code pattern, and the variable filling pattern includes a serial numbering pattern and a QR code pattern.
[0046] Preferably, in step S3, when the variable area is preset, the shape of the variable area is a default square, the size of the variable area is a preset value S, and when the variable area is preset, the variable area is provided with a buffer zone, and the area of the buffer zone is Sa.
[0047] Preferably, in step S4, according to the comparison result of step S32, when the resolutions are inconsistent, the printer first prints the image to be printed according to the resolution of the image to be printed, and then the paper feed motor returns the printing medium, and prints the variable fill pattern in the filled blank coordinate system for the second time in the same printing medium.
[0048] Preferably, when the variable filling pattern in the filled blank coordinate system is printed for the second time, white ink printing is performed first, the coverage area is the area S of the variable region, and then the variable filling pattern is printed.
[0049] Preferably, when white ink printing is performed to cover the variable area, the concentration and number of covering layers of the white ink 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 filling and no fill color. The color filling is white filling by default, or other colors can be selected for filling, which requires prepress processing. The no fill color, that is, the remaining part, is the partial pattern of the image to be printed that is not filled with the variable fill pattern.
[0051] A print file processing device with a variable area includes at least one processor, at least one memory and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the print file processing method with a variable area is implemented.
[0052] A storage medium stores computer program instructions, wherein when the computer program instructions are executed by a processor, the above-mentioned method for processing a print file with a variable area is implemented.
[0053] Example 2
[0054] The difference between this embodiment and the first embodiment is that a method for processing a print file with a variable area includes the following steps:
[0055] S1, the printer creates a printing template and determines the layout and style of pattern A and pattern B. Pattern A is designed as a fixed background element. Its position, size, color, transparency and other attributes 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 in a specific color and font.
[0056] Pattern B is a variable pattern, and its basic shape and structure are designed, such as a rectangle, circle or a specific graphic frame. At the same time, the display position and format requirements of the variable information in pattern B are determined, such as the font, font size, color of the text, and the precision of the numbers. For example, pattern B is a rectangular frame with an area reserved inside for displaying variable information such as product number and production date. It is stipulated that the product number is displayed in 10-point font and black, and the production date format is "YYYY-MM-DD".
[0057] Integrate pattern A and pattern B to form a printing template. In the design software, combine pattern A and pattern B according to the predetermined layout and adjust their relative positions and hierarchical relationships. Ensure that the variable area of pattern B is clearly marked and positioned in the template to facilitate the subsequent filling of variable information. After completing the design, save the printing template in a format that the printer can recognize, such as PDF or a specific printer instruction file format.
[0058] S2, prepare to print pattern A, check the integrity of pattern A materials, open the source file of pattern A in the computer, and check whether all components are complete, such as whether the image file exists and whether the font is installed correctly. If the material is found to be missing or damaged, repair or replace it in time to ensure that pattern A can be printed normally. Calibrate and optimize the color of pattern A, use the color management tool to calibrate the color of pattern A to ensure that the color displayed and printed on different devices is consistent. According to the printing requirements, optimize the color of pattern A, such as increasing the contrast and adjusting the color saturation, to obtain better printing effects.
[0059] Printing test and adjustment: Before formally printing a large number of pattern A, first conduct a small-scale printing test. Check whether the printed pattern A has problems such as blur, ghosting, color deviation, etc. According to the test results, adjust the printer parameters, such as printing resolution, ink volume, color balance, etc., until a satisfactory printing effect is obtained. At the same time, record the best printer parameter settings for use in subsequent large-scale printing.
[0060] S3, prepare variable pattern B, collect materials related to variable pattern B according to printing task requirements, such as databases, spreadsheets or text files used to generate variable information, etc. Ensure that the data in the materials are accurate and the format meets the requirements, and organize and pre-process the materials, such as removing duplicate data and correcting incorrect formats.
[0061] Determine the generation rules of variable pattern B. According to the printing business logic, determine the generation rules and algorithms of variable information in variable pattern B. For example, the generation rules of product numbers may be generated according to a certain coding system combined with date and serial number; the generation rules of barcodes or QR codes are based on the corresponding coding standards to convert product information into scannable graphics. At the same time, consider the length range and possible changes of variable information to ensure that variable pattern B can adapt to different data contents.
[0062] Create a template file for variable pattern B. If the structure of variable pattern B is relatively complex or needs to be modified frequently, you can create a template file for variable pattern B in the graphic design software. In the template file, define the position, shape and style of the variable area, and establish an association with the data source for generating variable information. In this way, each time you need to generate variable pattern B, you can quickly generate it based on the template file, thereby improving work efficiency.
[0063] S4, establish variable information of variable pattern B, data source connection and data extraction, connect the corresponding data source according to the generation rule of variable pattern B. 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 verification: convert the extracted variable information data according to the format requirements defined in pattern B. For example, convert digital data to the specified precision format, and convert date data to the "YYYY-MM-DD" format. At the same time, verify the validity of the converted data to check whether the data complies with business rules and printing requirements. For example, whether the product number is unique, whether the date is within a reasonable range, etc. If data errors are found, correct them in time or prompt the user to handle them.
[0065] Generate the graphic file of variable pattern B. Use the graphic processing library or plug-in to generate the graphic file of variable pattern B according to the variable information data and the predetermined generation rules. During the generation process, ensure that the variable information is accurately filled into the corresponding position of pattern B and displayed according to the set style. For example, display the product number in the number area of pattern B with the specified font and color, and generate the barcode or QR code according to the correct coding standard and place it in the corresponding position. The generated variable pattern B graphic file should be saved in a format that can be recognized by the printer, such as PNG, JPEG or PDF.
[0066] S5, input the print pattern A into the printer for the first print, and set appropriate printer parameters in the printer driver or print management software according to the characteristics of pattern A and the printing requirements. This includes selecting the paper type, paper size, print quality, print color mode, and number of copies. Ensure that the printer parameters match the design and printing requirements of pattern A to obtain the best printing effect.
[0067] Submit and monitor the print task. Send the prepared print pattern A to the printer to submit the print task. During the printing process, monitor the printing progress in real time. You can check the number of printed pages 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 working status of the printer, such as whether there is a paper jam or whether the ink cartridge is normal. If an abnormal situation is found, suspend the print task in time and handle it to avoid wasting printing media and time.
[0068] After printing, check and process. After printing pattern A, take out the printed paper from the printer output tray and conduct a preliminary inspection. Check whether the printing quality of pattern A meets the requirements, including whether the color is accurate, the image is clear, and the text is complete. If a small number of printing defects are found, such as slight color deviation or unclear individual ink dots, decide whether to fine-tune the printer and reprint according to the specific situation. For qualified printed pattern A, arrange it and place it in the designated location, ready for the next step of printing pattern B.
[0069] S6, the paper feed motor returns the print medium for the second printing, printing pattern B. In the printer control system, a command is sent to make the paper feed motor return the print medium accurately to the starting printing position of pattern B. Ensure that the position of the print medium is consistent with the positioning of pattern B in the template to avoid the printing deviation of pattern B. This may require the printer to have precise paper feed motor control function and positioning sensor to achieve millimeter-level positioning accuracy.
[0070] Adjust the printer parameters. Check again whether the printer parameters are appropriate according to the characteristics of pattern B and the printing requirements. If there are differences in print quality, color mode or paper handling between pattern B and pattern A, adjust the printer parameters accordingly. For example, if pattern B is a color barcode and requires higher printing accuracy, you may need to set the print quality to high resolution, select the color printing mode, and adjust the ink volume and other parameters to ensure that pattern B can be printed clearly and accurately on the paper on which pattern A has been printed.
[0071] Print and quality check of pattern B, send the generated variable pattern B graphic file to the printer for a second print. During the printing process, also pay close attention to the printer's working status and printing progress to ensure that pattern B is printed smoothly. After printing is completed, conduct a comprehensive quality check on the entire printed page. Check whether the variable information in pattern B is displayed correctly, such as whether the product number, production date, etc. are consistent with the data source; whether the barcode or QR code can be scanned and read normally; whether the combination of pattern B and pattern A is natural and beautiful, without overlap or misalignment. If any problems are found, handle them accordingly according to the type of problem, such as regenerating variable pattern B and printing, adjusting printer parameters and printing again, or adjusting the print medium and printing again.
[0072] Preferably, in the 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 by image recognition, and the N-1th printing result is compared with the Nth printing result to determine whether there is a problem in the calculation logic of the variable information of pattern B.
[0073] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for processing a print file with a variable area, characterized in that: The steps include: S1, establish a database containing all variable filling patterns; S2, loading the image to be printed into the image processing software and establishing a coordinate system on the image; S3, inputting the coordinates of the variable area according to the coordinate system, and setting the coordinate area as the variable area; S4, select a graphic file from the database, import it into the printer, and import the image into the printer for printing at the same time. The printer reads the print data line by line. For each line of data, the position of the current line in the XY direction of the entire pattern is calculated according to a pre-set algorithm for printing.
2. A method for processing a print file with a variable area according to claim 1, characterized in that: In the step S1, the database includes generating a number pattern and generating a two-dimensional code pattern, and the variable filling pattern includes a serial number pattern and a two-dimensional code pattern.
3. A method for processing a print file with a variable area according to claim 1, characterized in that: In step S3, when the variable area is preset, the shape of the variable area is a default square, the size of the variable area is a preset value S, and when the variable area is preset, the variable area is provided with a buffer zone, and the area of the buffer zone is Sa.
4. A method for processing a print file with a variable area according to claim 1, characterized in that: The step S3 further comprises the following sub-steps: S31, the image processing software is connected to the database to obtain the resolution of the variable filling pattern; S32, after obtaining the resolution, comparing it with the resolution of the image to be printed; S33, setting a blank coordinate system, placing the image to be printed and the variable filling pattern in the blank coordinate system; S34, virtually print the image to be filled and the blank coordinate system of the variable fill pattern, 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.
5. A method for processing a print file with a variable area according to claim 1, characterized in that: Step S4 specifically compares the calculated X and Y direction positions of the current row coordinates with the preset values of the corresponding pattern stored in the database. When the position meets the requirements, the graphic file in the database is printed. When the position does not meet the requirements, the image is printed.
6. A method for processing a print file with a variable area according to claim 1, characterized in that: In step S4, according to the comparison result of step S32, when the resolutions are inconsistent, the printer first prints the image to be printed according to the resolution of the image to be printed, and then the paper feed motor returns the printing medium, and prints the variable fill pattern in the filled blank coordinate system for the second time in the same printing medium.
7. A method for processing a print file with a variable area according to claim 1, characterized in that: When the variable filling pattern in the filled blank coordinate system is printed for the second time, white ink printing is performed first, covering an area S of the variable region, and then the variable filling pattern is printed.
8. A method for processing a print file with a variable area according to claim 1, characterized in that: When white ink is printed to cover a variable area, the concentration and number of layers of white ink can be automatically adjusted according to the color depth of the variable area and the contrast of the background image.
9. A printing document processing device with a variable area, characterized in that: The method comprises at least one processor, at least one memory and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.
10. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Image rendering method and device and storage medium
CN113436306A
Detection method and device for mark point positioning printing based on 2D vision and storage medium
CN117495961A
Printing data processing method and device, computer equipment and storage medium
CN117785077A
Label printing method and device, electronic equipment and storage medium
CN117971140A
Method and equipment for positioning and printing deformed embroidery cloth and storage medium
CN118560178A
Cited By
Electronic file collection method and device based on virtual printing, equipment and medium
CN121300725A
Virtual printing-based electronic file collection method and device, equipment and medium
CN121300725B
Pre-press file intelligent auditing method and system based on multi-agent collaboration
CN122334220A