Application program, recording medium, method and information processing device

JP2025036655AInactive Publication Date: 2025-03-14CANON KK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024231012
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Benefits of technology

【0009】 本発明により、OS標準の印刷用ダイアログに、印刷設定をより明確に反映したプレビュー表示を行わせることが可能となる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025036655000001_ABST
    Figure 2025036655000001_ABST
Patent Text Reader

Abstract

To provide an easy-to-understand print setting function.SOLUTION: A program of an application that runs on an OS provided in an information processing device causes a computer of the information processing device to: receive a print request from a user; obtain print setting information designated on an OS-standard print setting dialogue displayed in response to the print request; generate preview data for the print setting dialogue to display a preview on the basis of to-be-printed data and the print setting information; and return the preview data to the print setting dialogue.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a program, an information processing device, and a method, and more particularly to a program, an information processing device, and a method related to an application that provides a printing function. [Background technology]

[0002] A commonly known configuration is to use a printer driver installed on a host computer as software for controlling the printing device, and to print on a printing device connected to the host computer. An operating system (OS), which is the basic software, is installed on the host computer, and the printer driver is configured according to the specifications defined by the OS, and runs when called by the OS. By providing a printer driver that conforms to the OS specifications, a vendor that provides a printing device can provide a means of instructing the printer to print using the OS.

[0003] An application with a print function can achieve printing on a printing device by issuing a print request to a printer driver. When Microsoft (registered trademark) Windows (registered trademark) is used as the OS, architectures called Win32 and WPF are used as the application architecture. Win32 and WPF provide multiple methods for issuing print requests. For example, when issuing a print request, a Win32 application may or may not display a standard print dialog box provided by the OS. Also, a Win32 application may use a GUI (Graphical User Interface) provided by a printer driver to change print settings, or may change print settings directly without using the GUI.

[0004] In recent years, a new application architecture called Universal Windows Platform (UWP) application has appeared in Windows (registered trademark). When a UWP application issues a print request to a printer driver, an OS standard print dialog called Modern Print Dialog (MPD) is displayed (Patent Document 1). [Prior art documents] [Patent documents]

[0005] [Patent Document 1] JP 2017-194766 A Summary of the Invention [Problem to be solved by the invention]

[0006] In this way, in a UWP application, the MPD is displayed when a print request is made, so the user can issue print instructions with a unified operation feel regardless of the type of application. On the other hand, in the print dialog described above, a preview display that more clearly reflects the print settings is required.

[0007] In view of the above problems, an object of the present invention is to provide a technique that enables a preview display that more clearly reflects print settings in an OS standard print dialogue. [Means for solving the problem]

[0008] In order to solve the above-mentioned problems, one aspect of the program of the present invention is an application program that runs on an OS equipped in an information processing device, and causes a computer of the information processing device to function as a first accepting means for accepting a print request from a user, an acquiring means for acquiring print setting information specified in the OS standard print setting dialog displayed in response to the print request, a first generating means for generating preview data for the print setting dialog to display a preview based on the data to be printed and the print setting information, and a return means for returning the preview data to the print setting dialog. Effect of the Invention

[0009] According to the present invention, it is possible to display a preview in the OS standard print dialogue that more clearly reflects print settings. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a block diagram showing a hardware configuration of a printing system. [Diagram 2] FIG. 1 is a block diagram of a printing system. [Diagram 3] FIG. 11 is a schematic diagram for explaining a screen for issuing a print instruction. [Figure 4] An example of the screen layout of a UWP application. [Diagram 5] 13 is a flowchart illustrating an initialization process for a print process of a UWP application. [Figure 6] An example of the MPD print settings screen displayed in photo printing mode. [Figure 7] An example of the MPD print settings screen displayed in disc label printing mode. [Figure 8] A flowchart of the pagination process for UWP applications. [Figure 9] 13 is a flowchart of a preview generation process for a UWP application. [Figure 10] An example of the MPD print settings screen when an unsupported printer is selected. [Figure 11] 13 is a flowchart of a print data generation process of a UWP application. [Figure 12] 13 is a flowchart of a setting change process for a UWP application. [Figure 13] FIG. 3 is a sequence diagram showing an example of an operation between blocks in FIG. 2. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the present invention, and not all of the combinations of features described in the embodiments are essential to the solution of the present invention. Note that the same components are given the same reference numbers and descriptions are omitted.

[0012] <Embodiment 1> (Printing system hardware configuration) 1 is a block diagram showing the hardware configuration of a printing system. In this diagram, a host computer 101 is an example of an information processing device, and has an input interface 110, a CPU 111, a ROM 112, a RAM 113, an external storage device 114, an output interface 115, and an input / output interface 116. In addition, input devices such as a keyboard 118 and a pointing device 117 are connected to the input interface 110, and a display device such as a display unit 119 is connected to the output interface 115.

