Printing apparatus
The printing apparatus addresses memory shortages by monitoring and managing memory usage during raster data creation, ensuring stable printing by deleting data when necessary, thus preventing disruptions.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- BROTHER KOGYO KK
- Filing Date
- 2021-12-09
- Publication Date
- 2026-04-14
AI Technical Summary
The creation of raster data from large amounts of data extracted from objects in an image file can lead to a shortage of free memory, causing disruptions in the printing process.
A printing apparatus with a resource monitoring process that deletes data from memory when free memory falls below a predetermined level during raster data creation, ensuring sufficient memory for printing by storing and managing intermediate data efficiently.
The solution effectively increases free memory, reducing the likelihood of memory full errors and disruptions during raster data creation, thereby maintaining a stable printing process.
Smart Images

Figure 0007844855000001 
Figure 0007844855000002 
Figure 0007844855000003
Abstract
Description
Technical Field
[0001] The present invention relates to a technique for analyzing an object included in an image file and performing printing.
Background Art
[0002] Patent Document 1 describes a printing apparatus that creates raster data using an image file and performs printing using the created raster data. Specifically, the printing apparatus analyzes an object included in the image file and creates intermediate data according to the analysis result. Then, for example, when intermediate data for one page is created, raster data for one page is created from these intermediate data.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] Each time raster data is created, data extracted from an object for creating the raster data is stored in the memory. If the amount of data extracted from the object is large, there is a concern that the shortage of the free memory amount in the memory will cause a problem in the printing process.
[0005] This specification discloses a technique for suppressing problems in the printing process caused by a shortage of the free memory amount when analyzing an object of an image file and creating raster data.
Means for Solving the Problems
[0006] To solve the above problems, the printing apparatus disclosed in this embodiment comprises a memory, a printing mechanism, and a computer. The computer of the printing apparatus performs an acquisition process to acquire an image file composed of multiple objects, a raster data creation process to analyze the image file acquired by the acquisition process and create raster data based on the image file according to the analysis results, and a printing process to perform printing based on the raster data created by the raster data creation process. In the raster data creation process, the computer repeatedly performs a first process to select objects included in the image file and analyze the selected objects to extract and process the data included in the objects, a second process to create intermediate data if the objects include content data, and a third process to select the referenced object and analyze the selected objects to extract and process the data included in the objects if the objects include data indicating references to other objects. In the first and third processes, the data extracted from the objects is stored in memory, and in the second process, each time intermediate data is generated, the generated intermediate data is stored in memory, and drawing processing is performed based on the multiple intermediate data stored in memory to create raster data for use in printing. During the raster data creation process, the computer performs resource monitoring to increase the amount of free memory by deleting data extracted from objects stored in memory when the amount of free memory falls to a predetermined state. The predetermined state is when the amount of free memory is less than the amount of free memory before the raster data creation process was executed, and when certain conditions are met.
[0007] In raster data creation, the objects in the image file are analyzed, and the data contained within those objects is extracted and used for processing. The data extracted from the objects is stored in memory until the raster data conversion of the image file is complete. Therefore, if the amount of data extracted from the objects increases, the amount of free memory may become insufficient, which can hinder the execution of the printing process. To address this, during raster data creation, when the amount of free memory reaches a predetermined level, the data extracted from the objects stored in memory is deleted to increase the amount of free memory. This ensures that sufficient free memory is available before the execution of the printing process is hindered due to insufficient free memory during raster data creation. [Effects of the Invention]
[0008] According to the present invention, in a printing apparatus, the amount of free memory can be increased before a malfunction occurs due to insufficient free memory during the creation of raster data. [Brief explanation of the drawing]
[0009] [Figure 1] This is a diagram illustrating the configuration of an image forming system. [Figure 2] This is a flowchart explaining the procedure for creating raster data. [Figure 3] This is a diagram illustrating the structure of an image file. [Figure 4] This diagram illustrates how tables are created from image files. [Figure 5] This diagram illustrates the procedure for the process executed in S18 of Figure 2. [Figure 6] This is a diagram explaining the drawing process. [Figure 7] This is a diagram explaining the intermediate flash. [Figure 8] This is a flowchart illustrating the procedure for the process executed in S16 of Figure 2. [Figure 9]This diagram illustrates the change in the amount of free memory. [Modes for carrying out the invention]
[0010] (First Embodiment) The image forming system 100 according to this embodiment will be described with reference to the drawings. The image forming system 100 shown in Figure 1 comprises a printing device 10 and a PC 30. The printing device 10 and the PC 30 are connected to a network 200 and can communicate with each other through the network 200. The network 200 is a LAN or the Internet.
[0011] The configuration of the printing device 10 will now be described. The printing device 10 includes a computer 11, memory 12, communication IF 13, printer 14, user IF 15, and bus 19. IF is an abbreviation for interface. The printer 14 is an example of a printing mechanism.
[0012] The communication interface 13 connects the printer 10 to the network 200 in accordance with a predetermined communication protocol. The user interface 15 is an interface between the user who directly operates the printer 10 and the computer 11, and has a touch panel or physical operation keys. The printer 14 performs printing operations to print images onto a recording medium such as a sheet or a disc. The printer 14 can employ inkjet or electrophotographic methods as its recording method.
[0013] Computer 11 consists of a CPU, an ASIC (Application Specific Integrated Circuit), a printer 14, a communication IF 13, and a user IF 15. It controls each of the operations. Memory 12 has a data storage area. The data storage area is an area that stores data necessary for the execution of programs, etc. Memory 12 is composed of a combination of RAM, ROM, SSD, HDD, etc. Buffers provided by the computer 11, which are used when various programs are executed, may also be considered part of memory 12. The memory 12 may also be a storage medium readable by the computer 11. A storage medium readable by the computer 11 is a non-transitory medium. In addition to the examples above, non-transitory media also include recording media such as CD-ROMs and DVD-ROMs. Furthermore, non-transitory media are also tangible media. On the other hand, electrical signals that carry programs downloaded from servers on the internet are a type of computer-readable signal medium, but they are not included in non-transitory computer-readable storage media.
[0014] In the memory 12, firmware 20 is stored as a program executable by the computer 11. In the following description, the computer 11 that executes the program may sometimes be simply described by the program name. For example, the description "the firmware is" is used in the sense of "the computer 11 that executes the firmware 20". In the present embodiment, mainly, the processing of the computer 11 according to the instructions described in the program is shown. That is, the processes such as "judgment", "extraction", "selection", "calculation", "decision", "specification", "acquisition", "reception", "control", etc. in the following description represent the processing of the computer 11. Note that "acquisition" is used as a concept that does not necessarily require a request. That is, the process of the computer 11 receiving data without a request is also included in the concept of "the computer 11 acquires data". Also, the "data" in this specification is represented by a bit sequence readable by the controller. And data with the same substantial meaning content but different formats shall be treated as the same data. The same applies to the "information" in this specification.
[0015] Next, the configuration of the PC 30 will be described. Similar to the printing device 10, the PC 30 includes a communication IF, a memory, a controller, a display, and a user IF not shown in the drawings.
[0016] In the memory, an OS 31, a drawing application program 32, and a printing application program 33 are stored. The drawing application program 32 generates an image file under the execution of the OS 31. The image file is, for example, data indicating a target image according to a predetermined page description language. In the present embodiment, the image file is a PDF file using a file format called PDF (abbreviation for Portable Document Format). In the PDF file, an image is described according to a description language based on PostScript (registered trademark). The printing application program 33 creates a print job including the image file and transmits it to the printing device 10.
[0017] The firmware 20 executes an acquisition process to acquire a print job. The firmware 20 analyzes an image file included in the acquired print job and executes a raster data creation process to create raster data based on the image file according to the analysis result. The firmware 20 executes a printing process to cause the printer 14 to execute printing based on the raster data created by the raster data creation process.
[0018] Next, the raster data creation process executed by the firmware 20 will be described using FIG. 2. The process shown in FIG. 2 is executed upon receiving a print job transmitted from the PC 30 via the network 200, and the main body is the firmware 20.
[0019] In FIG. 2, in step 10 (hereinafter, steps are simply described as "S"), the firmware 20 acquires a cross-reference table from the image file 150. Prior to the explanation of S10, the configuration of the image file 150 will be described using FIGS. 3 and 4. The image file 150 includes a header, a body, a cross-reference table, and a trailer.
[0020] The cross-reference table 50 is located next to the body in the image file 150, specifically, information with "xref" described at the beginning. As shown in FIG. 4, the cross-reference table 50 is a table that associates a label (ObjID) for identifying an object included in the body with an offset position. The "offset position" is information indicating where the object specified by the label is located in the image file 150, specifically, the number of bytes from the beginning of the image file 150. In S10, the trailer dictionary included in the trailer is analyzed to identify the location of the cross-reference table 50. In the example of FIG. 3, the trailer dictionary has "startxref" described as "26368", indicating that the cross-reference table 50 is at the 26368th byte from the beginning of the image file 150.
[0021] In S11, the objects contained in image file 150 are analyzed to obtain the catalog dictionary table. The catalog dictionary table is described in the root object among the objects contained in the body. The body is composed of multiple objects. One object consists of information consisting of an object number and "obj" (for example, "N0obj"), and a description up to "endobj". "N0" is a label that identifies the object, and consists of the first object number (N) and the following generation number (0). The object number is an integer of 1 or greater. Each object contained in the body is related by a tree structure with the root object as the root. Hereafter, an object with the label "N0" will be referred to as "object N0".
[0022] To obtain the catalog dictionary table 52, the location of the root object is first identified by analyzing the trailer dictionary contained in the trailer. In the example in Figure 3, the trailer dictionary contains the entry " / Root 2 0 R", indicating that object N20 is referenced as the root object. The root object contains information for referencing the catalog dictionary table. This reference information is also simply referred to as the "reference". This reference information is, for example, the object number. Therefore, the catalog dictionary is obtained by analyzing object N20, which is the root object. The catalog dictionary table 52 contains a reference to the Pages dictionary table 53. The Pages dictionary table 53 is also called the page tree. The Pages dictionary table 53 contains the following information It contains references to the objects that make up the page, including the tent stream. In this way, each object, with the root object as its root, contains information for referencing other objects. Each object also contains information indicating the page's attributes. This information indicating the page's attributes is used as appropriate for creating intermediate data, creating raster data for one page, and creating intermediate raster data, as will be described later.
[0023] When the cross-reference table 50 is analyzed from the objects in image file 150, the object ID and offset are stored in memory 12 as the cross-reference table 50. At this point, the analysis results of each object with the root object as the root are not stored in memory 12. Then, each time an object is analyzed, the table is stored in memory 12. At this time, the analysis results of each object are stored in the work area of memory 12, and a table is created so that the next time the same object is referenced, it is not necessary to directly analyze image file 150. Specifically, it is determined whether there is a description in the "reference to entity" of the referenced object for the cross-reference table 50. The "reference to entity" indicates the analysis result of the object. If there is no description in the "reference to entity", an object reference table 51 is created to indirectly reference the analysis result of the object. The object reference table 51 describes the relationship between the type of data extracted by the analysis of the object and the action performed on the extracted data. In the example in Figure 4, the catalog dictionary table 52 is obtained by the analysis of object N20, and this A reference table called "20table51a" is created to reference the catalog dictionary table 52. 20table51a stores the relationship between the type "dictionary" of the catalog dictionary table 52 and its actual entity, the "reference to the catalog dictionary table".
[0024] Then, after creating the object reference table 51, the cross-reference table 50 stores a reference to the created object reference table 51 in the "Reference to Entity" column of the referenced object. The "entities" stored in the table are the data such as the created object reference table 51. The "references to entities" stored in the table contain information used to reference the entity, such as the address where the entity is stored.
[0025] In S12, the variables "Number of pages in RIP," "Maximum intermediate data size," and "Amount of free memory at RIP start" are initialized. "Number of pages in RIP" is a count value indicating the number of pages to be converted to raster data. "Maximum intermediate data size" is the maximum size of the intermediate data for each page during the processing of one print job. Specifically, each time the processing of one page is completed, the size of the intermediate data for one page is calculated in the process of S41 in Figure 8 described later, and in the processes of S42 to S43, the "Maximum intermediate data size" is updated based on the size of the intermediate data for one page calculated in S41. "Free memory at RIP start" is information indicating the total amount of free memory in the working area of memory 12. In S12, "Number of pages in RIP" is set to 1, "Maximum intermediate data size" is set to 0, and "Free memory at RIP start" is set to the calculated value M.
[0026] In S13, the Pages dictionary table 53 for one page is obtained by analyzing the objects contained in the image file 150. Specifically, first, the labels described in "Pages" in the catalog dictionary table 52 are referenced, and the objects referenced by the labels are analyzed. In Figure 4, "Pages" in the catalog dictionary table 52 contains "3 The entry "0 R" is present, and a reference to object N30 is described. Object N30 is analyzed, the Pages dictionary table 53a, which is the result of the analysis, is extracted and stored in the work area of memory 12. Then, as described above, table 51b is created to indirectly reference the Pages dictionary table 53a, and the cross-reference table 50 is stored in the "reference to entity" section.
[0027] Furthermore, the system references "Kids," which indicates the location of the child nodes of the Pages dictionary table 53a, and analyzes the referenced objects (in this example, objects N40 and N120). The analysis results are then stored in memory 12 and in the object reference table 51. By repeating these steps, in the example shown in Figure 4, the work area of memory 12 stores the object reference tables 51, namely "table 20 51a," "table 30 51b," and "table 40 51c," allowing the analysis results—the catalog dictionary table 52 and each Pages dictionary table 53a and 53b—to be accessed without directly analyzing the image file 150. In this embodiment, the process of storing tables 51, 52, and 53 in memory 12 is an example of the first process.
[0028] In image file 150, many objects often refer to the same object. For example, in image file 150 shown in Figure 3, object N60 and object N130 both have a description (5 0 R)151,1 that references object N50. There is 52. First, through the analysis of object N50, although not shown in Figure 4, a reference to the Pages dictionary table 53 is described, similar to table 30 51b and table 40 51c. Create the 50 table 51 and the Pages dictionary table 53, and store them in memory 12. This allows the reference to object N50 described in object N60 to the image Without directly parsing file 150, it is possible to read table 51 by referring to the "reference to entity" in cross-reference table 50, and then reference the Pages dictionary table 53 from this table 51. Similarly, the description 152(5) of object N130 From step 0 R), similar to the analysis of object N60, the object reference table 51 specified in the "reference to entity" of the cross-reference table 50 can be read, and the Pages dictionary table 53 created by the analysis of object N50 can be read from memory 12. In this embodiment, when an object contains references to other objects, one example of a third process is the process of storing tables 52 and 53 in memory 12 by directly or indirectly referencing the referenced object.
[0029] References to the same object may be included multiple times within an object on a single page, or they may be included in objects on multiple pages. In other words, during the processing of a print job, references to objects parsed during the processing of one page may also be referenced in objects on subsequent pages. Therefore, tables 50-53 stored in memory 12 during the processing of one page remain stored in memory 12 even after the processing of that page is complete, and are deleted from memory 12 when the printing process for the print job is finished.
[0030] In S14, the "Amount of free memory at the start of a page" is updated. The "Amount of free memory at the start of a page" indicates the amount of free memory in the work area of memory 12 before intermediate data is stored in the work area of memory 12. Specifically, the amount of free memory at the start of a page is set to the current amount of free memory. The amount of free memory at the start of a page corresponds to the amount of memory obtained by subtracting the total size of tables 50 to 53, which are currently stored in the work area of memory 12, from the amount of free memory at the start of the RIP. Basically, even after the processing of the page before the currently processed page is finished, tables 50 to 53 remain in memory 12, and in the processing of the current page, tables 50 to 53 are further added to memory 12 in S13. Therefore, basically, for a single print job, as the processing of each page progresses, the "Amount of free memory at the start of a page" set in S14 decreases.
[0031] In S15, during the processing of the print job, it is determined whether the page on which raster data is created is the first page by referring to "Number of pages in RIP". If it is the first page, "Number of pages in RIP" is set to "1" in S12. S15 is affirmed and the process proceeds to S17. In S17, the content stream contained in image file 150 is obtained. As shown in Figure 3, the content stream is the object among the objects contained in the image file that is referenced in "Contents" of Pages dictionary table 53, and in Figure 3, it is object N110. The content stream itself is data from "stream" to "endstream", and at the beginning, "Length" is written, which indicates the size of the content stream. The content stream contains image data and drawing data (drawing operators described later).
[0032] In S18, the content stream acquired in S17 is analyzed to create intermediate data for one page. Figure 5 is a flowchart illustrating the procedure for processing in S18. Figure 6 is a diagram illustrating the analysis of the content stream. Note that the processing performed by firmware 20 in S18 is an example of the second processing.
[0033] In S30, it is determined whether or not the drawing operators included in the content stream have been extracted. Drawing operators are descriptors that give instructions regarding the drawing of image data included in the content stream. If the result of S30 is positive, the process proceeds to S31, where the extracted drawing operators are analyzed.
[0034] In S32, it is determined whether the current amount of free memory in memory 12 is less than or equal to a predetermined value. If the current amount of free memory is not less than or equal to the predetermined value (S32: NO), the process proceeds to S34, and intermediate data is generated according to the analysis results of the drawing operator in S31. The intermediate data is data that describes each part that makes up one page of raster data using a more primitive language than the page description language used for the target image data. The primitive language is, for example, a language defined by the manufacturer of the printing device 10. The predetermined value indicates the amount of free memory in memory 12 when it is determined that it is necessary to perform the intermediate flash described later, and is, for example, 5MB.
[0035] When S34 ends, the process proceeds to S30 to determine whether the next drawing operator has been extracted from the content stream. If a drawing operator has been extracted (S30: YES), the process proceeds to S31 to analyze the extracted drawing operator. In S34, intermediate data is generated according to the analysis results of the drawing operator.
[0036] When processing in S34 is completed, the process proceeds to S30. By repeating the processes in S30 to S34, intermediate data for one page is created. In Figure 6, intermediate data MD1 to MD14 are generated from the content stream of image file 150 as intermediate data for one page and stored in the working area of memory 12. In Figure 6(b), intermediate data MD1 is a gray rectangle image, intermediate data MD2 is a rectangle frame image, and intermediate data MD3 is an image. Intermediate data MD4 to MD14 are text.
[0037] If the next drawing operator is not extracted from the content stream (S30:NO), proceed to S19 in Figure 2. In S19, the amount of memory for the drawing data is calculated using the following (Equation 1). Memory used for rendering data = Free memory at the start of the page - Current free memory ... (Formula 1)
[0038] The "data for drawing" consists of the intermediate data MD for one page obtained from the analysis in S18 and the tables 50-53 currently stored in memory 12. Therefore, the "amount of memory for drawing data" is the amount of memory in memory 12 occupied by the intermediate data MD for one page and the tables 50-53. The "amount of free memory at the start of the page" is the value obtained in S14. The "current amount of free memory" is the amount of free memory in the working area of memory 12 after the intermediate data MD for one page has been stored in the working area in S18.
[0039] In S20, the drawing process is executed using the intermediate data MD for one page, which was calculated by analyzing the content stream in S18. The drawing process is the process of creating raster data RD for one page from the intermediate data MD for one page stored in memory 12. The creation of raster data for one page from intermediate data for one page is also called flashing. In the example in Figure 6, the intermediate data MD1 to MD14 for one page (Figure 6(b)) stored in the working area is used to write the raster data RD for one page shown in Figure 6(c) to the page memory area of memory 12. Furthermore, in this embodiment, the intermediate data MD for one page that was stored in the working area of memory 12 is deleted. On the other hand, the cross-reference table 50, object reference table 51, and catalog dictionary table 52 stored in the working area of memory 12 are not deleted during the drawing process.
[0040] In S21, if image file 150 contains the content stream for the next page (S21: YES), the process proceeds to S22, and 1 is added to "Pages in RIP". Then, the process proceeds to S13. In S13, the Pages dictionary table 53 for the next page is obtained from image file 150 and stored in the working area of memory 12. For processing the next page, the processes in S14 to S17 are executed as described above. As described above, for processing a single print job, the amount of available memory decreases as each page is processed, and the "amount of available memory at the start of a page" calculated in S14 becomes smaller.
[0041] If we proceed to S15, the page on which the rasterized data is created is the second page, so we reject S15 and proceed to S16 to execute the resource monitoring process. The resource monitoring process determines whether or not to delete various tables stored in memory 12 based on the amount of free memory in the work area in memory 12. Here, we omit the explanation of the resource monitoring process in S16 and proceed to S17 to obtain the content stream for the next page. In S18, we analyze the content stream obtained in S17.
[0042] After executing each process S30 to S31 in Figure 5, if the current amount of free memory in S32 is less than or equal to a predetermined value, the process proceeds to S33 and an intermediate flush is performed. An intermediate flush is a process to increase the amount of free memory in memory 12 before one page of intermediate data MD is stored in memory 12.
[0043] Figure 7 illustrates the intermediate flash. As shown in Figure 7(a), when the amount of free memory falls below a predetermined value (S32:YES) because intermediate data MD1 to MD3 of one page of intermediate data has been stored in the working area of memory 12, intermediate raster data MRD is created from the already stored intermediate data MD1 to MD3, as shown in Figure 7(b). Intermediate raster data MRD is raster data created using only the intermediate data MD currently stored in the working area of memory 12, rather than using all of the intermediate data for one page. After compressing the created intermediate raster data MRD, it is written to the working area of memory 12. At this time, intermediate data MD1 to MD3 are deleted from memory 12. This makes it possible to increase the free memory capacity of memory 12. Alternatively, intermediate raster data MRD may be stored in memory 12 after the intermediate data MD has been deleted from memory 12.
[0044] When the processing in S33 is completed, the processes in S34, S19, and S20 in Figure 2 generate raster data RD for one page and write it to the page memory area of memory 12. However, if intermediate flashing is performed in S33, the compressed intermediate raster data stored in memory 12 is used to generate raster data for one page. Specifically, first, the compressed intermediate raster data stored in memory 12 is decompressed. Next, the decompressed intermediate raster data MRD and the remaining intermediate data MD are used to create raster data RD for one page and write it to the page memory area of memory 12 (Figure 7(d)). Since the intermediate raster data is also used in the drawing process in S20 to create raster data for one page, it can be considered that the intermediate raster data is a type of intermediate data.
[0045] When an intermediate flash is performed, the intermediate raster data MRD is compressed in memory 12, and then the intermediate raster data MRD is decompressed. Therefore, in the raster data creation process, if an intermediate flash is performed, the time required to create one page of raster data is longer than if an intermediate flash is not performed. To address this, in this embodiment, the resource monitoring process performed in S16 monitors the amount of free memory in memory 12, and when the amount of free memory meets a specific condition, the amount of free memory in memory 12 is released, making it less likely for an intermediate flash to be performed.
[0046] Figure 8 is a flowchart showing the procedure for the resource monitoring process executed in S16. Figure 9 is a diagram illustrating the change in memory usage during the resource management process. As an example, Figure 9 shows the change in memory usage until three pages of raster data are created. Figure 9(a) shows the amount of free memory at the start of RIP, and Figure 9(b) shows the amount of memory before the drawing process for the first page is executed. Figure 9(c) shows the amount of memory before the drawing process for the second page is executed. Figure 9(d) shows the amount of memory used before the rendering process for the third page is executed. "A" shows the amount of memory used for the cross-reference table 50 and the catalog dictionary table 52, "B" shows the amount of memory used for the object reference table 51 and the Pages dictionary table 53, and "C" shows the amount of memory used for the intermediate data MD.
[0047] In S40, the amount of resource memory is calculated using the following (Equation 2). Here, the amount of resource memory is the amount of memory occupied by each table 50 to 53 on memory 12. Resource memory amount = Free memory amount at RIP start - Current free memory amount … (Equation 2)
[0048] In other words, in the above (Equation 2), the decrease in the amount of free memory before and after each table 50 to 53 is stored in memory 12 is calculated as the amount of memory for each table 50 to 53 stored in memory 12 in S13.
[0049] In S41, the size of the intermediate data on the previous page is calculated using the values calculated in S19 and S41, and the following (Equation 3). Size of the intermediate data on the previous page = Memory amount for drawing data - Resource memory amount … (Formula 3)
[0050] In S42, it is determined whether the size of the intermediate data from the previous page obtained in S41 is greater than the maximum intermediate data size. If the size of the intermediate data from the previous page obtained in S41 is less than or equal to the maximum intermediate data size (S42: NO), the process proceeds to S44. On the other hand, if the size of the intermediate data from the previous page is greater than or equal to the maximum intermediate data size (S42: YES), the process proceeds to S43, where the maximum intermediate data size is replaced with the size of the intermediate data from the previous page obtained in S41.
[0051] In S44, it is determined whether memory 12 is in a predetermined state using the following equation (Equation 4). Current free memory amount < Maximum intermediate data amount + Resource memory amount + α … (Equation 4) Here, "α" is a value that indicates the buffer amount of free memory in memory 12, and is a value determined according to the total amount of memory in the working area of memory 12. For example, in this embodiment, it is 5MB.
[0052] If S44 is deemed positive, given the current amount of free memory, continuing object analysis would likely result in an intermediate flush, so the process proceeds to S46. In S46, the tables of analyzed objects stored in memory 12 are deleted. Specifically, the object reference table 51 and the Pages dictionary table 53, which are stored in the working area of memory 12, are deleted. On the other hand, the cross-reference table 50, the 20 table 51a, and the catalog dictionary table 52 are not deleted.
[0053] As shown in Figures 9(b) to 9(c), the size of the intermediate data MD stored in memory 12 when creating raster data for one page varies from page to page. The maximum value of the intermediate data MD stored in memory 12 when creating raster data for one page is used in the decision of S44. This makes it easier to affirm the decision of S44 if, while processing a single print job, a large amount of intermediate data MD is stored in memory 12 during the processing of any page. By deleting the table from memory 12 in S46, free space is created in memory 12, making it less likely that S32 in Figure 5 will determine that the amount of free memory is below a predetermined value (S32: NO). In other words, the occurrence of intermediate flushing performed in S33 can be suppressed.
[0054] If the same object is referenced many times, the number of object reference tables 51 and Pages dictionary tables 53 newly stored in memory 12 will be equal to the number of times a single print job is referenced. As the processing progresses, the number decreases. On the other hand, as the processing of a single print job progresses, if the number of times the same object is referenced decreases, the number of object reference tables 51 and Pages dictionary tables 53 newly added to memory 12 does not decrease. The amount of data in the tables newly added to memory 12 during the creation of raster data for the page currently being processed is used in the decision of S44. As a result, if the number of tables added to memory is large, it becomes easier to make a positive judgment in S44 and proceed to S46.
[0055] In addition, instead of using the above (Equation 4) to determine the amount of free memory in S44, it is also possible to determine whether the current amount of free memory is less than the value obtained by adding α to the maximum value of the intermediate data. In this case, the maximum value of the intermediate data may be a fixed value determined in advance through experiments or other means. Alternatively, it may be determined whether the current amount of free memory is less than the value obtained by adding α to the amount of resource memory.
[0056] On the other hand, if the result of S44 is negative, the process proceeds to S45. In S45, it is determined whether the amount of free memory in memory 12 is in a predetermined state using the following (Equation 5). Free memory at RIP start - Current free memory > Free memory at RIP start / 2 … (Formula 5)
[0057] Here, "amount of free memory at RIP start" is the maximum memory capacity of the working area of memory 12, as shown in Figure 9(a). In other words, it is the memory capacity of the working area of memory 12 when no tables are stored there. In S45, it is determined whether the total memory capacity of all tables 50-53 stored in the working area of memory 12 up to the present during the processing of one print job exceeds half of the free memory. In this embodiment, the value shown as "amount of free memory at RIP start / 2" should be greater than the "predetermined value" used in the determination in S32 during the resource monitoring process. In this embodiment, for example, if the working area of memory 12 is 60MB, then "amount of free memory at RIP start / 2" will be approximately 30MB.
[0058] In S45, instead of making the determination using (Equation 5) above, the following may be used: It may be determined whether the value obtained by subtracting the current amount of free memory from the amount of free memory at the start of RIP is greater than a predetermined amount of free memory determination value. In this case, the amount of free memory determination value only needs to be greater than the "predetermined value" used in the determination in S32 during the resource monitoring process.
[0059] If both S44 and S45 are deemed negative, the amount of free memory in memory 12 is sufficient, and the likelihood of an intermediate flush occurring even if object analysis continues is low, so the process proceeds to S17 in Figure 2. Note that the processing from S17 onwards has already been explained, so the explanation is omitted here.
[0060] In determining the amount of free memory in memory 12, instead of executing process S45 after rejecting S44, if S44 is rejected, process S45 does not need to be executed. In this case, if S44 is rejected, proceed to S17 in Figure 2. Alternatively, process S45 may be executed without executing process S44. In this case, if S42 is rejected, or if process S43 is executed, proceed to S45.
[0061] In the process S46 in Figure 8, the tables to be deleted may include the catalog dictionary table 52 and the 20 table 51a. Alternatively, the cross-reference table 50 may be deleted from memory 12 in the process S46. Furthermore, it is not necessary to delete object reference tables 51 other than the 20 table 51a, or the Pages dictionary table 53, in the process S46.
[0062] The embodiment described above can achieve the following effects. The computer 11 of the printing device 10 executes a resource monitoring process to increase the amount of free memory in memory 12 by deleting tables extracted from objects stored in memory 12 when the amount of free memory in memory 12 reaches a predetermined state during the execution of the raster data creation process. This suppresses disruptions to the printing process caused by insufficient free memory in memory 12 during raster data creation. As a result, for example, the chances of intermediate flashing can be reduced. This, in turn, reduces the chances of memory full errors occurring.
[0063] In the raster data creation process, if the data includes references to other objects, and the table contained in the referenced object is stored in memory 12, the data extracted from the object stored in memory 12 is processed without re-analyzing the referenced object. This improves the efficiency of raster data creation while suppressing problems with printing caused by insufficient free memory in memory 12.
[0064] In the resource monitoring process, the predetermined state is when the amount of free memory in memory 12 is less than the amount of free memory in memory 12 before the execution of the raster data creation process, and is greater than a predetermined judgment capacity in the intermediate flash memory. This makes it possible to increase the amount of free memory in memory before the intermediate raster data is created, thereby suppressing problems with the printing process caused by insufficient free memory in memory 12.
[0065] In the resource monitoring process, each time raster data for printing one page is created by the raster data creation process, it is determined whether memory 12 is in a predetermined state. If it is determined that memory 12 is in a predetermined state, the amount of free memory in memory 12 is increased by deleting the data extracted from the objects stored in memory 12. As a result, the state of memory 12 is monitored each time raster data for one page is created, which helps to prevent problems with the printing process caused by insufficient free memory in memory 12 for each page of printing.
[0066] In the resource monitoring process, each time raster data for one page is created, the maximum amount of intermediate data is identified, and based on this maximum amount of intermediate data, it is determined whether the amount of free memory in memory 12 is in a predetermined state. Since the amount of intermediate data varies with each page print, determining whether the amount of free memory in memory is in a predetermined state based on the maximum amount of intermediate data required for printing one page helps to prevent disruptions to the printing process caused by insufficient free memory in memory 12.
[0067] In the resource monitoring process, the amount of free memory in memory 12 is determined based on the amount of data in the table stored in memory 12 to create one page of raster data, to determine whether the amount of free memory in memory 12 is in a predetermined state. This ensures that even if the amount of data in the table stored in memory 12 fluctuates, the amount of free memory is determined each time, thereby preventing disruptions to the printing process caused by insufficient free memory in memory 12.
[0068] In resource monitoring processing, the specified type of data is the root data among the data extracted from the object. This prevents the analysis of objects contained in the image file from becoming halted even after freeing up available memory.
[0069] In the raster data creation process, the data extracted from the object is obtained through resource monitoring. By deleting data, the amount of free memory is increased, and even after that, the object analysis is repeated, followed by drawing processing to create raster data for printing. This allows the creation of raster data to continue even after the amount of free memory in memory 12 has been increased.
[0070] (Modification of the first embodiment) In the first embodiment described above, when performing an intermediate flush in S33 during content stream analysis, the object reference table 51 and the Pages dictionary table 53 stored in memory 12 were not deleted. Alternatively, when performing an intermediate flush in S33, the tables 51 and 53 stored in memory 12 may be deleted. In this case, the tables 51 and 53 stored in memory 12 should only be deleted if it is determined that the current amount of free memory is less than half of the amount of free memory at the start of RIP.
[0071] In the embodiment described above, the resource monitoring process determined whether the memory 12 was in a predetermined state each time one page of raster data was created. Alternatively, it is sufficient to determine whether the memory 12 is in a predetermined state each time two or more pages of raster data are created. In this case, after determining that S15 in Figure 2 is not true, the resource monitoring process in S16 can be executed only if two or more pages of raster data have been created.
[0072] (Other embodiments) The technologies disclosed herein are not limited to the embodiments described above and can be modified in various forms without departing from their essence, for example, the following modifications are possible. In the embodiment described above, the image file was in PDF format. However, the image file can be in any file format that includes multiple objects, and is not limited to PDF format.
[0073] In the above-described embodiment, the printing device had only a printing function. Alternatively, the printing device may be a multifunction device that has multiple functions, such as an image reading function and a fax function. [Explanation of symbols]
[0074] 10…Printing device, 11…Computer, 12…Memory, 14…Printer, 20…Firmware, 50…Cross-reference table, 52…Catalog dictionary table, 53…Pages dictionary table, 100…Image forming system, 150…Image file
Claims
1. A printing apparatus comprising memory, a printing mechanism, and a computer, The aforementioned computer, A process for obtaining an image file containing multiple objects, which are composed of multiple objects and represent multiple pages of such objects, A raster data creation process that creates raster data based on the image file acquired by the acquisition process, A first process involves selecting the objects for one page contained in the image file, analyzing the selected objects, extracting the data contained in the objects, and storing it in the memory. If the object contains content data, a second process is performed to create intermediate data and store it in the memory. If the object contains data indicating a reference to another object, a third process is performed to select the referenced object, analyze the selected object, extract the data contained in the object, and store it in the memory. If the available memory is smaller than a predetermined judgment capacity, even if the memory does not contain enough intermediate data for one page, the raster data creation process repeatedly executes the following steps: create raster format intermediate data based on the intermediate data stored in the memory and store it in the memory; increase the amount of available memory by deleting the intermediate data used to create the raster format intermediate data from the memory; when enough intermediate data for one page is stored in the memory, create raster data for printing one page based on the stored intermediate data; and further delete the intermediate data used to create the raster data from the memory while not deleting the data extracted from the object from the memory. During the execution of the raster data creation process, each time the raster data for printing one page is created by the raster data creation process, a maximum intermediate data amount indicating the maximum amount of memory for the intermediate data is identified, and based on the maximum intermediate data amount, it is determined whether the amount of free memory in the memory is smaller than the amount of free memory in the memory before the execution of the raster data creation process and larger than the predetermined judgment capacity, and if it is determined that the memory is in the predetermined state, the data extracted from the object stored in the memory is deleted, thereby increasing the amount of free memory in the memory, through a resource monitoring process. A printing process is performed which executes printing based on the raster data created by the raster data creation process. Printing device.
2. A printing apparatus comprising memory, a printing mechanism, and a computer, The aforementioned computer, A process for obtaining an image file containing multiple objects, which are composed of multiple objects and represent multiple pages of such objects, A raster data creation process that creates raster data based on the image file acquired by the acquisition process, A first process involves selecting the objects for one page contained in the image file, analyzing the selected objects, extracting the data contained in the objects, and storing it in the memory. If the object contains content data, a second process is performed to create intermediate data and store it in the memory. If the object contains data indicating a reference to another object, a third process is performed to select the referenced object, analyze the selected object, extract the data contained in the object, and store it in the memory. If the available memory is smaller than a predetermined judgment capacity, even if the memory does not contain enough intermediate data for one page, the raster data creation process repeatedly executes the following steps: create raster format intermediate data based on the intermediate data stored in the memory and store it in the memory; increase the amount of available memory by deleting the intermediate data used to create the raster format intermediate data from the memory; when enough intermediate data for one page is stored in the memory, create raster data for printing one page based on the stored intermediate data; and further delete the intermediate data used to create the raster data from the memory while not deleting the data extracted from the object from the memory. During the execution of the raster data creation process, each time the raster data for printing one page is created by the raster data creation process, a resource monitoring process is performed to determine whether the amount of free memory in the memory is smaller than the amount of free memory in the memory before the execution of the raster data creation process, and larger than the predetermined judgment capacity, based on the amount of data extracted from the object stored in the memory, and if the memory is determined to be in the predetermined state, the data extracted from the object stored in the memory is deleted to increase the amount of free memory in the memory. A printing process is performed which executes printing based on the raster data created by the raster data creation process. Printing device.
3. A printing apparatus comprising memory, a printing mechanism, and a computer, The aforementioned computer, A process for obtaining an image file containing multiple objects, which are composed of multiple objects and represent multiple pages of such objects, A raster data creation process that creates raster data based on the image file acquired by the acquisition process, A first process involves selecting the objects for one page contained in the image file, analyzing the selected objects, extracting the data contained in the objects, and storing it in the memory. If the object contains content data, a second process is performed to create intermediate data and store it in the memory. If the object contains data indicating a reference to another object, a third process is performed to select the referenced object, analyze the selected object, extract the data contained in the object, and store it in the memory. If the available memory is smaller than a predetermined judgment capacity, even if the memory does not contain enough intermediate data for one page, the raster data creation process repeatedly executes the following steps: create raster format intermediate data based on the intermediate data stored in the memory and store it in the memory; increase the amount of available memory by deleting the intermediate data used to create the raster format intermediate data from the memory; when enough intermediate data for one page is stored in the memory, create raster data for printing one page based on the stored intermediate data; and further delete the intermediate data used to create the raster data from the memory while not deleting the data extracted from the object from the memory. During the execution of the raster data creation process, each time the raster data for printing one page is created by the raster data creation process, a maximum intermediate data amount indicating the maximum amount of memory for the intermediate data is identified. Whether the memory is in a predetermined state where the amount of free memory is less than the amount of free memory before the execution of the raster data creation process and greater than the predetermined judgment capacity is determined by whether the current amount of free memory in the memory between the creation of the raster data for one page and the creation of the raster data for the next page is less than the expected amount of data to be stored in the memory. If the current amount of free memory in the memory is less than the expected amount of data, the memory is determined to be in the predetermined state, and the amount of free memory in the memory is increased by deleting the data extracted from the object stored in the memory. The expected amount of data is the sum of the amount of data extracted from the object stored in the memory to create the raster data for one page and the maximum intermediate data amount. A printing process is performed which executes printing based on the raster data created by the raster data creation process. Printing device.
4. A printing apparatus comprising memory, a printing mechanism, and a computer, The aforementioned computer, A process for obtaining an image file containing multiple objects, which are composed of multiple objects and represent multiple pages of such objects, A raster data creation process that creates raster data based on the image file acquired by the acquisition process, A first process involves selecting the objects for one page contained in the image file, analyzing the selected objects, extracting the data contained in the objects, and storing it in the memory. If the object contains content data, a second process is performed to create intermediate data and store it in the memory. If the object contains data indicating a reference to another object, a third process is performed to select the referenced object, analyze the selected object, extract the data contained in the object, and store it in the memory. If the available memory is smaller than a predetermined judgment capacity, even if the memory does not contain enough intermediate data for one page, the raster data creation process repeatedly executes the following steps: create raster format intermediate data based on the intermediate data stored in the memory and store it in the memory; increase the amount of available memory by deleting the intermediate data used to create the raster format intermediate data from the memory; when enough intermediate data for one page is stored in the memory, create raster data for printing one page based on the stored intermediate data; and further delete the intermediate data used to create the raster data from the memory while not deleting the data extracted from the object from the memory. During the execution of the raster data creation process, each time the raster data for printing one page is created by the raster data creation process, a resource monitoring process is performed to determine whether the amount of free memory in the memory is smaller than the amount of free memory in the memory before the execution of the raster data creation process and larger than the predetermined judgment capacity, based on the result of comparing the maximum amount of free memory in the memory with the amount of data extracted from the object currently stored in the memory during the period from the creation of the raster data for one page to the creation of the raster data for the next page, and if the memory is determined to be in the predetermined state, the data extracted from the object stored in the memory is deleted to increase the amount of free memory in the memory. A printing process is performed which executes printing based on the raster data created by the raster data creation process. Printing device.
5. In the aforementioned raster data creation process, The printing apparatus according to any one of claims 1 to 4, wherein, in the third processing, if data indicating a reference to another object is included, and the data included in the referenced object is stored in the memory, the printing apparatus processes the data extracted from the object stored in the memory without re-analyzing the referenced object.
6. The printing apparatus according to any one of claims 1 to 4, wherein the acquisition process acquires the image file in PDF format.
7. The printing apparatus according to any one of claims 1 to 4, wherein, in the resource monitoring process, data of a predetermined type is not deleted from the data extracted from the object stored in the memory, and all data that is not of the predetermined type is deleted.
8. The acquisition process acquires the image file in PDF format, The data extracted from the object contained in the image file has a structure in which other data are related in a tree structure based on the root data. The printing apparatus according to claim 7, wherein in the resource monitoring process, the predetermined type of data is the root data among the data extracted from the object.
9. The printing apparatus according to claim 8, wherein the root data among the data extracted from the object is table data indicating the reference location of other objects in the image file.
10. In the aforementioned raster data creation process, Even after the amount of free memory is increased by deleting the data extracted from the object through the resource monitoring process, A printing apparatus according to any one of claims 1 to 4, which creates raster data for use in printing by repeatedly performing the first process, the second process, the third process, and the drawing process.
Citation Information
Patent Citations
Printing document file processing apparatus and program
JP2012008837A
Image forming device, and image forming method
JP2012218317A
Image forming apparatus, method for controlling image forming apparatus, and computer program
JP2012232573A
Image formation apparatus and image formation apparatus control method
JP2014117861A
Information processing apparatus, image forming apparatus, image processing system, image processing method, and program
JP2019159618A