CN111596869A - Printing data typesetting method and device, printer and storage medium - Google Patents

Printing data typesetting method and device, printer and storage medium Download PDF

Info

Publication number
CN111596869A
CN111596869A CN202010358673.XA CN202010358673A CN111596869A CN 111596869 A CN111596869 A CN 111596869A CN 202010358673 A CN202010358673 A CN 202010358673A CN 111596869 A CN111596869 A CN 111596869A
Authority
CN
China
Prior art keywords
data
page
area
printing
printable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010358673.XA
Other languages
Chinese (zh)
Other versions
CN111596869B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Hanyin Electronic Technology Co Ltd
Original Assignee
Xiamen Hanyin Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Hanyin Electronic Technology Co Ltd filed Critical Xiamen Hanyin Electronic Technology Co Ltd
Priority to CN202010358673.XA priority Critical patent/CN111596869B/en
Publication of CN111596869A publication Critical patent/CN111596869A/en
Application granted granted Critical
Publication of CN111596869B publication Critical patent/CN111596869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Abstract

The embodiment of the invention provides a method, a device, equipment and a storage medium for typesetting print data, which relate to the technical field of printers, and the method comprises the following steps: when a printing instruction is received, acquiring data to be printed and storing the data in a buffer area; receiving the data to be printed in the buffer area character by character and typesetting on a printable logic area preset on the current page, and when judging that the whole occupied area of the characters on the printable logic area is about to exceed the printable logic area, abandoning the characters which are not received in the buffer area and generating the typesetting of the printing page; and printing the current page according to the printing page layout. The invention can judge the pre-filling position of the character, accurately judge the containable data of the current page and avoid overlapped printing.

Description