[0013] An initialization program for print initialization of a later-described UWP (Universal Windows Platform) application is stored in the ROM 112. Application programs, an operating system (OS), a printer driver, and various other data are stored in the external storage device 114. The RAM 113 is used as a work memory or the like when the CPU 111 executes the various programs stored in the external storage device 114.

[0014] In this embodiment, the CPU 111 executes processing according to the procedures of a program stored in the ROM 112, thereby realizing functions described below in the host computer 101 and processing related to flowcharts described below. A printing device 102 such as a printer is connected to the host computer 101 via an input / output interface 116. In this embodiment, the host computer 101 and the printing device 102 are described as being configured separately, but they may also be configured as a single information processing device.

[0015] (Printing system block diagram) 2 is a block diagram of the printing system. Here, the description is based on the premise that the printing system uses a host computer 101 equipped with Microsoft Windows 8 or later as the OS 202 and operates on an architecture called a V4 printer driver.

[0016] The CPU 111 shown in FIG. 2 executes programs stored in the ROM 112, thereby functioning as a UWP application 201, an OS 202, a WSDA 205, and a printer driver 206.

[0017] The UWP application 201 is a print application having a print function, and is an application capable of performing at least one of operations of viewing, editing, moving, and deleting print target data including images, text, etc., and accepting a print request from a user. The OS 202 includes an MPD (Modern Print Dialog) 203 and a print manager 204. The MPD 203 is a print setting screen (print setting dialog) common to all applications, which has a print preview function that allows the print result to be confirmed on the screen and a function that allows the user to select basic print settings. Note that, in the example of FIG. 2, an example in which the MPD 203 runs on the OS 202 is described, but this is not limiting, and the MPD 203 may exist as an application external to the OS 202. Even in this case, the MPD 203 is a print dialog that is standard to the OS, and is started by the OS 202 when printing. Also, although the UWP application 201 is shown as an external application in FIG. 2, it may run on the OS. The print manager 204 is a function of the OS 202, and acquires information from the UWP application 201, MPD 203, and WSDA 205 for changing and checking print settings, and instructs the printing device 102 to print via the printer driver 206. The WSDA (Windows Store Device Application) 205 is an application for extending the functions of the printer driver 206, which is provided by a vendor that provides a printing device (hereinafter, a printer vendor).

[0018] Here, an example of a series of print processes executed by the UWP application 201, the MPD 203, the print manager 204, and the WSDA 205 according to this embodiment will be described with reference to FIG.

[0019] First, in S1301, the user instructs the UWP application 201 to be launched. In S1302, the UWP application 201 displays a screen on the display unit 119. FIG. 3A shows an example of a screen 301 provided by the UWP application 201, which is a print application. In S1303, the UWP application 201 accepts a print request from the user, and in S1304 notifies the print manager 204. Note that although communication between blocks or instructions from the user to each block are shown by arrows connecting the blocks, they may be performed via the OS 202.

[0020] When the UWP application 201 accepts a print request from a user, the print manager 204, which is a function of the OS 202, starts the MPD (print setting dialog) 203 in S1305. In addition, the print manager 204 transmits print setting information to the UWP application 201 in S1306, and transmits a request to generate preview data. Next, the UWP application 201 generates preview data based on the print setting information acquired from the print manager 204 and at least a part of the content (print target data) of the UWP application in S1307. Next, the UWP application 201 passes the preview data to the MPD 203 in S1308 and issues a drawing instruction for the preview data. The preview data generation process will be described later with reference to FIG. 9. In S1309, the MPD 203 uses the preview data to display the print setting screen 302 provided by the MPD shown in FIG. 3B. On this print setting screen 302, the user can select the printer driver 206 to be used for printing. Furthermore, basic print settings can also be specified on the print setting screen 302.

[0021] Furthermore, in S1310, the print manager 204 receives an instruction from the user on the print setting screen 302 and receives a notification in S1311, and instructs the WSDA 205 to start up in S1312. In S1313, the WSDA 205 that has received the instruction to start up starts up a screen on which the user can select detailed print settings. Specifically, when the "Other Settings" button 303 is selected on the print setting screen 302 in FIG. 3B, a detailed setting screen 304 provided by the WSDA 205 shown in FIG. 3C is displayed. On this detailed setting screen 304, the user can specify more detailed print settings. Note that the image that looks like an original image displayed on the detailed setting screen 304 provided by the WSDA 205 is a sample image that the WSDA originally includes. Therefore, it is not a preview image based on drawing data generated by a UWP application, but a sample image that does not change even if the drawing data is changed. Also, the WSDA 205 is started up only when the user selects the button 303 on the print setting screen 302 provided by the MPD, and is not necessarily started up when the print settings are specified.

[0022] Next, WSDA 205 receives an instruction to change the detailed settings by user operation in S1314 and notifies S1315 of the changes. Then, print manager 204 stores the changed print setting information in S1316. Here, information indicating the print settings is described in XML format based on a format defined by the OS, and is included in data called a PrintTicket. WSDA 205 can refer to and change the PrintTicket, but cannot refer to drawing data (images and text information that are the source of printing on paper). Although not shown in FIG. 13, the PrintTicket is generated by the selected printer driver 206. Printer driver 206 also has a function to generate PrintCapabilities, which describes configurable functions and selection items in XML format based on a format defined by the OS. WSDA 205 provides a user interface based on the information described in this PrintCapabilities.

