This application is based upon and claims the benefit of priority from the corresponding Japanese Patent Application No. 2010-108118, filed in the Japan Patent Office on May 10, 2010, the entire contents of which is incorporated herein by reference.
1. Technical Field
The present disclosure relates to an image forming apparatus, a computer-readable recording medium on which a print data processing program code is recorded, and a print data processing method.
2. Description of the Related Art
A typical image forming apparatus receives print data from a host apparatus.
The host apparatus spools the print data once, divides the print data that has a large data size when the print data is to be sequentially transmitted to a printer, and sequentially deletes those data pieces whose prints have been completed.
The image forming apparatus processes the print data transmitted from the host apparatus by integrating the pieces of divided data in the image forming apparatus. To process the pieces of divided print data, the image forming apparatus consumes an amount of resources equivalent to normal (undivided) print data.
Alternatively, the host apparatus analyzes the print data and performs a reconstruction using data necessary for the printing to be transmitted to the printer. The analysis on the print data, the reconstruction, and the transmission are carried out in sequential processings instead of parallel processings.
At the time of the printing, if settings exist such as a number of copies of the print data and a sheet size, setting information is added to the print data after the reconstruction. The image forming apparatus analyzes the print data to obtain the setting information. For this reason, the analysis on the print data is redundantly carried out by both the host apparatus and the image forming apparatus.
In a case where the print data is constructed by a plurality of files like an XPS document format, the image forming apparatus expands files necessary for the print processing in sequence among compressed files to perform the printing. According to this configuration, since the files are not expanded all at once, a memory amount necessary for the data storage after the expansion may be reduced. However, as all the pieces of the received data are stored, memory is needed for spooling not only the compressed files used for the printing but also the compressed files that are not used for the printing.
An image forming apparatus according to an embodiment of the present disclosure includes a data reception unit, a data analysis unit, and a print image generation unit. The data reception unit is configured to receive print data. The data analysis unit is configured to analyze the print data for each of a plurality of blocks, delete a block of a page that is not specified as a print target on the basis of print setting information included in the print data, and rearrange the blocks in a page order to be printed, in order to generate reconstructed print data. The print image generation unit is configured to generate print image data on the basis of the reconstructed print data.
A non-transitory computer-readable recording medium according to an embodiment of the present disclosure stores a print data processing program code executed by a computer of an image forming apparatus. The print data processing program code includes first to third sub-program codes. The first sub-program code causes the computer to receive print data. The second sub-program code causes the computer to analyze the print data for each of a plurality of blocks, delete a block of a page that is not specified as a print target on the basis of print setting information included in the print data, and rearrange the blocks in a page order to be printed, in order to generate reconstructed print data. The third sub-program code causes the computer to generate print image data on the basis of the reconstructed print data.
A print data processing method according to an embodiment of the present disclosure includes: (i) a reception unit receiving print data; (ii) a data analysis unit analyzing the print data for each of a plurality of blocks, deleting a block of a page that is not specified as a print target on the basis of print setting information included in the print data, and rearranging the blocks in a page order to be printed, in order to generate reconstructed print data; and (iii) a print image generation unit generating print image data on the basis of the reconstructed print data by a print image generation unit.
Additional features and advantages are described herein, and will be apparent from the following Detailed Description and the figures.
In the accompanying drawings:
Hereinafter, embodiments of the present disclosure will be described on the basis of the drawings.
In
Data storage device 2 is a storage having a recording medium on which the program code, data, and the like are recorded. For data storage device 2, a flash memory, a hard disk drive, or the like is used.
Communication interface 3 is a device that performs a data communication with an external apparatus. For communication interface 3, a peripheral device interface, a network interface, or the like is used.
Output device 4 is a device that outputs an image such as a printer or a display.
Arithmetic processing device 1 has CPU (Central Processing Unit) 11, ROM (Read Only Memory) 12, RAM (Random Access Memory) 13, VRAM (Video RAM) 14, and I/Fs (interfaces) 15 to 17 that can mutually perform a data communication via a bus or a controller.
CPU 11 is a processor that loads a program code including a print data processing program code stored in data storage device 2 or ROM 12 onto RAM 13, executes the program code, and performs a program described in the program code. ROM 12 is a non-volatile memory that stores the program code and data. RAM 13 is a memory that temporarily stores the program code and data when the program code is executed. RAM 13 is used also when the data processed by arithmetic processing device 1 is spooled.
VRAM 14 is a memory that stores color values of respective pixels in a drawing area corresponding to output device 4.
I/F 15 is an interface circuit that can connect data storage device 2. I/F 16 is an interface circuit that can connect communication interface 3. I/F 17 is an interface circuit that can connect output device 4.
When the print data processing program code stored in the ROM or the data storage device is executed, arithmetic processing device 1 functions as data reception unit 31, data analysis unit 32, drawing data processing unit 33, drawing unit 34, output unit 35, memory management unit 36, and system control unit 37.
Data reception unit 31 performs a data communication with a device such as a host computer via communication interface 3.
Data analysis unit 32 analyzes the received data to extract a drawing command or the like. Data analysis unit 32 analyzes the print data for each of a plurality of data blocks to obtain data structure information and print setting information included in the print data. Data analysis unit 32 deletes a data block that is not used for printing and a data block of the data structure information on the basis of the data structure information. On the basis of the print setting information, data analysis unit 32 deletes a data block of a page that is not specified as a print target. After that, data analysis unit 32 rearranges the data blocks in the print data in a page order to be printed, in order to generate reconstructed print data.
The data structure information may represent documents included in the print data and pages included in the respective documents. If the print data is XPS (XML Paper Specification) data, the data structure information is included in “[Content_Types].xml”, “rels/.rels”, or the like. The data structure information is further included in another file specified in “[Content_Types].xml” and “_rels/.rels” such as, for example, “FixedDocSeq.fdseq”.
If the print data is the XPS data, the print setting information is included in a print ticket named “˜PT.xml”. The print setting information specifies a number of copies to be printed, a sheet size, a page number of the print target, and the like.
Drawing data processing unit 33 causes drawing unit 34 to perform a drawing processing corresponding to the drawing command extracted by data analysis unit 32. On the basis of the drawing command, drawing data processing unit 33 generates a display list. On the basis of the display list generated by drawing data processing unit 33, drawing unit 34 generates a bitmap image. Drawing unit 34 writes the bitmap data into VRAM 14.
A pair comprising the drawing data processing unit 33 and drawing unit 34 functions as a print image generation unit that generates print image data constructed from the bitmap image on the basis of the print data processed by data analysis unit 32. The print image generation unit obtains the data structure information from data analysis unit 32 as specific parameter data (that is, binary data). The print image generation unit generates the print image data on the basis of the obtained specific parameter data and the reconstructed print data. The particular parameter data is an item described in the data block of the data structure information. If the data block is described in XPS, a parameter name is identified from a tag in the XPS element, and a parameter value is identified from a value of the XPS element.
Output unit 35 supplies the bitmap image in VRAM 14 to output device 4 to cause output device 4 to perform an image output (such as printing).
Memory management unit 36 manages the memory in the arithmetic processing device. System control unit 37 controls the respective units in the arithmetic processing device.
Next, the operation of the image forming apparatus according to the present embodiment, mainly, data analysis unit 32, will be described.
If the data reception unit receives the data block in the print data via the communication interface (step S1), the data analysis unit determines whether or not the received data block corresponds to either the data structure information or the print setting information (step S2).
At this time, if the current print data is the XPS data, the XPS is composed of one ZIP file and contains a plurality of files as the data block. Among these files, files such as “[Content_Types].xml”, “FixedDocSeq.fdseq”, “FixedDoc.fdoc”, and “1.fpage.rels” are determined as the data block of the data structure information. Also, the file named “˜PT.xml” is determined as the data block of the print setting information.
If the received data block is not the data block of either the data structure information or the print setting information, the data analysis unit determines whether or not all the pieces of the data structure information with regard to the current print data are received (step S3).
If some data structure information is not received with regard to the current print data, the data analysis unit spools the received data block in RAM to be added to a data block list in the RAM (step S4). At this time point, since not all the pieces of the data structure information are known, the following two items are not yet determined: (1) whether or not the received data block is necessary for the printing and (2) an optimal arrangement position of the data block. Therefore, the received data block is spooled once in the RAM.
On the other hand, if the received data block is the data block of either the data structure information or the print setting information (step S2), the data analysis unit analyzes the received data block to obtain the data structure information or the print setting information. The data analysis unit obtains the data structure information as specific parameter data used for the processing in the print image generation unit. The data analysis unit stores the obtained specific parameter data in the RAM together with the already received data structure information and print setting information (step S5). The data analysis unit deletes the analyzed data block. Then, the data analysis unit determines whether or not all the pieces of the data structure information with regard to the current print data are received (step S6).
If all the pieces of the data structure information with regard to the current print data are received, the data analysis unit identifies the data block that is not used for the printing among the data blocks spooled in the RAM. Then the data analysis unit deletes the identified data block from the RAM on the basis of the specific parameter data with regard to the data structure information stored in the RAM (step S7). Furthermore, the data analysis unit determines whether or not all the pieces of the print setting information with regard to the current print data are received (step S8). Then, if all the pieces of the print setting information are received, on the basis of the specific parameter data with regard to the print setting information stored in the RAM, the data analysis unit identifies the data block that is not specified as the print target among the data blocks spooled in the RAM. The data analysis unit deletes the identified data block from the RAM (step S9). If the data structure information that is not received with regard to the current print data exists, the data analysis unit does not perform the processings in steps S7 to S9. To elaborate, when all the pieces of the data structure information with regard to the current print data become apparent, the unnecessary data block is deleted. Also, once all the pieces of the data structure information are received and all the pieces of the print setting information are received, (from among the data blocks spooled in the RAM) the data block of the page that is not specified as the print target on the basis of the print setting information is deleted from the RAM.
Also, when a data block other than the data structure information and the print setting information is received (step S2: No), if the data blocks of all the pieces of the data structure information are already received (step S3: Yes), the data analysis unit verifies the received data block. To be more specific, the data analysis unit determines whether or not the received data block is to be used for the printing on the basis of the specific parameter data with regard to the data structure information stored in the RAM (step S10). If the received data block is not to be used for the printing, the received data block is not spooled in the RAM and is not added to the data block list.
If the received data block is to be used for the printing, the data analysis unit determines whether or not the reception of the data blocks of all the pieces of the print setting information is completed (step S11). If the reception of the data blocks of all the pieces of the print setting information is not completed, the data analysis unit spools the received data block in the RAM. Then the data analysis unit adds the received data block to the data block list in the RAM (step S4). On the other hand, if the data blocks of all the pieces of the print setting information are received, the data analysis unit determines whether or not the received data block corresponds to the page specified as the print target on the basis of the specific parameter data with regard to the print setting information stored in the RAM (step S12). If the received data block corresponds to a block of the page specified as the print target, the data analysis unit spools the received data block in the RAM. Then the data analysis unit adds the received data block to the data block list in the RAM (step S4). On the other hand, if the received data block does not correspond to the page specified as the print target, the received data block is not spooled in the RAM and is not added to the data block list.
In this manner, for each of the data blocks of the current print data, the processings in steps S1 to S12 are performed. The data analysis unit determines whether or not all the pieces of the current print data are received (step S13). If all the data blocks are not received, the data analysis unit performs the processings in steps S1 to S12 with regard to the subsequent data block.
If all the pieces of the current print data are received, the data analysis unit updates the content of the data structure information to optimize the arrangement order of the data blocks with respect to the subsequent processing (step S14). The data analysis unit rearranges the data blocks to generate reconstructed print data on the basis of the updated data structure information (step S15). The data analysis unit stores the updated data structure information, that is, the data structure information of the reconstructed print data in the RAM as the specific parameter data. Also, the data analysis unit stores the content of the print setting information in the RAM as the specific parameter data. Furthermore, the data analysis unit stores the reconstructed print data composed of the data blocks after the rearrangement in the data storage device. The reconstructed print data is composed of the data blocks used for the printing and specified as the print target and does not include the other data structure information, print setting information, and the like.
As illustrated in
The reconstructed print data illustrated in
In XPS print data illustrated in
Reconstructed print data illustrated in
While referring to the data structure information (the specific parameter data) stored in the RAM, the print image generation unit generates print image data from the print data obtained by rearranging the data blocks. The output unit controls the output device to perform the image output (such as the printing) on the basis of the generated print image data.
According to this configuration, the print image generation unit can refrain from analyzing the print data again and obtaining the data structure information. Therefore it is possible to increase the processing speed for the print data.
With the image forming apparatus according to the present embodiment, in the pre-processing at the time of spooling, the data block of the page that is not specified as the print target is deleted, and the data blocks are rearranged in the order suitable to the subsequent data processing. Therefore it is possible to increase the speed of the subsequent data processing while the resources, such as memory, are conserved.
It should be noted that the above-mentioned embodiment is an example of the present disclosure, but the present disclosure is not limited to these, and various modifications and alterations can be made without departing from the gist of the present disclosure.
For example, according to the above-mentioned embodiment, the print data may also be in a format other than the XPS data.
Also, according to the above-mentioned embodiment, even before the rearrangement, the data block that does not include the data structure information may be spooled in the data storage device instead of the RAM.
The present disclosure can be applied, for example, to an image forming apparatus such as a printer.
It should be understood that various changes and modifications to the present embodiments described herein will be apparent to those skilled in the art. Such changes and modifications can be made without departing from the spirit and scope of the present subject matter and without diminishing its intended advantages. It is therefore intended that such changes and modifications be covered by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2010-108118 | May 2010 | JP | national |