Device for generating print data, program and generation method
Patent Information
- Application Number
- JP2023141949
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-03-13
AI Technical Summary
【0009】 本発明によれば、印刷対象の文書データの文字オブジェクトに対して指定されたグリフを取得できない場合であっても、当該グリフを用いてレンダリングする文字が、印刷結果に影響を及ぼさない文字である場合は、当該文書データの印刷を行うことができる。
Smart Images

Figure 2025035120000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an apparatus, a program, and a method for generating print data. [Background technology]
[0002] In the printer control device described in Patent Document 1, a font image corresponding to input character information is called up from a storage means, and a print image is created using the called up font image, and printing is performed. At this time, if a font image corresponding to the input character information is not stored in the storage means, the printing process is stopped and a font error is displayed.
[0003] In addition, when the printer in Patent Document 2 receives PDF data containing commands that the printer cannot interpret, it requests the server for bitmap data (PWG data) corresponding to the PDF data. The printer then obtains the requested bitmap data and performs printing based on the bitmap data. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Special Publication No. 04-061784 [Patent Document 2] JP 2020-138391 A Summary of the Invention [Problem to be solved by the invention]
[0005] In Patent Document 2, it is assumed that the server can convert the data to be printed into bitmap data. That is, the server in Patent Document 2 needs to obtain glyphs of font data corresponding to the font specified in the data to be printed, and perform rendering (conversion to bitmap data) using the glyphs. However, Patent Document 2 does not take into consideration the case where the server performing such rendering does not hold glyphs of the font specified for the characters in the data to be printed. In addition, when Patent Document 2 is combined with the technology of Patent Document 1, if the server does not hold glyphs of the font specified for the characters included in the data to be printed, the print process will be stopped regardless of the type of data to be printed.
[0006] In addition, when the server does not hold the glyph of the character specified in the data to be printed, for example, the server may not hold the specified font data at all. In addition, the version of the font data held by the server may be old, and the server may not hold the glyph (character shape data) of the character newly added in the new version of the font data. In addition, there is a document data format called searchable PDF, which enables searching by performing character recognition processing on image data and drawing the character string resulting from the character recognition as invisible characters overlaid on the image data. In searchable PDF, fonts are specified even for invisible characters, but some applications that generate the searchable PDF specify special fonts that are not commonly used as fonts for the invisible characters. In many cases, print servers hold glyphs for common fonts, but do not hold glyphs for special fonts. Therefore, when the print server prints a searchable PDF in which a special font is specified, an error occurs during rendering because the print server cannot obtain the glyph corresponding to the special font, and printing is stopped.
[0007] The present invention aims to skip rendering of a character and continue printing processing even if a glyph specified for the character contained in the document data to be printed cannot be obtained, if the character does not affect the print result. [Means for solving the problem]
[0008] The device of the present invention is a device that generates print data by rendering document data, and is characterized in having a print data generation means that, if a character object contained in the document data satisfies a predetermined condition, skips the rendering of the character object and controls the generation of the print data to continue using objects contained in the document data other than the character object. Effect of the Invention
[0009] According to the present invention, even if it is not possible to obtain a glyph specified for a character object of document data to be printed, if the character to be rendered using the glyph is a character that does not affect the print result, the document data can be printed. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 illustrates an overall configuration of a system that provides a printing service. [Diagram 2] FIG. 2 illustrates an example of a hardware configuration. [Diagram 3] FIG. 2 illustrates an example of a software configuration. [Figure 4] 3 is a diagram showing an example of the data structure of an object included in document data; FIG. [Diagram 5] FIG. 11 is a diagram showing an example of a screen displayed on a mobile terminal. [Figure 6] FIG. 2 is a diagram showing a processing flow of the first embodiment. [Figure 7] FIG. 11 is a flow diagram showing details of a process for rendering characters. [Figure 8] 13 is an example of a preview screen displayed in the second embodiment. [Figure 9] FIG. 11 is a diagram showing a processing flow of the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings, etc. Note that the embodiments described below do not limit the present invention, and all configurations described in the embodiments are not necessarily essential to the means for solving the problems of the present invention.
[0012] <Example 1> FIG. 1 is a diagram showing the overall configuration of a system including a print server that provides a print service according to the present embodiment. In FIG. 1, a print server 101 provides a print service for document data stored in a cloud storage. The print server 101 has a function of acquiring document data from a cloud storage in response to a request from a client terminal (for example, a client terminal 103) and generating print data from the acquired document data. Document data is stored in a cloud storage 102. A mobile terminal 103 is an example of a client terminal, and is a smartphone or a PC (personal computer). In response to an operation by a user, the mobile terminal 103 designates document data to be printed from among the document data stored in the cloud storage 102, and requests the print server 101 to print the designated document data. A printer 104 acquires print data generated by the print server 101 and performs printing. The print server 101, the cloud storage 102, the mobile terminal 103, and the printer 104 are connected via the Internet 100.
[0013] FIG. 2(a) is a block diagram showing an example of a hardware configuration of an apparatus operable as the print server 101 or the mobile terminal 103. In FIG. 2(a), a CPU (Central Processing Unit) 201 is a unit that executes various programs and realizes various functions. A RAM (Random Access Memory) 202 is a unit that stores various information. The RAM 202 is also a unit that is used as a temporary working storage area for the CPU 201. A non-volatile storage medium 203 is a unit that stores various programs and the like, and is, for example, a ROM, a flash memory, an SSD (Solid State Disk), or an HDD (Hard Disk Drive). For example, the CPU 201 loads a program (a program for the print server or a program for the mobile terminal) stored in the non-volatile storage medium 203 into the RAM 202 and executes it. As a result, each CPU of the print server 101 or the mobile terminal 103 functions as a processing unit that executes the processing of each step of the flowcharts described later in FIG. 6, FIG. 7, and FIG. 9. The processing of each step in the flowchart described below is not limited to being realized using the CPU 201 of the print server 101 or the mobile terminal 103, and all or part of the processing may be realized using dedicated hardware.
[0014] The input / output interface 204 provides an interface with an output device such as a display device that displays information, an input device such as a keyboard or mouse that receives instructions from a user, and an input / output device such as a touch panel. Note that these input / output devices may be built into the mobile terminal 103 or the print server 101, or may be external units.
[0015] The network interface 205 is a unit for connecting the print server 101 and the mobile terminal 103 to a network such as the Internet 100 or an intranet (not shown).
[0016] The above-mentioned units 201 to 205 are configured to be able to transmit and receive data via a bus 206 .
[0017] The functions of the print server 101 are not limited to those realized on a single server device, but may be realized on a virtual server using cloud computing (that is, a cloud server).
[0018] 2B is a block diagram showing an example of the hardware configuration of the printer 104. The printer 104 includes a CPU 211, a RAM 212, a non-volatile storage medium 213, a network interface 214, a printer engine 215, and a scanning panel 216, which transmit and receive data via a bus 217. The CPU 211 of the printer 104 controls the overall processing of the printer by loading a program stored in a non-volatile storage medium (e.g., a ROM) into the RAM and executing it. For example, the CPU 211 controls the printer engine 215 to perform printing based on print data received via the network interface 214. The printer 104 also accepts operations from a user via an operation panel 216.
[0019] Next, an example of the software configuration of the print server 101, the mobile terminal 103, and the printer 104 will be described with reference to Fig. 3. The software configuration example shows what functions are provided when the CPU of each device executes each program.
[0020] FIG. 3A is a diagram showing an example of the software configuration of the print server 101. The CPU of the print server 101 executes a program to function as a print request receiving unit 301, a document data receiving unit 302, a print data generating unit 303, and a preview image generating unit 304. The print request receiving unit 301 receives a print request from the mobile terminal 103 via the network interface 205. The document data receiving unit 302 acquires document data from the cloud storage 102. The print data generating unit 303 generates print data from the document data. The preview image generating unit 304 generates image data for preview from the document data. The print server 101 also stores font data 305 used in character rendering when generating print data in the non-volatile storage medium 203.
[0021] 3(b) is a diagram showing an example of the software configuration of the mobile terminal 103. The CPU of the mobile terminal 103 executes a program to function as a UI control unit 301 and a communication control unit 312. The UI control unit 311 accepts operation input from the user via an input / output device such as a touch panel and the input / output interface 204. The communication control unit 312 communicates with the print server via a network interface.
[0022] 3(c) is a diagram showing an example of the software configuration of the printer 104. The CPU of the printer 104 executes a program to function as a print data acquisition unit 321 and a print control unit 322. The print data acquisition unit 321 acquires print data from the print server 101 via the network interface 217. The print control unit 322 controls the printer engine 215 to print the print data.
[0023] A process flow when performing a print process using the print service provided by the print server 101 of the present embodiment will be described with reference to FIG. 6. FIG. 5 shows an example of a screen displayed on the mobile terminal 103. First, a list of cloud storages accessible via the print server 101 is displayed on a screen 501 of the mobile terminal 103. The user selects a desired cloud storage from the list displayed on the screen 501. The mobile terminal 103 then accesses the selected cloud storage via the print server 101 and acquires a list of document data managed in the cloud storage. The mobile terminal 103 then displays a list of document data acquired via the print server 101 as shown on a screen 502. After that, when the user selects a desired document data from the multiple document data displayed in the list, the screen transitions to a print setting screen 503 for making print settings (such as the number of copies, paper size, selection of single-sided / double-sided printing, and selection of color printing / black-and-white printing). After making various print settings, when the user presses a print button 504, the mobile terminal transmits a print request to the print server to instruct the print server to print the document data selected as the print target according to the set print settings.
[0024] 6 is triggered by the user pressing the print button 504 on the print setting screen 503 displayed on the mobile terminal 103. In step S601, the communication control unit 312 of the mobile terminal 103 transmits to the print server a print request for printing the document data selected as the object to be printed according to the print settings set by the user.
[0025] In step S602, when the print request receiving unit 301 of the print server receives a print request from the mobile terminal, the document data acquiring unit 302 acquires the document data selected by the user from the cloud storage 102 selected by the user.
[0026] In step S603, the print data generating unit 303 of the print server 101 converts the document data acquired in S602 to generate print data. When the print server renders a normal character included in the document data, if the print server cannot acquire the glyph of the character (if the print server does not hold the glyph and the glyph is not embedded in the document data), an error occurs. However, the print server of this embodiment is characterized in that if the character to be rendered satisfies a predetermined condition, the rendering process of the character is skipped and no error occurs. Details of this process will be described later with reference to FIG. 7.
[0027] In step S604, the print data generating unit 303 of the print server 101 determines whether an error has occurred during the generation of the print data in S603. If it is determined in step S604 that no error has occurred, the print server 101 holds the generated print data and proceeds to step S605.
[0028] In step S605, the print data acquisition unit 321 of the printer 104 transmits a print data acquisition request to the print server 101 in response to a predetermined print operation by the user via the printer's operation panel, and acquires the print data from the print server 101. Then, in step S606, the print control unit 322 of the printer 104 executes printing using the acquired print data. Note that in this embodiment, the printer transmits an acquisition request to the print server in response to a predetermined print operation on the printer in S605 to acquire the print data, but this is not limited to this. For example, if an output destination printer is specified when making print settings on the mobile terminal, and the environment is such that the print server can transmit print data without an acquisition request from the printer, the print server may automatically transmit the print data to the printer.
[0029] On the other hand, if it is determined in step S604 that an error has occurred, the print data generation unit 303 of the print server sends an error notification to the mobile terminal 103, and in step S607, the UI control unit 311 of the mobile terminal displays an error message on the display.
[0030] FIG. 7 shows a detailed flow of a process of rendering characters included in document data when converting document data to print data in step S603 in FIG. 6. The document data includes not only character objects but also objects such as images and figures. FIG. 4 shows an example of a data configuration of an object included in document data. Reference numeral 401 denotes an example of a data configuration of a character object indicating information for rendering a character. The character object 401 includes information on rectangle information indicating a position and size, color, transparency, font name, font size, and the like when rendering a character. The color is expressed, for example, by an RGB value. The transparency is expressed, for example, by an α value. The rendering mode also includes a rendering mode indicating a method of rendering a character. The rendering mode includes a Fill command for filling and rendering the inside of a glyph when drawing using a glyph of a character, and a Stroke command for rendering only the edge (contour) of the character. If the rendering mode is neither Fill nor Stroke, the character is not drawn and becomes invisible. The character object 401 also includes information on a character string (character code) to be rendered. Also, 402 is an example of a data configuration of an image object indicating information for rendering an image. The image object 402 includes rectangular information indicating the position and size of the image to be rendered, and image data to be rendered. Furthermore, the document data includes multiple objects in the order of rendering.
[0031] The print server 101 renders each object included in the document data according to the rendering order and converts it into print data. The print server outputs an error if an error occurs when rendering an object such as an image or a figure in the document data, but FIG. 7 describes the details of the process flow when rendering each character object 401 in the document data.
[0032] In step S701, the print data generation unit 303 of the print server acquires the font name of the character object 401 and the glyphs corresponding to the font specified for each character in the character string. If the glyphs are embedded in the document data, they are acquired from the document data. If the glyphs are not embedded in the document data, they are acquired from the font data 305 held by the print server 101.
[0033] In step S702, the print data generating unit 303 determines whether the glyph has been acquired. If it is determined that the glyph has been acquired, the process proceeds to step S703, where character rendering is performed based on the acquired glyph, and the rendering process of the character object 401 is terminated.
[0034] On the other hand, if it is determined in step S702 that the glyph could not be acquired, the process proceeds to step S704.
[0035] In step S704, it is determined whether the font name specified for the character object is a specific font name used as a character for search. As described above, some types of applications that generate searchable PDFs specify a special font name as the font to be specified for the character string of the character recognition result. Therefore, the print server of this embodiment stores in advance the special font name used in the searchable PDF data (document data) generated by such an application as a specific font name and uses it for the determination in S704. In a searchable PDF, a character object for search is embedded as invisible data, so that a character object to which the specific font name is specified is an object that does not affect the print result.
[0036] Therefore, if it is determined in step S704 that a specific font name is specified for the character object, the rendering of the character object is skipped and the process ends. After that, if there is an unprocessed object in the document data, the rendering process of the next object is continued. On the other hand, if it is determined in step S704 that the font name specified for the character object is not a specific font name, the process proceeds to step S705.
[0037] In step S705, it is determined whether the rendering mode of the character object 401 is Fill or Stroke. If the rendering mode is neither Fill nor Stroke in step S705, the rendering of the character object is skipped and the process ends. After that, if there is an unprocessed object contained in the document data, the rendering process of the next object is continued. On the other hand, if it is determined in step S705 that the rendering mode is Fill or Stroke, the process proceeds to step S706.
[0038] In step S706, it is determined whether the transparency of the character object 401 is 100%. A character object with a transparency of 100% is a character object that does not affect the print result. Therefore, if it is determined in step S706 that the transparency is 100%, the rendering of the character object is skipped and the process ends. After that, if there is an unprocessed object contained in the document data, the rendering process of the next object continues. On the other hand, if it is determined in step S706 that the transparency is not 100%, the process proceeds to step S707.
[0039] In step S707, it is determined whether the character color of the character object 401 is the same as the color of the background on which the character object is drawn (for example, the background color of the page on which the character object is drawn). A character object with the same character color as the background color is a character object that does not affect the print result. Therefore, if it is determined in step S707 that it is the same as the background color of the page, character rendering is skipped and the process ends. After that, if there are any unprocessed objects contained in the document data, rendering processing of the next object continues. On the other hand, if it is determined in step S707 that it is not the same as the background color of the page, the process proceeds to step S708.
[0040] In step S708, the rectangle information of the character object 401 is compared with the rectangle information of the image object 402 that is later in the rendering order to determine whether there is an image object 402 that completely covers the rendering range of the character object 401. If there is an image object 402 that completely covers the rendering range of the character object, the character object is a character object that does not affect the print result. Therefore, if it is determined in step S708 that there is an image object 402 that completely covers the rendering range, the character rendering is skipped and the process ends. Thereafter, if there is an unprocessed object included in the document data, the rendering process of the next object is continued. On the other hand, if it is determined in step S708 that there is no image object 402 that completely covers the rendering range of the character object, the process proceeds to step S709, an error is output, and the process ends.
[0041] If the rendering of the character object 401 included in the document data ends with an error output (S709) even once, it is determined in S604 of FIG. 6 that an error occurred during generation of the print data.
[0042] As described above, when the print server 101 cannot acquire the glyph of the font specified for a character object in the document data, it determines in S704 to S708 whether the character object is a character object that does not affect the print result. That is, even when the print server 101 cannot acquire the glyph of the character object, if the character object satisfies a predetermined condition indicating that the character object does not affect the print result as in S704 to S708, the rendering of the character object is skipped. Then, the print process can be continued using an object other than the character object.
[0043] It should be noted that the present invention does not necessarily require that all of the processes from S704 to S708 described with reference to FIG. 7 be included, but it is sufficient that at least any of the processes from S704 to S708 be included.
[0044] <Example 2> The second embodiment will be described with reference to Figures 8-9. Figure 9 shows a processing flow of the second embodiment, but only the differences from the first embodiment will be described in detail here. Steps S901 to S906 in Figure 9 are similar to steps S601 to S606 in Figure 6 of the first embodiment, and therefore description thereof will be omitted.
[0045] If it is determined in step S904 that no error has occurred, the process proceeds to step S907. In step S907, the preview image generating unit 304 of the print server 101 generates a preview image. In the preview image, characters for which glyphs cannot be acquired and which will affect the print result are rendered in a garbled state (.notdef glyph). The garbled characters are rendered in a predetermined shape, such as a rectangle.
[0046] In step S908, the print server communication unit of the mobile terminal 101 receives the preview image data from the print server 102, and the UI control unit 311 displays the received preview image. Fig. 8 is an example of a display screen 801 of the preview image displayed on the mobile terminal 101. At this time, the print server 102 may notify an error message indicating that garbled characters exist because glyphs could not be acquired, and display the error message on the display screen of Fig. 8.
[0047] The user checks the preview image and presses the print button 802 or the cancel button 803. If the print button 802 is pressed, a print request is sent to the print server. If the cancel button 803 is pressed, a print cancel request is sent to the print server. In step S909, the print request receiving unit 301 of the print server 101 determines whether or not a print request has been received. If it is determined in step S909 that a print request has been received, the process proceeds to step S905. If it is determined in step S909 that a print request has not been received, the flow ends.
[0048] As described above, in the second embodiment, when the document data to be printed contains characters that cannot obtain glyphs and that may affect the print result, a preview image is generated and displayed on the mobile terminal. Therefore, the user can check the preview image that contains the garbled characters and give a print instruction or a print cancel instruction.
[0049] <Example 3> In the first and second embodiments, when the print server generates print data from document data, even if the glyph of a character object cannot be acquired, rendering is skipped for character objects that do not affect the print result, as described in Fig. 7. When an information processing device (PC or printer control device) other than the print server generates print data from document data, the process shown in Fig. 7 may be applied.
[0050] <Other Examples> The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0051] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist of the present invention.
Claims
1. An apparatus for generating print data by rendering document data, comprising: An apparatus characterized by having a print data generation means that, if a character object contained in the document data satisfies a predetermined condition, skips rendering of the character object and continues generating the print data using objects contained in the document data other than the character object.
2. The device according to claim 1, characterized in that a character object for which the rendering is skipped is a character object for which the device is unable to obtain a glyph of a font specified for the character object and which satisfies the specified condition indicating that the character object does not affect the printing result.
3. 2. The apparatus according to claim 1, wherein the predetermined condition includes that a font name specified for the character object is a specific font name.
4. 2. The apparatus according to claim 1, wherein the predetermined condition includes that a rendering mode specified for the character object is neither Fill nor Stroke.
5. The device according to claim 1 , wherein the predetermined condition includes a condition that a transparency specified for the text object is 100%.
6. 2. The device according to claim 1, wherein the predetermined condition includes that a character color designated for the character object is the same as a background color.
7. The apparatus according to claim 1 , wherein the predetermined condition includes the presence of another object overlapping the character object.
8. The device described in claim 1, characterized in that when the print data generation means satisfies at least one of the following specified conditions: a font name specified for the character object is a specific font name, a rendering mode specified for the character object is neither Fill nor Stroke, a transparency specified for the character object is 100%, a character color specified for the character object is the same as a background color, and there is another object overlapping the character object, the print data generation means controls to skip rendering of the character object and continue generating the print data using objects included in the document data other than the character object.
9. 2. The apparatus according to claim 1, wherein the print data generating means outputs an error when a character object included in the document data does not satisfy the predetermined condition.
10. The device according to claim 1, further comprising a preview image generating means for generating a preview image by rendering a character object in a predetermined shape when the device is unable to obtain a glyph of a font specified for the character object included in the document data and the character object does not satisfy the specified condition.
11. The device according to any one of claims 1 to 10, characterized in that the device is a print server.
12. The apparatus according to any one of claims 1 to 10, characterized in that the apparatus is a cloud server.
13. 11. The device according to any one of the preceding claims, characterized in that the device is a control device for a printer.
14. A program for causing a computer to function as each of the means of the apparatus according to any one of claims 1 to 10.
15. A method for generating print data by rendering document data, comprising the steps of: A generation method characterized by comprising a step of controlling, when a character object contained in the document data satisfies a predetermined condition, to skip rendering of the character object and to continue generating the print data using objects contained in the document data other than the character object.
Citation Information
Patent Citations
Induction heating device for slab
JP1992061784A
Printer and computer program for printer
JP2020138391A