Printing data typesetting method and device, printer and storage medium
Technical Field
The invention relates to the technical field of printers, in particular to a method and a device for typesetting print data, a printer and a storage medium.
Background
The computer controls the operation of the printer by a software command method through a printing control language, analyzes and executes printing data, organizes a printed document, and acquires a printing result. For the complex functions implemented by the printer, the print control language is the basis, and is directly related to the quality of the print.
The printing modes of a printer are generally classified into: a normal character print mode, a bitmap print mode, and a page print mode. In the page printing mode, the printing content is divided into a plurality of blocks through a printing control language, each block is regarded as one page, and the data of each page is packaged into one packet for processing. In the page printing mode, the printer end needs to be configured with a large-capacity cache, and the received data is temporarily stored in the cache until the data is received in one page. If the set range of the page is exceeded in the printing process, the condition of overlapped printing can occur on the excessive data due to improper character boundary processing of the page mode of the printer.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method and an apparatus for typesetting print data, a printer and a storage medium, so as to solve the problem of print overlap in the page print mode in the prior art.
The embodiment of the invention provides a printing data typesetting method, which comprises the following steps:
when a printing instruction is received, acquiring data to be printed and storing the data in a buffer area;
receiving the data to be printed in the buffer area character by character and typesetting on a printable logic area preset on the current page, and when judging that the whole occupied area of the characters on the printable logic area is about to exceed the printable logic area, abandoning the characters which are not received in the buffer area and generating the typesetting of the printing page;
and printing the current page according to the printing page layout.
Preferably, the method further comprises the following steps:
acquiring a printable logic area, a page printing direction and a printing initial position; wherein the content of the first and second substances,
the printable logic area comprises a printable logic width and a printable logic height; the page printing direction is from left to right, from bottom to top, from right to left or from top to bottom.
Preferably, the character-by-character receiving the data to be printed in the buffer area and typesetting on a printable logic area preset on the current page, and when it is determined that the overall occupied area of the characters on the printable logic area will exceed the printable logic area, discarding the characters not received in the buffer area and generating the typesetting of the printed page, specifically:
obtaining a currently received character from the buffer;
acquiring dot matrix data corresponding to the current character in a word stock;
acquiring a first preset position of the current dot matrix data in a current line of the printable logic area according to the coordinates of the previous dot matrix data;
judging whether the first preset position transversely exceeds the boundary of the current line of the printable logic area;
if not, setting the dot matrix data at a first preset position;
if so, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position;
judging whether the second preset position exceeds the boundary of the printable logic area in the longitudinal direction;
if not, setting the dot matrix data at a second preset position;
if yes, discarding the currently received characters and the characters which are not received in the buffer area to generate the printing page layout.
Preferably, the method further comprises the following steps:
and when the second preset position does not exceed the boundary of the printable logic area in the longitudinal direction, continuously receiving the data to be printed in the buffer area character by character.
An embodiment of the present invention further provides a print data composition apparatus, including:
the buffer unit is used for acquiring data to be printed and storing the data in the buffer area when a printing instruction is received;
the page data typesetting unit is used for receiving the data to be printed in the buffer area character by character and typesetting on a printable logic area preset on the current page, and when the whole occupied area of the characters on the printable logic area is judged to exceed the printable logic area, the characters which are not received in the buffer area are abandoned, and the typesetting of the printed page is generated;
and the printing unit is used for printing the current page according to the layout of the printing page.
Preferably, the method further comprises the following steps:
a print setting acquisition unit for acquiring a printable logical area, a page printing direction, and a print start position; wherein the content of the first and second substances,
the printable logic area comprises a printable logic width and a printable logic height; the page printing direction is from left to right, from bottom to top, from right to left or from top to bottom.
Preferably, the page data layout unit is specifically configured to:
obtaining a currently received character from the buffer;
acquiring dot matrix data corresponding to the current character in a word stock;
acquiring a first preset position of the current dot matrix data in a current line of the printable logic area according to the coordinates of the previous dot matrix data;
judging whether the first preset position transversely exceeds the boundary of the current line of the printable logic area;
if not, setting the dot matrix data at a first preset position;
if so, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position;
judging whether the second preset position exceeds the boundary of the printable logic area in the longitudinal direction;
if not, setting the dot matrix data at a second preset position;
if yes, discarding the currently received characters and the characters which are not received in the buffer area to generate the printing page layout.
Preferably, the page data layout unit is further configured to:
and when the second preset position does not exceed the boundary of the printable logic area in the longitudinal direction, continuously receiving the data to be printed in the buffer area character by character.
Embodiments of the present invention also provide a printer, including a controller and a print head connected to the controller, where the controller is configured to execute a computer program stored therein to implement the method for typesetting print data as described above.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for typesetting print data as described above.
In the above embodiment, in the process of receiving the data to be printed, the data obtained from the buffer is typeset on the printable logic area, and when the whole occupied area of the characters on the printable logic area is judged to exceed the printable logic area, the characters which are not received in the buffer area are abandoned, the pre-filling position of the characters can be judged, the data which can be accommodated in the current page can be accurately judged, and the overlapped printing is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart illustrating a method for typesetting print data according to a first embodiment of the present invention.
FIG. 2 is a schematic diagram showing a page structure of a layout process of print data according to the first embodiment of the present invention.
FIG. 3 is a schematic structural diagram of a print data layout apparatus according to a second embodiment of the present invention.
Icon: 201-a cache unit; 202-page data typesetting unit; 203-a printing unit; 204-print setting acquisition unit.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In the embodiments, the references to "first \ second" are merely to distinguish similar objects and do not represent a specific ordering for the objects, and it is to be understood that "first \ second" may be interchanged with a specific order or sequence, where permitted. It should be understood that "first \ second" distinct objects may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced in sequences other than those illustrated or described herein.
As shown in fig. 1, a first embodiment of the present invention provides a method for typesetting print data, which can be executed by a printer, and in particular, can be executed by one or more processors in the printer, and includes at least the following steps:
and S101, when a printing instruction is received, acquiring data to be printed and storing the data in a buffer area.
In this embodiment, the printer may be a thermal transfer printer, a thermal printer, an inkjet printer, or the like, and the printer may receive data to be printed in a wired or wireless manner, parse the data to be printed through the print instruction, define various parameters of the print job (such as the number and effect of the printed documents, and the like), organize the printed documents, and then print and output the data to be printed after the current page is laid out.
In this embodiment, in particular, in the page printing mode, the printer is configured with a buffer with a large capacity, the printing content is divided into a plurality of pages, the data of each page is packaged into a packet for processing, the printer temporarily stores the received data in the buffer until the data of one page is received, and then the data printing of one page is executed.
S102, receiving the data to be printed in the buffer area character by character, typesetting on a printable logic area preset on a current page, abandoning the characters which are not received in the buffer area when judging that the whole occupied area of the characters on the printable logic area is about to exceed the printable logic area, and generating the typesetting of the printed page.
S103, printing the current page according to the layout of the printed pages.
In this embodiment, before printing, print setting parameters, including a print start position, a page print direction, a print page range, a printable logic area, print effect settings (such as format, watermark, rendering), and the like, need to be obtained, which is not specifically limited in the present invention.
As shown in fig. 2, the page printing direction may be from left to right, from bottom to top, from right to left, or from top to bottom, etc.
In this embodiment, the printable logical area may be preset, and includes a printable logical width and a printable logical height, which are printable boundary ranges generated according to the size of the current page. After the printing medium of the printer is replaced, the printable logic area matched with the printing medium can be correspondingly set, so that in each printing process, character boundary judgment is carried out according to the preset printable logic area, and the data to be printed is typeset on the printable logic area and then printed to obtain the current page.
In this embodiment, when it is determined that the entire occupied area of the characters on the printable logical area is about to exceed the printable logical area, the characters not received in the buffer area need to be discarded, so as to ensure that the number of characters received by one page of data to be printed is within the range of the printable logical area, and the overlapping printing situation does not occur.
In conclusion, in the process of receiving the data to be printed, the data obtained from the buffer are typeset on the printable logic area, when the whole occupied area of the characters on the printable logic area is judged to exceed the printable logic area, the characters which are not received in the buffer are abandoned, the pre-filling position of the characters can be judged, the data which can be accommodated in the current page can be accurately judged, and the overlapped printing is avoided.
On the basis of the foregoing embodiment, in a preferred embodiment, the step S102 specifically includes:
s1021, obtaining the current receiving character from the buffer area.
And S1022, acquiring the dot matrix data corresponding to the current character from the word stock.
In the present embodiment, data to be printed is received character by character. And when receiving a character to be printed, converting the character into corresponding dot matrix data according to the word stock and typesetting the dot matrix data on the printable logic area.
The word stock is generally built in a printer, is a hardware word stock formed by recording Chinese characters and ASCII code word stocks of a PC (personal computer) into a high-capacity FLASH ROM (read only memory) chip, and can convert information such as characters, pictures or icons into corresponding dot matrix data and transmit the dot matrix data to a printer processor for subsequent processing.
And S1023, acquiring a first preset position of the current dot matrix data in the current line of the printable logic area according to the coordinates of the previous dot matrix data.
S1024, judging whether the first preset position transversely exceeds the boundary of the current line of the printable logic area.
If not, setting the dot matrix data at a first preset position;
if so, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position;
s1025, judging whether the second preset position longitudinally exceeds the boundary of the printable logic area;
if not, setting the dot matrix data at a second preset position;
if yes, discarding the currently received characters and the characters which are not received in the buffer area to generate the printing page layout.
In this embodiment, when typesetting the currently received character on the printable logic area preset on the current page, it needs to sequentially determine whether the typesetting position of the currently received character will exceed the printable logic width D and the printable logic height H of the printable logic area. Wherein the boundary determination may be performed by calculating coordinates of a preset position of the currently received character on the printable logical area.
Specifically, referring to fig. 2, a first preset position of the current dot matrix data corresponding to the currently received character in the current row of the printable logic area may be obtained according to the coordinates of the previous dot matrix data. For example, assume the last latticeThe coordinates of the data are (x)0,y0) The coordinate of the first preset position of the currently received character is (x)1,y1) The abscissa value x of said first preset position1The abscissa value x of the last dot matrix data0Increasing a character width dx, the ordinate value y of the first preset position1Is the ordinate value y of the last dot matrix data0
When x is1<D (i.e., the preset printable logical width), typesetting may continue on the current line. When the coordinate value x of the first preset position1And when the position is more than or equal to D, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position. Wherein, the abscissa value x of the second preset position2A head coordinate value set for the page, and a longitudinal coordinate value y of the first preset position2Is the ordinate value y of the last dot matrix data0One character length dy is added.
When the coordinate value y of the second preset position2<H (i.e. the preset printable logical length), the typesetting may continue in the next line, and the data to be printed in the buffer area continues to be received character by character. When the coordinate value y of the second preset position2And when the current received character and the character which is not received in the buffer area are not less than H, discarding the currently received character and the character which is not received in the buffer area so as to generate the printing page layout.
Referring to fig. 3, a second embodiment of the present invention provides a print data layout apparatus, including:
the buffer unit 201 is configured to, when a printing instruction is received, acquire data to be printed and store the data in a buffer area;
a page data typesetting unit 202, configured to receive the data to be printed in the buffer area character by character and typeset on a printable logic area preset on the current page, and when it is determined that the overall occupied area of the characters on the printable logic area will exceed the printable logic area, discard the characters not received in the buffer area, and generate a printing page typesetting;
and the printing unit 203 is used for printing the current page according to the layout of the printed pages.
Preferably, the method further comprises the following steps:
a print setting acquisition unit 204 for acquiring a printable logical area, a page print direction, and a print start position; wherein the content of the first and second substances,
the printable logic area comprises a printable logic width and a printable logic height; the page printing direction is from left to right, from bottom to top, from right to left or from top to bottom.
Preferably, the page data layout unit 202 is specifically configured to:
obtaining a currently received character from the buffer;
acquiring dot matrix data corresponding to the current character in a word stock;
acquiring a first preset position of the current dot matrix data in a current line of the printable logic area according to the coordinates of the previous dot matrix data;
judging whether the first preset position transversely exceeds the boundary of the current line of the printable logic area;
if not, setting the dot matrix data at a first preset position;
if so, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position;
judging whether the second preset position exceeds the boundary of the printable logic area in the longitudinal direction;
if not, setting the dot matrix data at a second preset position;
if yes, discarding the currently received characters and the characters which are not received in the buffer area to generate the printing page layout.
Preferably, the page data layout unit 202 is further configured to:
and when the second preset position does not exceed the boundary of the printable logic area in the longitudinal direction, continuously receiving the data to be printed in the buffer area character by character.
A third embodiment of the present invention provides a printer comprising a controller and a printhead connected to the controller, the controller being configured to execute a computer program stored therein to perform the method of laying out print data as described above.
A fourth embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of typesetting print data as described above.
Illustratively, the computer programs described herein can be partitioned into one or more modules that are stored in the memory and executed by the processor to implement the invention. The one or more modules may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the implementation device. For example, the device described in the second embodiment of the present invention.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an APPlication Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the printing method, and various interfaces and lines connecting the various parts throughout the implementation of the document printing method.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the printing method by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, a text conversion function, etc.), and the like; the storage data area may store data (such as audio data, text message data, etc.) created according to the use of the user terminal, etc. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
Wherein, the module for realizing the user terminal can be stored in a computer readable storage medium if it is realized in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of typesetting print data, comprising the steps of:
when a printing instruction is received, acquiring data to be printed and storing the data in a buffer area;
receiving the data to be printed in the buffer area character by character and typesetting on a printable logic area preset on the current page, and when judging that the whole occupied area of the characters on the printable logic area is about to exceed the printable logic area, abandoning the characters which are not received in the buffer area and generating the typesetting of the printing page;
and printing the current page according to the printing page layout.
2. The print data layout method according to claim 1, further comprising:
acquiring a printable logic area, a page printing direction and a printing initial position; wherein the content of the first and second substances,
the printable logic area comprises a printable logic width and a printable logic height; the page printing direction is from left to right, from bottom to top, from right to left or from top to bottom.
3. The method for typesetting print data according to claim 1, wherein the receiving the data to be printed in the buffer region character by character and typesetting on the printable logic region preset on the current page, when it is determined that the whole occupied area of the characters on the printable logic region is about to exceed the printable logic region, discarding the characters not received in the buffer region and generating the typesetting for the printed page specifically comprises:
obtaining a currently received character from the buffer;
acquiring dot matrix data corresponding to the current character in a word stock;
acquiring a first preset position of the current dot matrix data in a current line of the printable logic area according to the coordinates of the previous dot matrix data;
judging whether the first preset position transversely exceeds the boundary of the current line of the printable logic area;
if not, setting the dot matrix data at a first preset position;
if so, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position;
judging whether the second preset position exceeds the boundary of the printable logic area in the longitudinal direction;
if not, setting the dot matrix data at a second preset position;
if yes, discarding the currently received characters and the characters which are not received in the buffer area to generate the printing page layout.
4. The print data layout method according to claim 3, further comprising:
and when the second preset position does not exceed the boundary of the printable logic area in the longitudinal direction, continuously receiving the data to be printed in the buffer area character by character.
5. A print data composing apparatus comprising:
the buffer unit is used for acquiring data to be printed and storing the data in the buffer area when a printing instruction is received;
the page data typesetting unit is used for receiving the data to be printed in the buffer area character by character and typesetting on a printable logic area preset on the current page, and when the whole occupied area of the characters on the printable logic area is judged to exceed the printable logic area, the characters which are not received in the buffer area are abandoned, and the typesetting of the printed page is generated;
and the printing unit is used for printing the current page according to the layout of the printing page.
6. The print data composing apparatus according to claim 5, further comprising:
a print setting acquisition unit for acquiring a printable logical area, a page printing direction, and a print start position; wherein the content of the first and second substances,
the printable logic area comprises a printable logic width and a printable logic height; the page printing direction is from left to right, from bottom to top, from right to left or from top to bottom.
7. The apparatus for layout of print data according to claim 5, wherein the page data layout unit is specifically configured to:
obtaining a currently received character from the buffer;
acquiring dot matrix data corresponding to the current character in a word stock;
acquiring a first preset position of the current dot matrix data in a current line of the printable logic area according to the coordinates of the previous dot matrix data;
judging whether the first preset position transversely exceeds the boundary of the current line of the printable logic area;
if not, setting the dot matrix data at a first preset position;
if so, adjusting the placement position of the dot matrix data to the head of the next line to obtain a second preset position;
judging whether the second preset position exceeds the boundary of the printable logic area in the longitudinal direction;
if not, setting the dot matrix data at a second preset position;
if yes, discarding the currently received characters and the characters which are not received in the buffer area to generate the printing page layout.
8. The print data layout device according to claim 7, wherein the page data layout unit is further configured to:
and when the second preset position does not exceed the boundary of the printable logic area in the longitudinal direction, continuously receiving the data to be printed in the buffer area character by character.
9. A printer comprising a controller and a printhead connected to the controller, wherein the controller is configured to execute a computer program stored therein to implement the method of typesetting print data according to any one of claims 1 to 4.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the method of typesetting print data according to any one of claims 1 to 4.
CN202010358673.XA 2020-04-29 2020-04-29 Printing data typesetting method and device, printer and storage medium Active CN111596869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010358673.XA CN111596869B (en) 2020-04-29 2020-04-29 Printing data typesetting method and device, printer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010358673.XA CN111596869B (en) 2020-04-29 2020-04-29 Printing data typesetting method and device, printer and storage medium

