Image processing and error handling system and method for printing linearized and non-linearized portable document format (PDF) files
09852366 · 2017-12-26
Assignee
Inventors
Cpc classification
G06F3/1206
PHYSICS
H04N2201/0094
ELECTRICITY
H04N1/00063
ELECTRICITY
G06F3/1285
PHYSICS
H04N1/00222
ELECTRICITY
International classification
G06K15/00
PHYSICS
Abstract
A method of processing linearized and non-linearized Portable Document Format (PDF) files for printing comprises: determining by printer firmware if a printer driver detected that the PDF file is linearized; saving stream data of the PDF file by the printer firmware when the printer firmware determines the printer driver detected that the PDF file is linearized; and determining by the printer firmware if the PDF file is linearized when the PDF file is unidentified as being linearized by the printer driver, wherein the printer firmware identifies real and false linearization error during linearized processing and identifies and processes printing errors in a parallel manner during saving and interpreting stream data.
Claims
1. A method of processing linearized and non-linearized Portable Document Format (PDF) files for printing comprising: determining by printer firmware if a printer driver detected that the PDF file is linearized; saving stream data of the PDF file by the printer firmware when the printer firmware determines the printer driver detected that the PDF file is linearized; and determining by the printer firmware if the PDF file is linearized when the PDF file is sent directly to a printer having the printer firmware, wherein the determining by the printer firmware if the PDF file is linearized comprises: monitoring a first portion of the stream data of the PDF file received by the printer firmware for a linearized key string; interpreting the linearized key string if the linearized key string is found; processing the PDF file as linearized when the linearized key string is found, wherein processing the PDF file as linearized when the linearized key string is found comprising: comparing a size difference between a linearized specific file size of the PDF file and a first page file size of the PDF file; processing the PDF file as linearized when the size difference between the linearized specific file size of the PDF file and the first page file size of the PDF file is greater than a threshold size; and processing the PDF file as non-linearized when the size difference between the linearized specific file size of the PDF file and the first page file size of the PDF file is less than a threshold size; and processing the PDF file as non-linearized when the linearized key string is unidentified in the first portion of the PDF file received.
2. The method of claim 1, wherein monitoring a first portion of the stream data of the PDF file received by the printer firmware for a linearized key string comprises monitoring by the printer firmware for the linearized key string after receiving 1024 bytes of stream data of the PDF file.
3. The method of claim 1, wherein interpreting the linearized key string comprises comparing a linearized specific file size of the PDF file to an actual file size of the PDF file.
4. The method of claim 1, wherein processing the PDF file as linearized when the size difference between the linearized specific file size of the PDF file and the first page file size of the PDF file is greater than a threshold size comprises: storing and interpreting first page stream data of the PDF file; and storing and interpreting non-first page stream data of the PDF file.
5. The method of claim 1, wherein processing the PDF file as linearized when the size difference between the linearized specific file size of the PDF file and the first page file size of the PDF file is greater than a threshold size comprises: storing a first page stream data of the PDF file; interpreting first page stream data of the PDF file; storing non-first page stream data of the PDF file; and interpreting non-first page stream data of the PDF file; wherein interpreting first page stream data of the PDF file and storing non-first page stream data of the PDF file is done in parallel.
6. The method of claim 5, wherein storing first page stream data of the PDF file comprises storing the first page stream data of the PDF file in Random Access Memory (RAM), the first page stream data of the PDF file being stored in other system memory when the RAM is full or the RAM is unavailable.
7. The method of claim 5, wherein interpreting first page stream data of the PDF file interpreting data directly from information in a linearization parameter dictionary.
8. The method of claim 1, comprising: monitoring for a processing error when processing the PDF file as linearized; comparing a file size of the PDF file to the linearized specific file size of the PDF file when the processing error occurs; sending an error message when the file size of the PDF file is equal to the linearized specific file size of the PDF file; and aborting the sending of the error message, terminating the linearized processing and re-processing the PDF file as non-linearized when the file size of the PDF file and the linearized specific file size of the PDF file is unequal and above a predetermined threshold limit.
9. The method of claim 1, comprising detecting an error, wherein two separate task threads are used to handle error page printing and consuming a remainder of stream storage when the error is recorded prior to stream storage being completed.
10. The method of claim 1, comprising: determining by the printer driver if the PDF file is linearized when the PDF file is sent to print via the printer driver; and linearizing the PDF file by the printer driver when the PDF file is non-linearized.
11. The method of claim 10, comprising: adding printer command information to the PDF file by the printer driver; and sending the printer command information by the printer driver to the printer firmware.
12. The method of claim 11, wherein the printer command information comprises file size data and linearization data.
13. The method of claim 1, comprising: opening the PDF file in a PDF application; and saving the PDF file as a linearized PDF file when the PDF application has a linearization module.
14. A method of processing linearized and non-linearized Portable Document Format (PDF) files for printing comprising: determining by the printer driver if the PDF file is linearized if the PDF file is sent to print via the printer driver; linearizing the PDF file by the printer driver when the PDF file is non-linearized; adding printer command information to the PDF file by the printer driver; sending the printer command Information by the printer driver to printer firmware; determining by printer firmware if the printer driver detected that the PDF file is linearized; saving stream data of the PDF file by the printer firmware when the printer firmware determines the printer driver detected that the PDF file is linearized; determining by the printer firmware if the PDF file is linearized when the PDF file is sent directly to a printer having the printer firmware; identifying a linearization error by the printer firmware, wherein identifying a linearization error by the printer firmware comprises: comparing a file size of the PDF file to a linearized specific file size of the PDF file; sending an error message when the file size of the PDF file is equal to the linearized specific file size of the PDF file; and aborting the sending of the error message, terminating the linearized processing and re-processing the PDF file as non-linearized when the file size of the PDF file and the linearized specific file size of the PDF file is unequal and above a predetermined threshold limit; and identifying and processing printing errors during saving and interpreting stream data by the printer firmware in a parallel manner.
15. The method of claim 14, wherein identifying and processing printing errors during saving and interpreting stream data by the printer firmware in a parallel manner comprises processing two separate task threads to handle error page printing and consuming a remainder of stream storage when the error is recorded prior to stream storage being completed.
16. A system for processing linearized and non-linearized Portable Document Format (PDF) files for printing comprising: a printer driver module receiving the PDF file when the PDF file is sent to print via the printer driver, determining if the PDF file is linearized by analyzing PDF data of the PDF file, linearizing the PDF file when the PDF file is non-linearized, and adding printer command information to the PDF file when linearizing the PDF file; a printer firmware module determining if the printer driver detected that the PDF file is linearized, when receiving the PDF file directly, processing the PDF file as linearized when a size difference between a linearized specific file size of the PDF file and a first page file size of the PDF file is greater than a threshold size, processing the PDF file as non-linearized when the size difference between the linearized specific file size of the PDF file and the first page file size of the PDF file is less than a threshold size, and processing the PDF file as non-linearized when a linearized key string is unidentified in the first portion of the PDF file received, wherein the printer firmware identifies real and false linearization error and indentifies and processes printing errors in a parallel manner during saving and interpreting stream data; and an error detection module stored in the printer firmware module, the error detection module monitoring for a processing error when processing the PDF file as linearized, comparing a file size of the PDF file to the linearized specific file size of the PDF file, sending an error message when the file size of the PDF file is equal to the linearized specific file size of the PDF file, and processing the PDF file as non-linearized when the file size of the PDF file and the linearized specific file size of the PDF file is un-equal.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The present application is further detailed with respect to the following drawings. These figures are not intended to limit the scope of the present invention but rather illustrate certain attributes thereof.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
DESCRIPTION OF THE APPLICATION
(15) The description set forth below in connection with the appended drawings is intended as a description of presently preferred embodiments of the disclosure and is not intended to represent the only forms in which the present disclosure can be constructed and/or utilized. The description sets forth the functions and the sequence of steps for constructing and operating the disclosure in connection with the illustrated embodiments. It is to be understood, however, that the same or equivalent functions and sequences can be accomplished by different embodiments that are also intended to be encompassed within the spirit and scope of this disclosure.
(16) Embodiments of the exemplary system and method relates to a PDF image forming system and method configured to interpret and print all PDF formats including non-linearized and linearized PDF formats. The exemplary system and method provides a linearized PDF format detection and conversion mechanism in different devices in the printing pipeline wherein use of the detection and conversion mechanisms depend on the PDF print flows. The linearization detection in the printer firmware happens on the fly when receiving stream data and there is no need to wait after the PDF file is saved. This allows a decision to be made in an optimal manner. For a linearized PDF file, the exemplary system and method checks the size difference between a total file size and a first page size (1.sup.stPgSize). If a size difference is detected above a predetermined value, linearized processing may be used to save file storage time spent for later pages. Otherwise, non-linearized processing may be used. In linearized PDF processing, two processing stages may be introduced to seek parallel processing for fast printing. The linearized stage1 may include saving the 1.sup.st page data to RAM and interpreting 1.sup.st page data so that 1.sup.st page printing does not need to wait until all the data is received. Linearized stage 2 may include saving and interpreting the later page data. As a result, 1.sup.st page printing speed may be optimized as well as the whole printing speed of the PDF document. The exemplary system and method may provide an error handling mechanism for interpreting PDF files that may avoid printing false error pages. The linearized specific error caused by un-known file size during the 1.sup.st page interpreting may be detected and non-linearized interpreter may be used to avoid print the error page.
(17) Referring now to
(18) The system 10 may have an image forming device 14. The image forming device 14 may be any type of device having printing capabilities. For example, the image forming device 14 may be a printer, a copier, a fax machine, a multi-function peripheral including a scanner and one or more of functions of a copier, a facsimile device, and a printer and/or other types of rendering devices. The image forming device 14 may be used for outputting a print job as described below.
(19) The image forming device 14 may be coupled to a print server 16. The print server 16 may be used to connect the image forming device 14 to one or more computing devices 18 over a network 22. The network 22 may be a local area network (LAN), a general wide area network (WAN), wireless local area network (WLAN) and/or a public network. The print server 16 may accept print jobs from the computing device 18 and may send the print jobs to the appropriate image forming device 14. The print server 16 may queue the jobs locally as print jobs may arrive more quickly than the image forming device 14 may be able to print. Alternatively, or in addition to, the computing device 18 may be directly coupled to the image forming device 14.
(20) Individuals 12 may use one or more computing devices 18 to send print jobs to the image forming device 14. The computing devices 18 may be a client computer system such as a desktop computer, handheld or laptop device, tablet, mobile phone device, server computer system, multiprocessor system, microprocessor-based system, network PCs, and distributed cloud computing environments that include any of the above systems or devices, and the like. The computing device 18 may be described in the general context of computer system executable instructions, such as program modules, being executed by a computer system as may be described below. In the embodiment shown in
(21) The computing devices 18 may be loaded with an operating system. The operating system of the computing device 18 may manage hardware and software resources of the computing device 18 and provide common services for computer programs running on the computing device 18. The computing device 18 may be loaded with a linear conversion module 20. The linear conversion module 20 may convert non-linear PDF files to linear PDF files as will be described below.
(22) Referring now to
(23) The system memory 32 may include at least one program product/utility 42 having a set (e.g., at least one) of program modules 44 that may be configured to carry out the functions of embodiments of the invention. The program modules 44 may include, but is not limited to, an operating system, one or more application programs, other program modules, and program data. Each of the operating systems, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. The program modules 44 generally carry out the functions and/or methodologies of embodiments of the invention as described herein. For example, the program modules 44 may have the linear conversion module 20. In accordance with one embodiment, the linear conversion module 20 may form part of a printer driver stored in the system memory 32 of the computing device 18.
(24) The computing device 18 may communicate with one or more external devices 46 such as a keyboard, a pointing device, a display 48, or any similar devices (e.g., network card, modern, etc.). The display 48 may be a Light Emitting Diode (LED) display, Liquid Crystal Display (LCD) display, Cathode Ray Tube (CRT) display and similar display devices. The external devices 46 may enable the computing device 18 to communicate with the image forming device 14 (
(25) As will be appreciated by one skilled in the art, aspects of the disclosed invention may be embodied as a system, method or process, or computer program product. Accordingly, aspects of the disclosed invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module,” or “system.” Furthermore, aspects of the disclosed invention may take the form of a computer program product embodied in one or more computer readable media having computer readable program code embodied thereon.
(26) Any combination of one or more computer readable media (for example, storage system 40) may be utilized. In the context of this disclosure, a computer readable storage medium may be any tangible or non-transitory medium that can contain, or store a program (for example, the program product 42) for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
(27) Referring now to
(28) The system memory 62 may include at least one program product/utility 64 having a set (e.g., at least one) of program modules 66 that may be configured to carry out the functions of embodiments of the invention. The program modules 66 may include, but is not limited to, an operating system, one or more application programs, other program modules, and program data. Each of the operating systems, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. The program modules 66 may include procedures such as a page converter, rasterizer, compression code, page print scheduler, print engine manager, and similar printing applications (i.e., printer firmware). The program modules 66 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
(29) The image forming device 14 may have one or more communication modules 68. The communication modules 68 may allow the image forming device 14 to communicate with one or more networks (i.e., network 22 shown in
(30) The image forming device 14 may include an operation panel 74. The operation panel may include a display unit 76 and an input unit 78 for facilitating human interaction with the image forming device 14. The display unit 76 may be any electronic video display, such as a LCD display, LED display and similar display types. The input unit 78 may include any combination of devices that allow users to input information into the operation panel 74, such as buttons, a keyboard, switches, and/or dials. In addition, the input unit 78 may include a touch-screen digitizer overlaid onto the display unit 76 that can sense touch and interact with the display unit 76.
(31) As will be appreciated by one skilled in the art, aspects of the disclosed invention may be embodied as a system, method or process, or computer program product. Accordingly, aspects of the disclosed invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module,” or “system.” Furthermore, aspects of the disclosed invention may take the form of a computer program product embodied in one or more computer readable media having computer readable program code embodied thereon.
(32) Any combination of one or more computer readable media (for example, system memory 62) may be utilized. In the context of this disclosure, a computer readable storage medium may be any tangible or non-transitory medium that can contain, or store a program (for example, the program module 66) for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
(33) Referring now to
(34) In Flow 1, a PDF application tool may be used to open a PDF document as shown in 101. As may be seen in
(35) The data from the PDF file may be sent to a printer driver of the computing device 18 as shown in 102 (
(36) The PDF data may be sent to the linearized PDF converter 20 (
(37) The printer driver may have a Print Job Language (PJL) command module as shown in 102F. The PJL command module may be used to generate PJL commands. For example, the PJL command module may generate PJL commands for the file size and linearization information. In accordance with one embodiment, if the linearized PDF converter 20 of the printer driver linearizes the PDF file, the PJL command module may send the following PJL commands to printer firmware in the image forming device 14: @PJL SET LPARM:PDF KLINEARIZEDPDF=YES @PJL SET LPARM:PDF KFILESIZE=PDF FILE SIZE
(38) If the PDF file is a linear PDF file, the PDF file may be sent directly to the PJL command module as shown in 102E without passing though linearized converter 20. After the PJL commands are generated, the PDF file, which is already linearized, may be sent to the image forming device 14 as shown in 103 (
(39) As may be seen in
(40) The printer firmware may be used for both flow 1 and flow 2. As shown in
(41) The printer firmware may start to detect the linearization while it is receiving stream data instead of after saving all of the stream data into the image forming device 14. This may allow the image forming device 14 to optimize the speed to start 1.sup.st page printing. As shown in
(42) Referring back to
(43) If the PDF file is defined as a linearized PDF file, the firmware of the image forming device 14 may check the size difference between LSize and 1stPgSize which are specified by linearization parameter dictionary as shown in 303. If the size difference between LSize and 1stPgSize is bigger than a predetermined threshold size (ThresholdSize), linearized processing may be applied to the PDF file as shown in 304. If the size difference between LSize and 1stPgSize is smaller than a predetermined ThresholdSize, non-linearized processing may be applied as shown 305. Non-linearized processing may be applied since when the size difference is smaller than a predetermined threshold value, there is no need to have two (2) stage processing as may be applied to linearized processing as disclosed below since the time savings for printing may be minimal.
(44) For PDF files identified as linearized, linearized processing may be performed as shown in 304 of
(45) In accordance with one embodiment, stage 1 may involve 1.sup.st page stream storage as shown in 402. While the 1.sup.st page stream data is being processed as shown in 404, stream storage of later pages may be done as shown in 403 in a parallel manner. The later page data may then be interpreted as shown in 405.
(46) In accordance with one embodiment, the stage 1 1.sup.st page stream data may be saved in the RAM memory at fast speed even if the system memory device is a hard drive. This is because accessing RAM may be faster than accessing the hard drive. However, when stage 1 1.sup.st page stream data size is bigger than available RAM size, the 1.sup.st page stream data may be saved into the hard drive or other memory storage device. The RAM memory buffer may be used directly by the linearized 1.sup.st page interpreter, which may reduce temp memory buffer that is required by using the hard drive.
(47) In 404, the linearized stage 1 interpreter may utilize interpreting information such as XREF table and page information directly from the linearization parameter dictionary. This may result in faster interpreting speed compared to the non-linearized interpreter shown in 502.
(48) If any error happens during saving stream data and interpreting, an error page may be printed to notify the individual 20 with error information such as no memory, lack of fonts etc. However, there may be a special case which produces a false error due to linearization processing. This is the case where the size specified by the linearization parameter dictionary does not match the real file size. The printer firmware of the present application may provide an interpreter error handler for the above error case without printing false error page as shown in 306.
(49) As may be seen in
(50) Referring to
(51) The foregoing description is illustrative of particular embodiments of the invention, but is not meant to be a limitation upon the practice thereof. The following claims, including all equivalents thereof, are intended to define the scope of the invention.