[0023] Next, in S1317, the print manager 204 notifies the UWP application 201 of information indicating the updated print settings. Next, the UWP application 201, which has reacquired the print settings, generates preview data in the same manner as in S1307 to S1308 in S1318 to S1319, and notifies the MPD 203 of the preview data. Next, in S1320, the MPD 203 updates the screen being displayed based on the acquired preview data. Note that, even if the print settings are changed on the print setting screen 302, the changed settings are similarly notified to the print manager 204. Next, the UWP application 201 may generate preview data by processing similar to S1306 to S1308, and update the screen displayed on the MPD 203 by processing similar to S1309.

[0024] After the print settings shown in FIG. 3, it is assumed that the user presses the "Print" button on the print setting screen 302 provided by the MPD 203 of the OS 202 (S1321). Next, the MPD 203 accepts the pressing of the "Print" button as a print instruction, and notifies the print manager 204 that the "Print" button has been pressed (S1322). The print manager 204 that has received the notification requests the UWP application 201 to generate print data (document data) in S1323. The UWP application 201 that has received the instruction generates print data in S1324, and transmits the generated print data to the print manager 204 in S1325. The print manager 204 generates print data in S1326 based on the print data generated by the UWP application 201 and the above-mentioned PrintTicket. This print command may be an XPS document written in a format called XML Paper Specification (hereinafter, XPS).

[0025] The OS 202 stores the XPS document generated by the print manager 204 as a spool file. The printer driver 206 receives the XPS document stored as a spool file from the OS 202, and converts the XPS document into a print command that can be interpreted by the printing device 102 and outputs it in accordance with the print setting information included in the XPS document. This completes the basic process of printing from the UWP application 201.

[0026] (Example of the screen layout of UWP application 201) FIG. 4 is a diagram showing an example of a screen configuration of a UWP application 201 having a function of printing an image. The screen of the UWP application 201 is composed of a menu screen 401 on the left side and a main screen 402 on the right side. The menu screen 401 includes a select button 403, an edit button 404, and a print button 405. When the user presses the select button 403, a list of images stored in the external storage device 114 is displayed on the main screen 402. The user can select any number of images to be printed on this screen. Here, it is assumed that two images are selected by the user. When the user presses the edit button 404, the selected image and a screen for editing it are displayed on the main screen 402. On this screen, the user can apply processing such as trimming and color adjustment to the selected image, or add any text. When the user presses the print button 405, a screen for executing printing is displayed on the main screen 402. This print screen is displayed on the main screen 402 in FIG. 4. The print screen displays images 406 and 407 selected and edited by the user to be printed. Photo print button 408 is a button for printing the print object as a photo. Document print button 409 is a button for printing the print object as a document. Disc label print button 410 is a button for printing the print object on a printable disc.

[0027] (UWP application print initialization process) 5 is a diagram showing the main process flow of the print initialization process of the UWP application 201 in this printing system. Hereinafter, the UWP application 201 may be described as the subject of each process, but in reality, the corresponding function is realized by the CPU 111 executing the corresponding program. Note that not all processes are necessarily executed sequentially on one process, and there may be cases where the process is transferred to the OS side once and then called again by the OS. This is merely a flow showing the main processes of the UWP application 201 in an easy-to-understand manner for the sake of convenience.

[0028] When the user presses any one of the photo print button 408, document print button 409, and disc label print button 410 in FIG. 4, the UWP application starts the print initialization process in FIG. 5. First, the UWP application 201 registers a print event handler in the print manager 204 (S501). As a result, when a specific event occurs that is necessary for displaying the screen of the MPD 203 or for executing print processing to the printer driver 206, the print manager 204 calls the process of the print event handler of the UWP application 201. There are three print event handlers: a preview data generation process, a paginate process, and a print data generation process. The process in each event handler of the UWP application 201 will be described in detail later. Next, the UWP application 201 instructs the print manager 204 to display a print UI (S502). Next, the UWP application 201 determines the current print mode (S503).

[0029] When the user presses the photo print button 408, the UWP application 201 determines that the print mode is the photo print mode ("take photo" in S503), and proceeds to S504. In this initialization process, the UWP application 201 can specify the type of print setting to be displayed in the MPD 203. In the photo print mode, the UWP application 201 specifies the paper size, print orientation, paper type, borderless printing, number of copies to be printed, and color mode as the print settings to be displayed (S504). As a result, only the print settings required for photo printing are displayed in the MPD 203, which reduces the user from specifying inappropriate print settings, improving convenience. In addition, in this initialization process, the UWP application 201 can specify the default selection value for each print setting. In the photo print mode, the UWP application 201 specifies 4x6 as the default print setting value for the paper size (S505), and specifies photo paper as the default print setting value for the paper type (S506). In this way, by specifying in advance setting values ​​that are generally used for photo printing, it is possible to reduce printing failures caused when the user does not specify the print settings correctly, improving convenience. Finally, the UWP application 201 registers a setting change event handler that is called when the print settings are changed on the MPD (S512). The processing of the setting change event handler of the UWP application 201 will be described later. The above is the print initialization processing of the UWP application in the photo print mode.