Publications (2)

Publication Number Publication Date
CN111596869A true CN111596869A (en) 2020-08-28
CN111596869B CN111596869B (en) 2022-11-18

Family

ID=72185639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010358673.XA Active CN111596869B (en) 2020-04-29 2020-04-29 Printing data typesetting method and device, printer and storage medium

Country Status (1)

Country Link
CN (1) CN111596869B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799615A (en) * 2021-01-25 2021-05-14 武汉先同科技有限公司 Personalized printing control method and system
CN113805808A (en) * 2021-09-10 2021-12-17 珠海趣印科技有限公司 Print data processing method and electronic equipment
CN115760859A (en) * 2023-01-10 2023-03-07 深圳市链科网络科技有限公司 Printing control method and device of thermal printer
CN117472301A (en) * 2023-12-27 2024-01-30 珠海芯烨电子科技有限公司 Thermal printer buffer printing method and related device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334717A (en) * 2007-05-22 2008-12-31 夏普株式会社 Printer driver program and image forming apparatus
CN101727588A (en) * 2008-10-23 2010-06-09 三星电子株式会社 Image forming apparatus and method
CN101923449A (en) * 2009-06-09 2010-12-22 兄弟工业株式会社 Print data processing apparatus and print data processing method
CN103777908A (en) * 2012-10-25 2014-05-07 山东新北洋信息技术股份有限公司 Double-sided printing control method and device and double-sided printer
CN104890238A (en) * 2015-04-30 2015-09-09 北京敏速自动控制设备有限公司 Three-dimensional printing method and system thereof
US20150363678A1 (en) * 2013-01-07 2015-12-17 Peking University Founder Group Co., Ltd. Data processing method, apparatus and ink-jet printer
CN105607879A (en) * 2015-12-21 2016-05-25 珠海奔图电子有限公司 Portrait adjustment control method and apparatus suitable for preprinted paper
CN107953546A (en) * 2017-12-07 2018-04-24 徐素香 A kind of method for improving stock utilization
CN110705503A (en) * 2019-10-14 2020-01-17 北京信息科技大学 Method and device for generating directory structured information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334717A (en) * 2007-05-22 2008-12-31 夏普株式会社 Printer driver program and image forming apparatus
CN101727588A (en) * 2008-10-23 2010-06-09 三星电子株式会社 Image forming apparatus and method
CN101923449A (en) * 2009-06-09 2010-12-22 兄弟工业株式会社 Print data processing apparatus and print data processing method
CN103777908A (en) * 2012-10-25 2014-05-07 山东新北洋信息技术股份有限公司 Double-sided printing control method and device and double-sided printer
US20150363678A1 (en) * 2013-01-07 2015-12-17 Peking University Founder Group Co., Ltd. Data processing method, apparatus and ink-jet printer
CN104890238A (en) * 2015-04-30 2015-09-09 北京敏速自动控制设备有限公司 Three-dimensional printing method and system thereof
CN105607879A (en) * 2015-12-21 2016-05-25 珠海奔图电子有限公司 Portrait adjustment control method and apparatus suitable for preprinted paper
CN107953546A (en) * 2017-12-07 2018-04-24 徐素香 A kind of method for improving stock utilization
CN110705503A (en) * 2019-10-14 2020-01-17 北京信息科技大学 Method and device for generating directory structured information

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799615A (en) * 2021-01-25 2021-05-14 武汉先同科技有限公司 Personalized printing control method and system
CN113805808A (en) * 2021-09-10 2021-12-17 珠海趣印科技有限公司 Print data processing method and electronic equipment
CN113805808B (en) * 2021-09-10 2023-06-27 珠海趣印科技有限公司 Print data processing method and electronic equipment
CN115760859A (en) * 2023-01-10 2023-03-07 深圳市链科网络科技有限公司 Printing control method and device of thermal printer
CN117472301A (en) * 2023-12-27 2024-01-30 珠海芯烨电子科技有限公司 Thermal printer buffer printing method and related device
CN117472301B (en) * 2023-12-27 2024-03-12 珠海芯烨电子科技有限公司 Thermal printer buffer printing method and related device

