1. Field of the Invention
The present invention relates to a data processing apparatus, a data processing method, and a storage medium.
2. Description of the Related Art
Japanese Patent Application Laid-Open No. 2006-338507 discusses a processing method that links a plurality of modules. Further, as a processing method that links a plurality of mountable modules, a filter pipeline system is known. In this filter pipeline system, the modules are handles as filters, and are connected by a pipeline.
There are various methods for transferring data between filters, such as successively sending data in a stream, or for a structured document, sending a component that is performed parsing based on a request from a latter-stage filter (document interface (I/F)). With a conventional Microsoft® extensible markup language (XML) paper specification (XPS) filter pipeline, the stream and the document can be specified based on inputs and outputs from each filter.
Since there are limitations on the data that can be handled by the Microsoft XPS filter pipeline, it is possible to specify the inputs and outputs for each filter. Since inputs are in XPS and outputs are in XPS or page description language (PDL), there are two types of inputs and outputs, the versatile stream I/F for PDL and the XPS-specific XPS document I/F.
However, when various types of file inputs and outputs are handled, since it takes time and effort to prepare each dedicated document I/F, it is more efficient to use the inputs and outputs in a versatile manner by preparing only streams.
However, when processing is performed based only on stream inputs and outputs, there are problems how the data is transferred when there is a plurality of outputs to one input and that the efficiency are poor when a data is returned in a stream despite that an entity file has already substantiated in the filter.
The present invention is directed to improving the versatility and efficiency of the input and output of data to/from modules processing data.
According to an aspect of the present invention, a data processing apparatus includes an input unit configured to input data in a streaming format, a generation unit configured to generate a file based on the data in a streaming format input by the input unit, and an output unit configured to output data that includes reference information referring to the file generated by the generation unit.
Further features and aspects of the present invention will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the invention and, together with the description, serve to explain the principles of the invention.
Various exemplary embodiments, features, and aspects of the invention will be described in detail below with reference to the drawings.
A first exemplary embodiment of the present invention will now be described.
In the present exemplary embodiment, description will be made as follows, assuming that the information processing apparatus is configured, except for the printing apparatus 7, with the hardware units 1 to 8 that are illustrated in
A user interface unit 11 lets a user input various print settings such as setting to the printing apparatus, and instruct printing to start. A print data control unit 12 receives input data specified from the user interface unit 11, and generates data that can be processed by the printing apparatus 7.
A filter control unit 13 controls order and inputs and outputs of various filters. A file format conversion filter 14 is an example of a filter, which converts an Office® document into a PDF, for example.
A layout processing filter 15 is also an example of a filter, which performs layout processing, such as N-up, bookbinding, poster printing and the like. A print data generation filter 16 is also an example of a filter, which converts an input file such as a PDF into a printable PDL.
A data sending/receiving unit 17 is a part of the functions of the OS. The data sending/receiving unit 17 sends and receives data to/from the printing apparatus 7 via a Centronics interface, a USB, or a local area network connection. The printing apparatus 7 performs print processing based on an instruction from the connected information processing apparatus. The above-described a plurality of filters is an example of a plurality of modules.
A filter processing unit 4-2 performs the respective filter processes. Examples of filter processes include file format conversion, layout processing, and print data generation.
An output method determination unit 4-3 determines a determination method, i.e., whether to output a list file or a subject file.
A list file generation unit 4-4 generates a list file that describes link information to a file when it is determined by the output method determination unit 4-3 to output a list file. An output processing unit 4-5 outputs the output data reflecting the result of the filter processing unit 4-2, based on the determination result of the output method determination unit 4-3.
A flow of a string of data will now be described. Office data is input into the print data control unit 12 based on a specification from the user interface unit 11 illustrated in
Further, a plurality of PDF files can be generated from one PDF file by the layout processing filter. In such a case, the plurality of files can also be efficiently processed by using a list file like that illustrated in
The method for determining whether to output a subject file or a file list will now be described with reference to the flowchart of
In step 8-1, the input processing unit 4-1 receives data from the filter control unit 13. In step 8-2, the filter processing unit 4-2 performs the processing of each filter, such as file format conversion and layout conversion. In step 8-3, it is determined whether data is substantiated as a result of the processing. If it is determined that data is substantiated (YES in step 8-3), in step 8-4, the list file generation unit 4-4 generates a list file. Then, in step 8-5, the output processing unit 4-5 transfers the data as a list file to the filter control unit 13 in a stream. On the other hand, if it is determined that data is not substantiated (NO in step 8-3), in step 8-6, it is determined whether the data size exceeds a threshold. If the data size does not exceed the threshold, in step 8-7, it is determined whether the data has been divided. If it is determined that the data size exceeds a threshold (YES in step 8-6) or that the data has been divided (YES in step 8-7), the processing proceeds to step 8-4, and the list file generation unit 4-4 generates a list file. Then, in step 8-5, the output processing unit 4-5 transfers the list file to the filter control unit 13 in a stream. In other cases (i.e., if it is determined in step 8-7 that the data has not been divided (NO in step 8-7)), the processing proceeds to step 8-8. In step 8-8, the output processing unit 4-5 transfers the subject file to the filter control unit 13 in a stream.
Although in
Further, whether to transfer the data as a list file or as the subject file can also be externally specified, for example by the config file, rather than determined internally by the output method determination unit 4-3.
For a “subject file formed by a previous-stage filter and processed in a stream”, since the subject file temporarily substantiated on the hard disk based on the previous-stage filter output processing flows in a stream after having been read, more time is taken than for the reference. The processing time for the latter-stage filter is the same as the reference, so that overall the processing time increases by the increase in the previous-stage output processing time.
For a “subject file substantiated by previous-stage filter and link file processed in a stream”, since the list file is generated during the previous-stage filter processing time, this processing takes a little longer than for the reference. However, because there is no need to re-read from the hard disk, the processing time is shorter than for “formed by previous-stage filter and processed in a stream”. The input processing for the latter-stage filter can use an already-substantiated file just by reading the list file, so the processing time is less than for the reference. Overall, since the decrease in the input processing time for the latter-stage filter is greater than the increase in the output portion for the previous-stage filter, the processing time is less than for the reference.
Thus, according to the present exemplary embodiment, a plurality of output files can be processed. Further, since the processing can be performed efficiently, processing time decreases. The processing according to the present exemplary embodiment can be similarly performed even in a printer, rather than by a printer driver. More specifically, the same processing can be performed by the controller unit 19 illustrated in
Another exemplary embodiment will now be described.
Yet another exemplary embodiment will now be described.
According to each of the above exemplary embodiments, data input and output among a plurality of modules that process data can be made more versatile and efficient.
Aspects of the present invention can also be realized by a computer of a system or apparatus (or devices such as a central processing unit (CPU) or a microprocessor unit (MPU)) that reads out and executes a program of computer executable instructions recorded on a memory device to perform the functions of one or more of the above-described embodiments, and by a method, the steps of which are performed by the computer of the system or apparatus by, for example, reading out and executing the program recorded on a memory device to perform the functions of the aforementioned one or more of the above-described embodiments. For this purpose, the program can be provided to the computer for example via a network or from a recording medium of various types serving as the memory device (e.g., computer-readable storage medium). In such a case, the system or apparatus, and the recording medium where the program is stored, are included as being within the scope of the present invention. The computer-readable medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all modifications, equivalent structures, and functions.
This application claims priority from Japanese Patent Application No. 2011-026419 filed Feb. 9, 2011, and Japanese Patent Application No. 2011-268279 filed Dec. 7, 2011, each of which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2011-026419 | Feb 2011 | JP | national |
2011-268279 | Dec 2011 | JP | national |