[0030] 6 is a diagram showing an example of a print setting screen of the MPD 203 displayed in photo print mode. A printer selection section 602 for specifying a printer to print from, and a print setting section 603 in which the user can specify print settings are displayed on the print setting screen 601. The items displayed on the print setting section 603 are the print settings specified by the UWP application 201 in S504. In addition, the selection values ​​specified in S505 and S506 are selected as the initial values ​​of the print settings when the print setting screen 601 is started.

[0031] Returning to the description of the flow in FIG. 5, when the user presses the document print button 409 ("Document Print" in S503), the UWP application 201 determines that the print mode is the document print mode, and proceeds to S507. In the document print mode, the UWP application 201 specifies the paper size, print orientation, double-sided printing, the number of pages per sheet, the number of copies, and the color mode as print settings to be displayed (S507). Next, the UWP application 201 specifies letter as the default print setting value for the paper size (S508), and specifies plain paper as the default print setting value for the paper type (S509). In this way, as with photo printing, by specifying print settings and initial values ​​that are generally used in document printing, it is possible to reduce printing failures by the user, and convenience is improved. Finally, the UWP application 201 executes the process of S512 in the same manner as in the photo print mode. The above is the print initialization process of the UWP application in the document print mode.

[0032] When the user presses the disc label print button 410 ("Disc label print" in S503), the UWP application 201 determines that the print mode is the disc label print mode and proceeds to S510. In the disc label print mode, the UWP application 201 specifies the paper size and paper type as print settings to be displayed (S510). The paper size and paper type to be specified in disc label printing are defined independently by the printer vendor, and the UWP application 201 cannot specify such print setting values ​​in this initialization process. Therefore, in the disc label print mode, the UWP application 201 executes the process of S512 without specifying the initial values ​​of the paper size and paper type, and ends the process.

[0033] 7 is a diagram showing an example of a print setting screen displayed in the disc label printing mode of the MPD 203. Items displayed in a print setting section 703 of a print setting screen 701 are the print settings specified by the UWP application 201 in S510.

[0034] By the above processing, only the print settings necessary for the print purpose specified by the UWP application 201 are displayed on the print settings screen displayed by the MPD203, and the initial values of the suitable print settings are set. As a result, it is possible to reduce the user's operation of changing inappropriate print settings, and the usability is improved. Note that the three print modes described in FIG. 5, the print settings displayed when each print mode is selected, and their initial values are merely examples and are not limited thereto.

[0035] <Pagination Processing of UWP Application> FIG. 8 is a flowchart showing the content of the pagination processing among the event handlers registered by the UWP application 201 in S501. Hereinafter, the UWP application 201 may be described as the main body of each process. However, actually, the corresponding functions are realized by the CPU 111 executing the corresponding program.

[0036] This paginate process is called from the print manager 204 when the user changes the print settings on the MPD 203. The print settings specified on the MPD are passed from the print manager 204 to the UWP application 201. First, the UWP application 201 saves the paper size and printable area passed from the print manager 204 in the RAM 113 (S801). The paper size is selected by the user on the MPD 203, and has setting values ​​such as Letter and 4x6. The printable area is information indicating the origin and size of the area in which the printing device 102 can print within the paper size. This information is included in PrintCapabilities returned by the print manager 204 inquiring of the printer driver 206 based on the print setting information selected by the user on the MPD 203. The application can realize optimal printing that fits within the desired printable area of ​​each printing device even if the printing device is changed by forming drawing data to fit within the printable area obtained from the PrintCapabilities. In addition, the UWP application 201 saves other print settings passed from the print manager 204 in the RAM 113 (S802).

[0037] Next, the UWP application 201 determines whether the printable area is a specified size (S803). If the printable area is the specified size, the UWP application 201 saves in the RAM 113 information that the driver currently selected in the MPD 203 is a supported driver (S804). If the printable area is not the specified size, the UWP application 201 saves in the RAM 113 information that the driver currently selected in the MPD 203 is not a supported driver (S805). As described above, since the printable area differs depending on the type of the printing device 102, it is possible to determine whether the printing device 102 is a specific printing device, for example, whether the printing device 102 is supported by the UWP application 201, depending on whether this value is a specific value. By using this information, the UWP application 201 can change the processing depending on whether the printer driver selected in the MPD 203 is supported. This processing will be described later. Note that, although the printable area is used here to determine whether the printing device and the printer driver are supported, the determination may be made based on other information that can identify the printer driver. Finally, the UWP application 201 specifies the total number of pages in this printing to the print manager 204 (S806). For example, when printing two images as shown in FIG. 4, the total number of pages is 2. The above is the content of the paginate process of the UWP application 201.