Also Published As

Publication number Publication date
CN111596869B (en) 2022-11-18

Similar Documents

Publication Publication Date Title
CN111596869B (en) Printing data typesetting method and device, printer and storage medium
US8373888B2 (en) Printer driver program and image forming apparatus
US6665081B1 (en) Print system printer driver and printer
JP4458176B2 (en) Printing control apparatus, printing apparatus, and program
US8792124B2 (en) Print control apparatus, image forming system, and non-transitory computer readable medium
EP2657034B1 (en) Bi-color duplex printing method and device
US9158485B2 (en) Image processing device that performs image processing for variable printing and host data generating device
CN111813350B (en) Method, device and equipment for sending print data and storage medium
US20050179932A1 (en) Print control method and image forming apparatus
US20190369927A1 (en) Information processing apparatus and non-transitory computer readable medium storing program
US8159708B2 (en) Apparatus for accelerated processing of print data by maximizing word-boundary accesses of image data
US7812974B2 (en) Image processing apparatus for arranging content onto a reduced number of output pages
CN114879920A (en) Printing data typesetting method and device, printer, electronic equipment and storage medium
JP2005158034A (en) Printing method, printing control apparatus, printing apparatus, and control method therefor
US8614817B2 (en) Computer readable medium having print control program, print controller and computer executable method using the print control program
JP5244770B2 (en) Image forming apparatus
JP2000326560A (en) Printing system using serial printer, intermediate hardware therefor, and serial printer
US10152657B2 (en) Image processing apparatus and image processing method of color image
US8482777B2 (en) Image information processing device including comparing unit for printing processing system, computer-readable medium and image information processing method for the same
JP2010181999A (en) Printing system, printer, and print control program
US9471022B2 (en) Print control apparatus, print control method, image forming system, and non-transitory computer readable medium
US11029904B2 (en) Printing apparatus capable of converting image data
JP2006218819A (en) Image formation apparatus, image processing apparatus, program, and image processing method
JP2002316428A (en) Printer and printer information processing method
JP2021041698A (en) Image forming apparatus, image formation method and information processing program

Legal Events

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