[0038] (UWP application preview generation process) 9 is a flowchart showing the contents of the preview generation process among the event handlers registered in S501 by the UWP application 201. Hereinafter, the UWP application 201 may be described as the subject of each process, but in reality, the corresponding function is realized by the CPU 111 executing the corresponding program.

[0039] This preview generation process is called by the print manager 204 in order to display a print preview showing an overview of the print result on the MPD 203. First, the UWP application 201 acquires a requested page number from the print manager (S901). The UWP application 201 needs to return a print preview of this page number to the print manager 204. By doing so, the print preview of the page specified by the user is correctly displayed on the MPD 203. Next, the UWP application 201 determines whether the color mode in the print settings passed from the print manager 204 is monochrome (S902). If the UWP application 201 determines that the color mode is color (No in S902), the print content corresponding to the requested page number acquired in S901 is drawn on the Canvas object (S903). For example, in the case of printing two images as shown in FIG. 4, if the requested page number acquired in S901 is 2, the second image 407 is drawn on the Canvas object. Depending on the printing that the UWP application 201 wants to achieve, for example, the image 407 may be drawn in a form that fits the printable area acquired in S801. If the determination in S902 is Yes, that is, if the color mode is monochrome, the print content corresponding to the requested page number acquired in S901 is converted to monochrome and drawn on a Canvas object (S903). With this configuration, the print preview on the MPD 203 is displayed in color if the color mode is color, and in monochrome if the color mode is monochrome. This allows the user to check a print preview on the MPD 203 that is closer to the actual print result.

[0040] Next, the UWP application 201 determines whether the printer driver selected in the MPD 203 is a supported driver (S905). This determination is made based on the information stored in the RAM in S804 and S805. If it is determined that the driver is unsupported, the UWP application 201 draws an error message indicating that printing cannot continue because a supported driver has not been selected on the Canvas object (S906). Next, the UWP application 201 passes the generated Canvas as page data of the requested page to the print manager 204 (S915).

[0041] FIG. 10 shows a print setting screen generated by the MPD 203 through such a preview generation process. On the print setting screen 1001, Printer B is selected in the printer selection section 1002. Here, it is assumed that Printer B is a driver (unsupported driver) not supported by the UWP application 201. In the print preview area 1003 on the print setting screen 1001, a print preview is displayed in which an error message is drawn by the UWP application 201 in S906, indicating that a supported driver has not been selected and printing cannot be continued. The printer selection section on the print setting screen is automatically displayed by the MPD 203, and all printer drivers installed in the OS 202 are listed. Therefore, the UWP application 201 cannot usually be configured to permit printing only for a specific printer driver. However, in this embodiment, when an unsupported driver is selected by the process of the UWP application 201, the fact that the printer is unsupported can be notified to the user by displaying the information in the print preview on the MPD 203. Further, by the process described below, the UWP application 201 controls so that printing fails even if the user instructs printing in a state where an unsupported driver is selected. By these processes, even if all printer drivers are configured to be selectable in the MPD 203, the UWP application 201 can configure so that printing is possible only for a specific printer driver and can correctly inform the user of this. By the above-mentioned process, the UWP application 201 can control the display contents of the print setting screen generated by the MPD 203 to some extent, but cannot display its own pop-up window while the MPD 203 is processing. Even under such conditions, the UWP application 201 of this embodiment can inform the user of information such as an error by drawing a message on a Canvas object for display in the print preview area 1003.Note that, if the UWP application 203 can display a unique pop-up window during processing of the MPD 203, the error message indicating that printing cannot continue may be notified in a form other than the print preview, for example, in a pop-up window.

[0042] Returning to the description of the flowchart in FIG. 9, if it is determined in S905 that the driver selected in the MPD 203 is a supported driver, the UWP application 201 determines whether the print mode is a disc print mode (S907). The determination in S907 is made in the same manner as in S503. If it is determined that the print mode is a disc print mode, the UWP application 201 executes processes for disc printing from S908 to S910. First, the UWP application 201 fills the area on the Canvas other than the printable area of ​​the disc with semi-transparent white (S908). This processing allows the user to distinguish the printable area from the other area from the preview area. Next, the UWP application 201 determines whether the print settings are for disc printing (S909). Specifically, it is confirmed whether the paper size indicates the disc label in the print settings saved in the RAM in S801 or S802. If it is determined in S908 that the print settings are not for disk printing, the UWP application 201 determines that printing cannot continue because there is a conflict between the print mode specified in the print request and the print settings. Therefore, an error message indicating that printing cannot continue is drawn on the Canvas (S910).

[0043] A print setting screen generated by the MPD 203 when the Canvas on which the processes from S908 to S910 have been performed is passed to the print manager 204 in S907 will be described with reference to FIG. 7. In the print preview 704 on the print setting screen 701 generated by the MPD 203, the area other than the printable area of ​​the disc label, i.e., the area outside the center and the outer shape of the disc label, is filled with semi-transparent white. This allows the user to check whether the print target is printed at the desired position and size on the disc label and whether there is any missing part. Also, as shown in 703, if the paper size and paper type are not correctly set for the disc label, an error message is displayed on the print preview 704 indicating that a prohibition relationship occurs between the print mode and the print settings and printing cannot be continued. Also, by the process described below, even if the user instructs printing under the conditions in which this error message is displayed, the UWP application 201 returns an error message instead of returning drawing data. As already mentioned, the paper size and paper type to be specified in disc label printing are defined by the printer vendor, and the UWP application 201 cannot specify such selection values ​​in the initialization process shown in FIG. 5. In other words, the UWP application 201 cannot control the print setting screen generated by the MPD 203 to select a paper size and paper type suitable for disc label printing in advance. In this embodiment, the above-mentioned process allows the user to know that print settings suitable for disc label printing have not been specified, and printing cannot be continued in an inappropriate print setting state. This improves usability during disc label printing and prevents failed printing due to print setting errors. Note that the UWP application 203 can display its own pop-up window while the MPD 203 is processing, and if a prohibition relationship occurs between the print mode and the print settings, a pop-up message inquiring whether to continue printing or not may be displayed.In this case, if the user instructs to continue printing, the print data may be passed to the print manager 204, and if the user instructs to cancel printing, an error message may be returned.

[0044] Returning to the description of FIG. 9, if the print mode is not disk printing in S907 or after the process of S910, the UWP application 201 checks whether double-sided printing is ON in the print settings saved on the RAM in S805 (S911). If double-sided printing is ON (Yes in S911), the UWP application 201 draws an object indicating double-sided printing on the Canvas (S912). For example, the UWP application 201 inserts an image that makes it look like the edge of the page is turning up in the lower right of the Canvas. By passing such a Canvas to the print manager 204, a print preview that makes it look like the edge of the page is turning up is displayed on the print setting screen generated by the MPD 203 only when double-sided printing is ON. This allows the user to intuitively recognize on the print preview whether double-sided printing, which prints on the back side as well, is ON or OFF.

[0045] If double-sided printing is OFF (No in S911) or after the process of S912, the UWP application 201 checks whether borderless printing is ON in the print settings saved on the RAM in S805 (S913). If the UWP application 201 determines that borderless printing is ON (Yes in S913), the UWP application 201 fills the borderless overflow area on the Canvas with semi-transparent white (S914). Normally, when the printer driver 206 realizes borderless printing, the entire paper size is set as the printable area on the PrintCapabilities that indicates the capability information of the printer driver 206. Based on such PrintCapabilities, the application arranges the print content over the entire paper size. The printer driver 206 and the printing device 102 realize borderless printing by slightly enlarging the content arranged over the entire paper size and printing it over the actual paper size. Therefore, in the printed matter generated by the printing device 102, the print content generated by the application is printed with a small amount missing on all sides. In S914, the UWP application 201 fills this missing area (borderless overflow area) with semi-transparent white. Note that the size of this borderless overflow area differs depending on the printer driver 206 and the printing device 102. The UWP application either holds the size of the borderless overflow area of ​​the supported driver in advance, or determines it from the printable area information saved in S801, etc.

[0046] When the UWP application 201 determines that borderless printing is OFF (No in S913) or after the process of S914, it passes the Canvas generated as the page data of the required page to the print manager 204 (S915) and ends the process. The print setting screen generated by the MPD 203 in the process of S914 will be described with reference to FIG. 6. On the print setting screen 601 generated by the MPD 203, borderless printing is selected as ON. In the print preview 603, the borderless overhang area of the print content is displayed thinly by the process of S914. Thereby, the user can confirm the area missing during borderless printing before printing, so that failed printing can be reduced.

[0047] The above is the preview generation process of the UWP application 201. Usually, the preview generation process of a UWP application returns the content to be printed to the print manager 204 in its original form, but in this embodiment, it is returned after performing processing for preview according to the specified print settings. Thereby, on the print setting screen generated by the MPD 203, a print preview in which the specified print settings are more visually reflected can be provided. Also, the UWP application in this embodiment can use the processing for print preview to notify the user that inappropriate print settings are specified, and reduce failed printing. Furthermore, the UWP application in this embodiment can use the processing for print preview to notify the user that printing is not possible when a non-supported driver is selected. Thereby, the UWP application can be configured as a print application dedicated to a specific printer driver.

[0048] <Print Data Generation Process of UWP Application> 11 is a flowchart showing the contents of the print data generation process among the event handlers registered in S501 by the UWP application 201. Hereinafter, the UWP application 201 may be described as the subject of each process, but in reality, the corresponding function is realized by the CPU 111 executing the corresponding program.

[0049] This print data generation process is called by the print manager 204 when the user instructs printing on the MPD 203. First, the UWP application 201 determines whether the printer driver that will perform printing is a supported driver or not (S1101) based on the information stored in the RAM 113 in S804 and S805. If it is not a supported driver, the UWP application 201 returns an error to the print manager 204 (S1102). With this process, the UWP application 201 can be configured not to print even if the user instructs printing with an unsupported driver selected.

[0050] Next, the UWP application 201 determines whether the print mode is the disc print mode (S1103). The determination in S1103 is made in the same manner as in S503. If it is determined that the print mode is the disc print mode, the UWP application 201 checks whether the paper size and paper type in the print settings saved on the RAM in S801 or S802 indicate disc label printing (S1104). If the print mode is disc print and the print settings are not disc print (Yes in S1103 and No in S1104), the UWP application 201 returns an error to the print manager 204 (S1102) and ends the process. With this process, the UWP application 201 can be configured to stop printing when it is determined that disc label printing is not being performed correctly.

[0051] If the UWP application 201 determines that the print mode is not disc print (No in S1103) or that the print setting is disc print (Yes in S1104), the UWP application 201 advances the process to S1105. The UWP application 201 repeats the processes from S1105 to S1110 the total number of pages to be printed. In S1106, the UWP application 201 draws the print content corresponding to the current page number on the Canvas. Next, the UWP application 201 determines whether the print mode is disc print mode (S1107). If it is disc print mode (Yes in S1107), the UWP application 201 fills the area other than the printable area of ​​the disc on the Canvas with white (S1108). If it is not disc print mode (No in S1107), the UWP application 201 advances the process to S1109. This configuration can prevent the printing device 102 from performing unauthorized printing on the area outside the disc label. Next, the UWP application 201 adds the created Canvas to the PrintDocument (S1109). The PrintDocument is an object that indicates the entire print document. The above-mentioned processes from S1106 to S1109 are repeated for the total number of pages to be printed. The UWP application 201 may be configured to store the Canvas created in S907 of the preview generation process as a cache in the RAM 113, skip the processes from S1106 to S1108, and use the already created Canvas. This allows skipping unnecessary processes and executing the print process at high speed. However, if the processes of S908 and S910, which are special processes for the preview, have been performed, the UWP application 201 does not use the already created Canvas, but regenerates it for printing in the processes from S1106 to S1108.

[0052] Finally, the UWP application 201 instructs the completion of the creation of the PrintDocument, returns the created PrintDocument to the print manager 204 (S1111), and ends the process of FIG. 11. The above is the print data generation process of the UWP application 201.

[0053] As described above, the UWP application 201 in this embodiment is configured to interrupt the printing process by returning an error to the print manager 204 under specific conditions. Thereby, printing errors due to inappropriate printing settings can be reduced, and it can be configured as a printing application dedicated to a specific printer driver. Further, the UWP application 201 generates a printing Canvas different from the preview Canvas generated in the preview generation process in the print data generation process. Thereby, the UWP application 201 can issue a correct printing request to the printer driver 206 that does not include preview-only drawing such as S908 and S910.

[0054] <Setting change process of UWP application> FIG. 12 is a diagram showing the main processing flow of the setting change process of the UWP application 201 in this printing system. Hereinafter, the UWP application 201 may be described as the main body of each process, but actually, the corresponding functions are realized by the CPU 111 executing the corresponding program. This setting change process is the process of the setting change event handler registered by the UWP application 201 at S512.

[0055] This setting change process is called by the print manager 204 when the user changes the print settings on the MPD 203. The UWP application 201 checks whether the setting changed on the MPD 203 is the paper type (S1201). The changed setting information is passed from the print manager 204. If the changed setting is not the media type (No in S1201), the UWP application 201 checks whether the setting changed on the MPD 203 is double-sided printing (S1202). Similarly, if the changed setting is not the double-sided printing setting (No in S1202), the UWP application 201 checks whether the setting changed on the MPD 203 is the color mode (S1203). If any of S1201, S1202, and S1203 is Yes, the UWP application 201 instructs the print manager 204 to redraw the print preview (S1204). In this way, the print manager calls the paginate process (FIG. 8) and the preview generation process (FIG. 9) of the UWP application, resulting in redrawing the print preview on the MPD 203. This completes the setting change process of the UWP application 201.

[0056] For example, even if the paper type is changed, the print preview displayed on the MPD 203 does not usually change, and so there is no need to redraw the print preview. However, in this embodiment, the UWP application 201 may perform special drawing for the preview in order to improve the convenience of the print preview displayed on the MPD 203. By executing the setting change process shown in FIG. 12, it is possible to reliably execute the redrawing process of the preview when the paper type is changed, etc.

[0057] As described above, in this embodiment, the UWP application 201 generates different data in the preview generation process and the print data generation process. This allows a print preview that is easy to understand intuitively and ensures a correct print result to be displayed on the MPD 203. Furthermore, the UWP application 201 determines the print settings and the type of the printer driver, notifies the user that printing cannot be continued, and controls so that printing is not executed even if printing is instructed. Through the above-described process, the convenience of print settings on the MPD 203 can be improved in the architecture of a UWP application that prints via the MPD 203. Furthermore, the UWP application can be configured as an application dedicated to a specific printer driver.

[0058] In this embodiment, the UWP application 201 has three print modes: photo printing, document printing, and disc label printing, but it goes without saying that it can be configured to have other modes. Furthermore, the UWP application 201 determines print settings such as color mode, double-sided printing, paper size, and paper type, and performs preview generation processing, but it goes without saying that it can be applied to other print settings as well. For example, when the UWP application 201 detects that layout printing has been specified, it may generate a preview that has been subjected to layout processing.

[0059] <Other embodiments> The above-described embodiment can also be implemented by executing the following process. That is, a recording medium on which program code of software that realizes the functions of the above-described embodiment is recorded is supplied to a system or device. Then, a computer (or a CPU or MPU) of the system or device reads and executes the program code stored in the recording medium. This makes it possible to achieve the above-described object. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium on which the program code is stored constitutes the present invention.

[0060] Examples of storage media for supplying the program code include flexible disks, hard disks, optical disks, magneto-optical disks, CD-ROMs, CD-Rs, magnetic tapes, non-volatile memory cards, ROMs, and DVDs.

[0061] In addition, the functions of the above-mentioned embodiments are not only realized by a computer reading and executing the program code, but also include cases where an OS running on a computer performs part or all of the actual processing based on the instructions of the program code, and the functions of the above-mentioned embodiments are realized by the processing.

[0062] Furthermore, the program code read from the storage medium may be written to a memory provided on a function expansion board inserted into a computer or a function expansion unit connected to the computer. Then, based on the instructions of the program code, a CPU or the like provided on the function expansion board or function expansion unit may perform part or all of the actual processing. The functions of the above-mentioned embodiments are realized by this processing. [Explanation of symbols]

[0063] 101: host computer, 102: printing device, 201: UWP application, 202: OS, 203: MPD, 204: print manager, 205: WSDA, 206: printer driver

Claims

1. An application program that runs on an OS provided in an information processing device, The computer of the information processing device a first receiving means for receiving a print request from a user; An acquisition unit for acquiring print setting information designated in a standard print setting dialog of the OS displayed in response to the print request; a first generating means for generating preview data for displaying a preview on the print setting dialog based on the data to be printed and the print setting information; a return means for returning the preview data to the print setting dialog; A program characterized by causing the program to function as a

2. The program according to claim 1, further causing the computer of the information processing device to function as a second generation means for generating print data based on the data to be printed in response to a print instruction received via the print setting dialog.

3. 3. The program according to claim 1, further causing the computer of the information processing apparatus to function as a determination unit that determines whether printing can be continued with the print settings included in the print setting information.

4. 4. The program according to claim 3, wherein the determining means determines whether printing can be continued based on information indicating a printer driver included in the print setting information.

5. The computer of the information processing device, 5. The program according to claim 3, further functioning as a second reception unit that receives print settings corresponding to the print request from a user.

6. The program according to claim 5, characterized in that the determination means determines that printing can continue if there is no prohibition relationship between the print setting information acquired by the acquisition means and the print settings accepted by the second acceptance means.

7. When the determination means determines that printing cannot be continued, 7. The program according to claim 3, wherein the first generating means generates the preview data including an error message indicating that printing cannot be continued.

8. 8. The program according to claim 3, wherein the determining means returns an error to the request to generate print data when it determines that printing cannot be continued.

9. 9. The program according to claim 1, wherein the first generating means generates the preview data that has been processed so that a printable area can be distinguished from a non-printable area.

10. The program according to claim 1 , wherein the first generating means generates the preview data that has been processed to correspond to the printing process to be executed by the printing device based on the printing setting information acquired by the acquiring means.

11. 11. The program according to claim 1, wherein the acquisition means reacquires the print setting information from the print setting dialog when it is determined that the preview data will be changed due to a change in the print setting information.

12. An information processing device having an OS, an accepting unit that accepts a print request from a user by an application program that runs on the OS; a first acquisition means for acquiring print setting information designated in a standard print setting dialogue of the OS displayed in response to the print request by the program; a first generating means for generating preview data for displaying a preview on the print setting dialog based on the print target data and the print setting information by the program; a return means for returning the preview data to the print setting dialog by the program; 13. An information processing device comprising:

13. A method for executing an information processing device having an OS by a program of an application running on the OS, comprising: a receiving step of receiving a print request from a user; a first acquisition step of acquiring print setting information designated in a standard print setting dialog of the OS displayed in response to the print request; a first generation step of generating preview data for displaying a preview on the print setting dialog based on the data to be printed and the print setting information; a returning step of returning the preview data to the print setting dialog; The method according to claim 1, further comprising:

Citation Information

Patent Citations

  • Program and information processing device

    JP2019160050A

  • Information processing apparatus, control method for information processing apparatus, and program

    JP2017194766A