Information processing device, control method for information processing device, and program
The information processing device addresses the inefficiency in document editing by grouping and rearranging objects based on attribute information and reference points, reducing the need for extensive corrections during paper size changes.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-03-12
AI Technical Summary
Existing document editing applications require significant correction efforts when changing paper size due to the rearrangement of objects, as they primarily focus on positional relationships without considering display positions.
An information processing device that acquires attribute information of objects, groups them based on this information, sets a reference point, and rearranges object groups according to the changed paper size, ensuring consistent display positions.
Reduces the effort required for corrections when changing paper size by maintaining consistent display positions of objects, thus enhancing the efficiency of document editing.
Smart Images

Figure 2026043755000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an information processing device, a control method for an information processing device, and a program. [Background technology]
[0002] Document editing application software (hereinafter referred to as "application") on a personal computer allows you to change the paper size of a document to any size. When changing the paper size of a document, the application typically adjusts the layout by changing the position of objects such as text or images in the document to match the change in paper size.
[0003] Patent Document 1 proposes a document layout editing device that rearranges the document so that the difference in distance between adjacent objects based on their coordinates becomes a representative value determined by the user when changing the paper size of the document. This allows the entire layout to be rearranged without significantly violating the rules for the distance between objects. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2010-20646 Summary of the Invention [Problem to be solved by the invention]
[0005] However, in Patent Document 1, there is a risk that correction work will be required after changing the paper size.
[0006] Therefore, an object of the present disclosure is to reduce the effort required for correction when changing paper size. [Means for solving the problem]
[0007] An information processing device according to one aspect of the present disclosure is characterized by comprising: an acquisition means for acquiring attribute information of objects contained in document data based on receiving an instruction to change the paper size of the document data; a grouping means for grouping objects in the document data into object groups based on the acquired attribute information; a setting means for setting a reference point for the grouped object groups; and a placement means for placing the object groups at a position based on the set reference point and the changed paper size for which the instruction was received. [Effects of the Invention]
[0008] According to the present disclosure, it is possible to reduce the effort required for correction when changing the paper size. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram illustrating a configuration of a personal computer. [Figure 2] FIG. 2 is a diagram illustrating a configuration of a document editing application. [Figure 3] FIG. 10 is a diagram showing the positions of text boxes arranged in a document. [Figure 4] FIG. 10 is a diagram showing attribute information of a text box placed in a document. [Figure 5] FIG. 10 illustrates a change in paper size in a document editing application. [Figure 6] FIG. 10 is a diagram showing the positions of one text box before and after changing the paper size. [Figure 7] FIG. 10 is a diagram showing rearrangement of each text box. [Figure 8] 10 is a flowchart illustrating a process of a document editing application. [Figure 9] FIG. 10 is a diagram illustrating grouping of text boxes. [Figure 10] FIG. 10 is a diagram illustrating grouping of text boxes. [Figure 11]FIG. 10 is a diagram illustrating grouping of text boxes. [Figure 12] FIG. 10 is a diagram illustrating grouping of text boxes. DETAILED DESCRIPTION OF THE INVENTION
[0010] <Embodiment 1> In this embodiment, an example will be described in which the effort required for correction is reduced when the paper size is changed in a document editing application. As described above, in a document editing application, control is performed to adjust the distance between adjacent objects, and therefore adjustments are not made taking into account the display position of content such as text within the object. In this embodiment, an example will be described in which the effort required for correction is reduced when the paper size is changed by taking into account not only the positional relationship of objects but also the display position of the objects.
[0011] Hereinafter, a process that operates as part of a document editing application on a personal computer (information processing device) according to the present embodiment will be described with reference to the drawings. Note that the following embodiment is an example for explaining the present disclosure, and is not intended to limit the present disclosure to only the embodiment. Furthermore, the present disclosure can be modified in various ways without departing from the gist thereof.
[0012] In this embodiment, the document data to be edited by the document editing application may be a general office document, or a document with a specific purpose such as a poster, postcard, or presentation data. The application has various functions for editing documents, and can perform operations such as resizing, moving, and rotating objects within the document data, and cropping images.
[0013] 1 is a configuration diagram of an information processing device 100 in which a document editing application runs in this embodiment. The information processing device 100 includes an input device 101, a central processing unit 102, a display device 103, a storage device 104, a ROM 105, and a RAM 106. The input device 101 can be connected to external devices such as a keyboard and a mouse. Devices that can be operated by the user, such as a touch panel provided on the information processing device 100 itself, are also sometimes called input devices.
[0014] The central processing unit 102 is capable of system management control, document editing processing, and the like. The display device 103 includes devices such as an LCD monitor used for document display. The storage device 104 has a file system built therein, on which the application entity, document templates, fonts, decoration data, and image files such as photographs can be stored. Image files on the storage device 104 can also be imported into documents as objects. The storage device 104 refers to, for example, a hard disk.
[0015] The ROM 105 is a non-volatile storage that also stores programs and data, while the RAM 106 is a volatile storage that temporarily stores programs and data.
[0016] 2 is a diagram showing the configuration of a document editing application 202 executed by the central processing unit 102 of the information processing device 100. The document editing application 202 includes a document selection receiving unit 203, a document display and editing unit 204, a paper size change receiving unit 205, and a paper size change processing unit 206.
[0017] The document selection receiving unit 203 receives the selection of a document to be edited. The document display and editing unit 204 displays or edits the document selected in the document selection receiving unit 203. The paper size change receiving unit 205 receives a change in the paper size of the document being edited in the document display and editing unit 204. The paper size change processing unit 206 changes the paper size of the document in accordance with the paper size changed in the paper size change receiving unit 205.
[0018] 3 is a diagram showing the position of a text box 302 arranged in a document displayed on the display device 103 by the document display / edit unit 204 of the document editing application 202. In the figure, the rightward direction from an origin 301 in the upper left corner is defined as the X direction, and the downward direction from the origin 301 is defined as the Y direction. In this embodiment, the upper-left coordinate 303 of the text box 302 is expressed as (ax, ay), the lower-left coordinate 304 as (bx, by), the upper-right coordinate 305 as (cx, cy), and the lower-right coordinate 306 as (dx, dy). Furthermore, the upper-left coordinate 309 of a circumscribing rectangle 308 within which text 307 to be displayed in the text box 302 is drawn is expressed as (ex, ey), the lower-left coordinate 310 as (fx, by), the upper-right coordinate 311 as (gx, gy), and the lower-right coordinate 312 as (hx, hy).
[0019] FIG. 4 is a diagram showing attribute information 401 of a text box, such as text box 302. The text box attribute information 401 shown in FIG. 4 is stored in the storage device 104. In this embodiment, the central processing unit 102 sets the attribute information of a text box edited by the document display / editing unit 204 to the text box attribute information 401 shown in FIG. 4 and stores it in the storage device 104. The attribute information 401 includes information such as an "object ID" 402, an "upper left coordinate" 403, a "lower left coordinate" 404, an "upper right coordinate" 405, a "lower right coordinate" 406, an "object type" 407, and "text" 408. The attribute information 401 further includes information such as a "character direction" 409, "text justification" 410, an "upper left coordinate of text" 411, a "lower left coordinate of text" 412, an "upper right coordinate of text" 413, and a "lower right coordinate of text" 414. The upper left coordinate 403 to the lower right coordinate 406 indicate the coordinates of four points of the text box. The upper left coordinate 403 to the lower right coordinate 406 and the upper left text coordinate 411 to the lower right text coordinate 414 are also called coordinate information. Each piece of information contained in the attribute information 401 will be described below using the example of FIG.
[0020] "Object ID" 402 stores a number unique to the object. "Top left coordinate" 403 stores the coordinates (ax, ay) of the top left coordinate 303 of a text box as shown in FIG. 3. "Bottom left coordinate" 404 stores the coordinates (bx, by) of the bottom left coordinate 304. "Top right coordinate" 405 stores the coordinates (cx, cy) of the top right coordinate 305. "Bottom right coordinate" 406 stores the coordinates (dx, dy) of the bottom right coordinate 306. "Object type" 407 stores "text box," which is one of the object types. In addition to "text box," other object types include "clip art," "figure," and "photo." "Text" 408 stores the text 307 to be drawn in the text box 302.
[0021] In "Character direction" 409, either "horizontal" or "vertical" is set as the value of the character direction of text 307 drawn in text box 302. In "Text justification" 410, if character direction 409 is "horizontal", either "left justified", "centered", or "right justified" is set as the value of the character justification, which is the drawing position of text 307 in text box 302. If character direction 409 is "vertical", either "top justified", "centered", or "bottom justified" is set as the value of the character justification, which is the drawing position of text 307 in text box 302. Since text 307 drawn in text box 302 in FIG. 3 is "horizontal" and drawn in the center of text box 302, central processing unit 102 stores "horizontal" in character direction 409 and "centered" in character justification 410. The "text upper left coordinate" 411 stores the coordinates (ex, ey) of the upper left coordinate 309 of the circumscribing rectangle 308 in the range where the text 408 is drawn. The "text lower left coordinate" 412 stores the coordinates (fx, fy) of the lower left coordinate 310 of the circumscribing rectangle 308 in the range where the text 408 is drawn.
[0022] The "text upper right coordinate" 413 stores the coordinates (gx, gy) of the upper right coordinate 311 of the circumscribing rectangle 308 in the range where the text 408 is drawn. The "text lower right coordinate" 414 stores the coordinates (hx, hy) of the lower right coordinate 312 of the circumscribing rectangle 308 in the range where the text 408 is drawn.
[0023] FIG. 5 is a diagram showing paper size change in the document editing application 202. When a paper size change request is received from the input device 101 in response to a user instruction (operation), the paper size change receiving unit 205 of the document editing application 202 displays a paper size change screen 501 on the display device 103. The paper size change screen 501 displays a list 502 of paper sizes that can be changed to. The paper size change screen 501 also displays a selection position 503 selected at the position of the paper size currently displayed. The user can select the paper size to which they want to change by operating the selection position 503 with the input device 101. As an example, if the document template is created for A2 size, the selection position 503 is set to A2 by default. In other words, the A2 position is selected. The user can change the paper size from here by operating the selection position 503 to the size they want to change to.
[0024] An example of a case where the paper size needs to be changed is when the paper on which the document is to be printed by the printing device 105 is different from the paper size of the document template. In addition to displaying the paper size in a list on the paper size change screen 501, the user may be allowed to select whether to use the paper in portrait or landscape orientation, or may be allowed to set an arbitrary size numerically.
[0025] Figure 6 is a diagram showing the position of one text box in the document editing application 202 before and after changing the paper size. In Figure 6, there is one text box in the layout, but multiple text boxes may be placed in the layout. The rearrangement of text boxes will be described later with reference to Figure 8. Also, although it is assumed that the aspect ratio of the paper size in Figure 6 changes before and after changing the paper size, the aspect ratio of the paper size does not have to change.
[0026] FIG. 6A illustrates changing the position of a text box 602 before and after changing the paper size when the text justification 410 of the text box 602 is "left justified." A text box 602 with the text justification 410 set to "left justified" is placed on a document 601 before the paper size is changed. The text box 602 is placed so that a reference point 603, which is the center of the left edge of the text box 602, is 5% from the left edge of the paper when the width of the paper is 100%, and 30% from the top edge of the paper when the length of the paper is 100%. After the paper size is changed, the position of the text box 605 is changed to a reference point 606 on a document 604 where the ratio of the position of the reference point 603 from the left edge to the top edge of the paper is the same before and after the paper size change. When the position of the text box 605 is changed, the central processing unit 102 updates the values of the eight pieces of coordinate information of the text box 605, namely, the upper left coordinate 403 to the lower right coordinate 406, and the upper left text coordinate 411 to the lower right text coordinate 414, to the values at the time of the position change.
[0027] FIG. 6(b) shows how the position of a text box 612 is changed before and after changing the paper size when the text justification 410 of the text box 612 is "centered." A text box 612 with the text justification 410 set to "centered" is placed on a document 611 before the paper size change. The text box 612 is placed so that a reference point 613, which is the center position of the text box 612, is 40% from the left edge of the paper when the width of the paper is 100%, and 30% from the top edge of the paper when the length of the paper is 100%. After the paper size change, the position of the text box 615 is changed to a reference point 616 on a document 614 where the ratio of the position of the reference point 613 from the left edge to the top edge of the paper is the same before and after the paper size change. When the position of the text box 615 is changed, the central processing unit 102 updates the values of the eight pieces of coordinate information of the text box 615, namely, the upper left coordinate 403 to the lower right coordinate 406, and the upper left text coordinate 411 to the lower right text coordinate 414, to the values at the time of the position change.
[0028] FIG. 6(c) shows how the position of text box 622 is changed before and after changing the paper size when the character justification 410 of text box 622 is "right justified." A text box 622 with character justification 410 set to "right justified" is placed on document 611 before the paper size change. Text box 622 is placed so that reference point 623, which is the center of the right edge of text box 622, is 90% from the left edge of the paper when the width of the paper is 100%, and 30% from the top edge of the paper when the length of the paper is 100%. After the paper size change, the position of text box 625 is changed to reference point 626 on document 624, where the ratio of the position of reference point 623 from the left edge to the top edge of the paper is the same before and after the paper size change. When the position of the text box 625 is changed, the central processing unit 102 updates the values of the eight pieces of coordinate information of the text box 625, namely, the upper left coordinate 403 to the lower right coordinate 406, and the upper left text coordinate 411 to the lower right text coordinate 414, to the values at the time of the position change.
[0029] Note that Figure 6 shows an example where the text in the text box is written horizontally. If the text is written vertically, for example, if the text justification is "top justified," the reference point should be placed at the center of the top edge of the text box. Also, if the text justification is "center justified," the reference point should be placed at the center of the top and bottom edges of the text box, and if the text justification is "bottom justified," the reference point should be placed at the center of the bottom edge of the text box.
[0030] Figure 7 shows how multiple text boxes are rearranged when the aspect ratio of the paper changes as the paper size is changed. This method is also applicable when the aspect ratio does not change when the paper size is changed.
[0031] In FIG. 7(a), text boxes 702 to 704 are arranged on a document 701. Text box 702 is arranged so that its right edge is 50% from the left edge of the paper when the width of the paper on which document 701 is printed is 100%. Text box 703 is arranged so that its left edge is 25% from the left edge of the paper when the width of the paper on which document 701 is printed is 100%. Text box 704 is arranged so that its center is 37.5% from the left edge of the paper when the width of the paper on which document 701 is printed is 100%. Text 705 in text box 702 has its character justification 410 drawn with the text justification 410 aligned to the right. Text 706 in text box 703 has its character justification 410 drawn with the text justification 410 aligned to the left. Text 707 in text box 704 has its character justification 410 drawn with the text justification 410 aligned to the center. Furthermore, the left edges of the texts 705 to 707 are aligned.
[0032] FIG. 7(b) shows the document 701 of FIG. 7(a) after the paper size has been changed. In this figure, the positions of text boxes 702-704 have been changed using the method shown in FIG. 6. Text box 712 shows the position of text box 702 after it has been changed. The document in FIG. 7(b) has been changed from document 701 to document 731. Text box 713 shows the position of text box 703 after it has been changed. Text box 714 shows the position of text box 704 after it has been changed. In FIG. 7(a), before the paper size was changed, the alignment settings for text 705-707 in multiple text boxes 702-704 were different from each other, but the text drawing positions were aligned at the left edge. However, in FIG. 7(b), which shows the document after the paper size was changed, the layout of the three text boxes individually was changed according to the method shown in FIG. 6, but the text drawing positions were not aligned at the left edge, resulting in a disrupted document layout.
[0033] FIG. 7(c) shows the document 701 of FIG. 7(a) after the paper size has been changed. In this figure, the position of text box 702 has been changed using the method shown in FIG. 6, and the positions of text boxes 703 and 704 have been changed so that the ratio of the change in position and the distance between text box 702 is the same. In other words, when the paper size is changed, the layout is such that the ratio of the distance between grouped text boxes remains the same before and after the paper size change. Text box 722 shows the position of text box 702 after the change. The document in FIG. 7(c) has been changed from document 701 to document 731. Text box 723 shows the position of text box 703 after the change. Text box 724 shows the position of text box 704 after the change. In FIG. 7(c), the left edges of text boxes 705 to 707 are aligned, just like the drawing positions of text boxes 705 to 707 in FIG. 7(a). In this way, it is desirable that the text drawing positions be aligned at the left edge even after the paper size change, just as they were before the paper size change.
[0034] As mentioned above, when changing the size of the document shown in Figure 7(a), it is desirable to make the change so that the positions of multiple texts are aligned as shown in Figure 7(c) when comparing Figure 7(b) and Figure 7(c). The following explanation will explain the technology for changing the text boxes as shown in Figure 7(c) when changing the paper size.
[0035] 8 is a flowchart showing the processing in this embodiment in which the document editing application 202 executed by the central processing unit 102 changes the paper size of a document and modifies the layout. The document editing application 202 is executed by the central processing unit 102. That is, this processing is executed by the central processing unit 102 by loading the program of the document editing application 202 stored in the storage device 104 or the like into the RAM 106. This processing is started when the document editing application 202 is started. In the following explanation, the symbol "S" means step.
[0036] In S801, the central processing unit 102 accepts the selection of document data using the input device 101. Various documents according to the purpose are pre-stored as templates in the storage device 104, and the central processing unit 102 accepts the selection from the user by displaying a list of document templates on the display device 103. The user selects the document they wish to use from the list of document templates displayed on the display device 103 by operating the input device 101. Note that the document data may be selected from templates prepared, or a document created by the user in the past. Note that the document data is not limited to template documents, and may also include documents entered by the user into a text box by operating the keyboard.
[0037] In S802, the central processing unit 102 uses the document display / edit unit 204 to open the document stored in the storage device 104 in accordance with the user's selection in S801 and display it on the display device 103. The displayed document becomes available for editing via the input device 101.
[0038] In S803, the central processing unit 102 accepts a request to change the paper size of the document displayed in S802 using the paper size change acceptance unit 205. To change the paper size, the display device 103 displays the paper size change screen 501 shown in FIG. 5, and the user is prompted to select a paper size using the input device 101.
[0039] In S804, the central processing unit 102 uses the paper size change processing unit 206 to change the paper size of the document displayed in S802 to match the paper size changed in S803.
[0040] In S805, the central processing unit 102 uses the paper size change processing unit 206 to acquire the positions (coordinate information) of all text boxes from the upper left coordinate 403 to the lower right coordinate 406 of the attribute information 401 of each text box.
[0041] In S806, the central processing unit 102 uses the paper size change processing unit 206 to obtain the text positions of all text boxes from the upper left text coordinate 411 to the lower right text coordinate 414 in the attribute information 401 of each text box. The acquisition of the text position in each text box for horizontal and vertical writing will be described with reference to Figs. 9 and 10.
[0042] FIG. 9 is a diagram showing an example of how a text box is displayed in horizontal writing.
[0043] 9(a) is a diagram showing circumscribing rectangles 915-917 for each of the texts drawn by the central processing unit 102 in text boxes 912-914 arranged on a document 911 using the paper size change processing unit 206. In text box 912, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left justified. In text box 913, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left justified. In text box 914, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left justified. The central processing unit 102 acquires the positions of the upper left text coordinate 411, lower left text coordinate 412, upper right text coordinate 413, and lower right text coordinate 414 of the text displayed in text box 912. The positions of the acquired coordinates are used as the vertices of the circumscribing rectangle to form circumscribing rectangle 915. Similarly, the central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 for the text boxes 913 and 914. Each piece of coordinate information can be expressed by a circumscribing rectangle 916 and 917.
[0044] 9(b) is a diagram showing circumscribing rectangles 925-927 for each of the texts that the paper size change processor 206 draws in text boxes 922-924 arranged on the document 921. In text box 922, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is centered. In text box 923, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left-justified. In text box 924, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left-justified. The central processing unit 102 acquires the positions of the upper left text coordinate 411, lower left text coordinate 412, upper right text coordinate 413, and lower right text coordinate 414 of the text displayed in text box 922. The positions of the acquired coordinates are used as the vertices of the circumscribing rectangle to form circumscribing rectangle 925. Similarly, the central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 for the text boxes 923 and 924. Each piece of coordinate information can be expressed by a circumscribing rectangle 926 and 927.
[0045] 9(c) is a diagram showing circumscribing rectangles 935-937 for each of the texts drawn by the paper size change processing unit 206 in text boxes 932-934 arranged on a document 931. In text box 932, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is right-justified. In text box 933, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left-justified. In text box 934, the character direction 409 of the text to be displayed is horizontal, and the character justification 410 is left-justified. The central processing unit 102 acquires the positions of the upper left text coordinate 411, lower left text coordinate 412, upper right text coordinate 413, and lower right text coordinate 414 of the text displayed in text box 932. The acquired coordinate positions are used as the vertices of the circumscribing rectangle to form circumscribing rectangle 935. Similarly, the central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 for the text boxes 933 and 934. Each piece of coordinate information can be expressed by a circumscribing rectangle 936 and 937.
[0046] FIG. 10 shows an example of how a text box is displayed in vertical writing.
[0047] 10(a) shows circumscribing rectangles 1045-1047 for each of the texts drawn by the paper size change processor 206 in text boxes 1042-1044 arranged on a document 1041. In text box 1042, the character direction 409 of the displayed text is vertical, and the character justification 410 is top-justified. In text box 1043, the character direction 409 of the displayed text is vertical, and the character justification 410 is top-justified. In text box 1044, the character direction 409 of the displayed text is vertical, and the character justification 410 is top-justified. The central processing unit 102 acquires the positions of the upper left text coordinate 411, lower left text coordinate 412, upper right text coordinate 413, and lower right text coordinate 414 of the text displayed in text box 1042. The positions of the acquired coordinates are used as the vertices of the circumscribing rectangle to form circumscribing rectangle 1045. Similarly, the central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 for the text boxes 1043 and 1044. Each piece of coordinate information can be expressed by a circumscribing rectangle 1046 and 1047.
[0048] FIG. 10(b) shows circumscribing rectangles 1055-1057 for each of the texts that the paper size change processor 206 draws in text boxes 1052-1054 arranged on the document 1051. In text box 1052, the character direction 409 of the text to be displayed is vertical, and the character justification 410 is centered. In text box 1053, the character direction 409 of the text to be displayed is vertical, and the character justification 410 is top-justified. In text box 1054, the character direction 409 of the text to be displayed is vertical, and the character justification 410 is top-justified. The central processing unit 102 acquires the positions of the upper left text coordinate 411, lower left text coordinate 412, upper right text coordinate 413, and lower right text coordinate 414 of the text displayed in text box 1052. The acquired coordinate positions are used as the vertices of the circumscribing rectangle to form circumscribing rectangle 1055. Similarly, the central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 for the text boxes 1053 and 1054. Each piece of coordinate information can be expressed by a circumscribing rectangle 1056 and 1057.
[0049] 10(c) shows circumscribing rectangles 1065-1067 for the text drawn by the paper size change processor 206 in text boxes 1062-1064 arranged on the document 1061. In the text box 1062, the character direction 409 of the text to be displayed is vertical, and the character justification 410 is bottom-justified. In the text box 1063, the character direction 409 of the text to be displayed is vertical, and the character justification 410 is top-justified. In the text box 1064, the character direction 409 of the text to be displayed is vertical, and the character justification 410 is top-justified. The central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 of the text displayed in the text box 1062. The positions of the acquired coordinates are used as the vertices of the circumscribing rectangle to form the circumscribing rectangle 1065. Similarly, the central processing unit 102 acquires the positions of the upper left text coordinate 411, the lower left text coordinate 412, the upper right text coordinate 413, and the lower right text coordinate 414 for the text boxes 1063 and 1064. Each piece of coordinate information can be expressed by a circumscribing rectangle 1066 and 1067.
[0050] In S807, the central processing unit 102 groups the text boxes using the paper size change processing unit 206. Grouping of text boxes will be described below.
[0051] FIG. 9(d) is a diagram showing a circumscribing rectangle 918, which is formed from the circumscribing rectangles 915 to 917 shown in FIG. 9(a) and has the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate as its vertices.
[0052] FIG. 9(e) is a diagram showing a circumscribing rectangle 928, which is formed from the circumscribing rectangles 925 to 927 shown in FIG. 9(b) and has the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate as its vertices.
[0053] FIG. 9(f) is a diagram showing a circumscribing rectangle 938, which is formed from the circumscribing rectangles 935 to 937 shown in FIG. 9(c) and has the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate as its vertices.
[0054] FIG. 10(d) is a diagram showing a circumscribing rectangle 1048, which is formed from the circumscribing rectangles 1045 to 1047 shown in FIG. 10(a) and has the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate as its vertices.
[0055] FIG. 10(e) is a diagram showing a circumscribing rectangle 1058, which is formed from the circumscribing rectangles 1055 to 1057 shown in FIG. 10(b) and has the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate as its vertices.
[0056] FIG. 10(f) is a diagram showing a circumscribing rectangle 1068, which is formed from the circumscribing rectangles 1065 to 1067 shown in FIG. 10(c) and has the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate as its vertices.
[0057] As an example of grouping from the above description example, let us consider a case where the coordinates of the upper left coordinate 403 to the lower right coordinate 406 are used from the text box attribute information 401 stored in the storage device 104 for text boxes 912 to 914 shown in FIGS. 9(a) and 9(d). First, the coordinates of the vertices of the text boxes are extracted. The extracted value is the value of the upper left coordinate 403 in the text box attribute information 401 shown in FIG. 4. The X coordinate value is extracted from the upper left coordinate 403 of text box 912 and similarly compared with the X coordinate value of the upper left coordinate 403 in the text box attribute information 401 of another text box 913. If the comparison shows that the respective X coordinate values match, then text box 912 and text box 913 are grouped together. Similarly, the X coordinate value of the upper left coordinate 403 in the text box attribute information 401 of another text box 914 is compared, and if they match, then they are grouped together.
[0058] As an example of grouping, besides using the X coordinate of the text box coordinates 403 to 406, overlapping text boxes may be determined to be grouped. Alternatively, adjacently arranged text boxes (arranged within a predetermined range) may be determined to be grouped. Alternatively, nearby text boxes may be determined to be grouped. Alternatively, text boxes may be determined to be grouped if the positions of the beginnings of other drawn text sentences (X coordinate of the left edge if the text sentences are written horizontally, or Y coordinate of the top edge if the text sentences are written vertically) match. Alternatively, text boxes may be determined to be grouped if the meanings of the texts match (are similar). When determining that the meanings of the texts match (are similar), for example, if the documents (or words contained in the documents) written in two text boxes are synonyms or similar words, the meanings of the texts may be determined to match. Alternatively, text boxes may be determined to be grouped based on attribute values set in the text boxes. Alternatively, text boxes may be determined to be grouped if the font types of the texts match. Alternatively, text boxes may be determined to be grouped based on additional information such as character size. Text boxes outside the text group may also be included in the area that has become a text group. The above grouping examples may be based on a single condition, or on satisfying multiple conditions, or on satisfying any of multiple conditions. The group created in S807 includes at least one text box.
[0059] In S808, the central processing unit 102 causes the paper size change processing unit 206 to acquire the coordinates of the position where the text in each of the text boxes grouped in S807 is drawn.
[0060] In S809, the central processing unit 102 causes the paper size change processing unit 206 to obtain the coordinates of the circumscribing rectangle of the grouped text based on the circumscribing rectangles of each of the multiple drawn texts obtained in S808, as shown in Figures 9(g) to (i) or 10(g) to (i).
[0061] That is, taking FIG. 9(d) as an example, the central processing unit 102 extracts the coordinates of the circumscribing rectangle 918 of the grouped text group shown in FIG. 9(d) from the circumscribing rectangles 915-917 of each text shown in FIG. 9(a). The central processing unit 102 also obtains the coordinates of the circumscribing rectangle of the grouped text boxes in other cases as follows. That is, the central processing unit 102 extracts the coordinates of the circumscribing rectangle 928 of the grouped text group shown in FIG. 9(e) from the circumscribing rectangles 925-927 shown in FIG. 9(b). The central processing unit 102 also extracts the coordinates of the circumscribing rectangle 938 of the grouped text group shown in FIG. 9(f) from the circumscribing rectangles 935-937 shown in FIG. 9(c). The central processing unit 102 also extracts the coordinates of the circumscribing rectangle 1048 of the grouped text group shown in FIG. 10(d) from the circumscribing rectangles 1045-1047 shown in FIG. 10(a). Furthermore, the central processing unit 102 extracts the coordinates of a circumscribing rectangle 1058 of the grouped text group shown in Fig. 10(e) from the circumscribing rectangles 1055 to 1057 shown in Fig. 10(b). Furthermore, the central processing unit 102 extracts the coordinates of a circumscribing rectangle 1068 of the grouped text group shown in Fig. 10(f) from the circumscribing rectangles 1065 to 1067 shown in Fig. 10(c).
[0062] In the following process, a reference point is set for the text box group in order to change the position of the grouped text group. In this embodiment, the coordinates of one of the circumscribing rectangles are set as the reference point based on the justification 410 of the text in the text box located at the top (right side in the case of vertical writing) of the grouped text box group. Details will be explained below.
[0063] In S810, the central processing unit determines the character direction 409 (horizontal writing, vertical writing) of the text in the multiple text boxes grouped by the paper size change processing unit 206. If it is determined that the text is written horizontally, the central processing unit 102 proceeds to S811. If it is determined that the text is written vertically, the central processing unit 102 proceeds to S815.
[0064] In S811, the central processing unit determines the text justification 410 (left justification, center justification, or right justification) of the text box located at the top, which is the first of the multiple text boxes grouped by the paper size change processing unit 206. Since this processing is for horizontally written text boxes, "first" refers to the text box located at the top of the grouped text boxes. If left justification is determined, the central processing unit 102 proceeds to S812. If center justification is determined, the central processing unit 102 proceeds to S813. If right justification is determined, the central processing unit 102 proceeds to S814.
[0065] In S815, similar to S811, the central processing unit 102 determines the text justification 410 of the text box located at the very beginning of the multiple text boxes grouped by the paper size change processing unit 206. Since this processing is for vertically written text boxes, "the very beginning" refers to the text box located at the rightmost position of the grouped text boxes. If it determines that left justification is required, the central processing unit 102 proceeds to S816. If it determines that center justification is required, the central processing unit 102 proceeds to S817. If it determines that right justification is required, the central processing unit 102 proceeds to S818.
[0066] In steps S812 to S818, the central processing unit 102 performs processing to set the reference point. In the following explanation, step S812 corresponds to the explanation in Figure 9(g). Similarly, steps S813, S814, S816, S817, and S818 correspond to the explanation in Figures 9(h), 9(i), 10(g), 10(h), and 10(i), respectively.
[0067] In S812, the central processing unit 102 extracts the coordinates corresponding to the left end shown in Figure 9 (g) from the top left coordinate, bottom left coordinate, top right coordinate, and bottom right coordinate of the circumscribing rectangle 918 acquired by the paper size change processing unit 206 in S809, and sets this as the coordinates 919 of the reference point.
[0068] In S813, the central processing unit extracts the coordinates corresponding to the center shown in Figure 9 (h) from the top left, bottom left, top right, and bottom right coordinates acquired by the paper size change processing unit 206 in S809, and sets these as the coordinates of the reference point 929.
[0069] In S814, the central processing unit 102 extracts the coordinates corresponding to the right end shown in Figure 9(i) from the top left, bottom left, top right, and bottom right coordinates acquired by the paper size change processing unit 206 in S809, and sets these as the coordinates of the reference point 939.
[0070] In S816, the central processing unit 102 extracts the coordinates corresponding to the top center shown in Figure 10 (g) from the top left, bottom left, top right, and bottom right coordinates acquired by the paper size change processing unit 206 in S809, and sets them as the coordinates of the reference point 1049.
[0071] In S817, the central processing unit 102 extracts the coordinates corresponding to the center shown in Figure 10 (h) from the top left, bottom left, top right, and bottom right coordinates acquired by the paper size change processing unit 206 in S809, and sets these as the coordinates of the reference point 1059.
[0072] In S818, the central processing unit 102 extracts the coordinates corresponding to the bottom center shown in Figure 9(i) from the top left, bottom left, top right, and bottom right coordinates acquired by the paper size change processing unit 206 in S809, and sets these as the coordinates of the reference point 1069.
[0073] In addition to the above, the reference point may be set using the value with the most common value for the text alignment information of the text boxes in the text group. Alternatively, the value of the text alignment information of the text box using the largest font in the text group may be used. Alternatively, the value of the text alignment information of the text box with the widest text width in the text group may be used. Alternatively, the position with the most common match among the start positions of the text sentences in the text group may be used. Alternatively, the position with the most common match among the end positions of the text sentences in the text group may be used.
[0074] Note that the reference point may be set based on multiple conditions, rather than a single determination condition. For example, a case will be described in which the value of the text alignment information of the text box using the largest font in the text group is used. If there are multiple text boxes using the largest font in the text group, the reference point position is set using the value with the most common value of the text alignment information of the text boxes in the text group, which is an additional condition. Any one of these multiple conditions may be prioritized, or all of the multiple conditions may be satisfied.
[0075] In S819, the central processing unit 102 changes the positions of all text boxes using the reference points set by the paper size change processing unit 206 in S812 to S814 or S816 to S818. When changing the positions of the text boxes, it is desirable to position the text groups so that the positions of the reference points before and after the paper size change are the same ratio from the origin of the paper, as shown in Figure 6. Then, the central processing unit 102 ends the processing of this flowchart.
[0076] As described above, according to this embodiment, it is possible to reduce the effort required for correction when changing the paper size. Specifically, by grouping multiple text boxes based on a predetermined criterion and setting a reference point for the grouped text boxes, it is possible to rearrange the text boxes to suitable positions when changing the layout due to a change in paper size.
[0077] <Embodiment 2> In addition to the first embodiment, the user may specify multiple arbitrary text boxes to set the grouping. That is, the process of S807 in the first embodiment may be performed according to the user's selection. This will be described in detail below.
[0078] FIG. 11 is a diagram showing an example of a case where a user sets grouping in this embodiment.
[0079] FIG. 11(a) shows a document 1101 displayed on the display device 103, on which text boxes 1102 to 1104 are arranged.
[0080] Fig. 11(b) is a diagram showing a case where the user selects text boxes 1102 to 1104 with the input device 101. When the user selects a text box, the selected text boxes 1102 to 1104 are highlighted like text boxes 1112 to 1114, and a screen 1131 for setting up grouping as shown in Fig. 11(d) is displayed on the display device 103.
[0081] There are several ways for the user to select text boxes. For example, multiple text boxes can be selected by dragging the mouse. By right-clicking the mouse while selecting text boxes by dragging, a screen 1131 shown in Figure 10(d) can be displayed.
[0082] Alternatively, the user can select a text box using a keyboard and mouse. For example, the user can select a text box by clicking the target object with the mouse while pressing the CTRL key on the keyboard, and then right-click to display screen 1131 shown in FIG. 10(d). The above-described method of selecting a text box is merely an example, and text boxes may be selected by other methods. Screen 1131 for setting grouping displays a grouping setting 1132 and options "Yes" 1133 to "No" 1134. The grouping status of the selected text boxes 1112 to 1114 is displayed; if they are grouped, "Yes" 1133 is selected; if they are not grouped, "No" 1133 is selected. The user sets grouping by selecting an option in FIG. 11(d) using input device 101.
[0083] FIG. 11(c) is a diagram displayed on the display device 103 when the option "Yes" 1133 in FIG. 11(d) is selected from the state of FIG. 11(b). That is, the text boxes 1102 to 1104 are grouped. A circumscribing rectangle 1121 visually indicates that the user has set grouping on the screen 1131 shown in FIG. 11(d). The circumscribing rectangle 1121 has vertices that are the top-left coordinate among the top-left coordinates 403 of the text boxes 1102 to 1104, the bottom-left coordinate among the bottom-left coordinates 404, the top-right coordinate among the top-right coordinates 405, and the bottom-right coordinate among the bottom-right coordinates 406. By applying this embodiment, it is possible to exclude text boxes that the user does not want to group.
[0084] <Embodiment 3> The processing in S807 in the first embodiment may be performed as follows.
[0085] 12 is a diagram illustrating grouping of text boxes in this embodiment. The determination condition for grouping is not limited to one, and multiple conditions may be used. FIG. 12 shows an example of a case where any one of multiple determination conditions is satisfied.
[0086] First, applying the process of FIG. 8, text boxes 1203 to 1205 are registered as a text group based on the condition that the X coordinates of the upper left coordinate 403 and the lower left coordinate 404 of the text boxes match. Next, consider this text group and ungrouped text box 1202. The X coordinates of the upper left and lower left of the text 1213 and the text 1212 of text box 1203 match. This allows text boxes 1202 to 1205 to be grouped into a single text group. That is, by comparing one of the grouped text boxes with ungrouped text box A based on the conditions described in the above embodiment, text box A can be added and grouped.
[0087] By automatically adjusting the document layout to fit the changed paper size in this way, users can avoid having to manually adjust each text box.
[0088] <Other embodiments> In the above embodiment, the object is described as a text box, but this is not limiting, and the object may be, for example, a graphic or an image. When the object is a graphic, for example, graphics arranged within a predetermined range may be grouped into an object group, and a reference point may be set within the object group based on a circumscribing rectangle derived from the vertices or contact points of each graphic.
[0089] The present disclosure can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0090] The present disclosure also includes the following configurations. (Configuration 1) an acquisition means for acquiring attribute information of an object included in the document data based on an instruction to change the paper size of the document data; a grouping means for grouping objects in the document data into object groups based on the acquired attribute information; a setting means for setting a reference point for the grouped object group; a placement unit that places the object group at a position based on the set reference point and the changed paper size that has been specified; An information processing device comprising: (Configuration 2) 2. The information processing apparatus according to configuration 1, wherein the arrangement means arranges the object group without changing the ratio of the distance between the text boxes included in the object group. (Configuration 3) The information processing device according to configuration 1, characterized in that the placement means places the object group at a position where the position of the reference point before the paper size change and the position of the reference point after the paper size change are at the same ratio from the origin of the paper. (Configuration 4) 5. The information processing device according to any one of configurations 1 to 4, wherein the object includes a text box, a graphic, or an image. (Configuration 5) The information processing device according to configuration 4, wherein the attribute information includes information indicating the type of the object, coordinate information of the text box, coordinate information of the text, information indicating character direction, information indicating character justification, information indicating font, attribute value, additional information, or information indicating the meaning of the text. (Configuration 6) 6. The information processing apparatus according to configuration 5, wherein the grouping means groups the text boxes or text boxes having the same X coordinate of the left edge of the text. (Configuration 7) 6. The information processing apparatus according to configuration 5, wherein the grouping means groups the text boxes or text boxes having the same Y coordinate of the top end of the text. (Configuration 8) 6. The information processing device according to configuration 5, wherein the grouping means groups text boxes arranged within a predetermined range. (Configuration 9) 6. The information processing device according to configuration 5, wherein the grouping means groups text boxes that are arranged overlapping each other. (Configuration 10) 6. The information processing device according to configuration 5, wherein the grouping means groups text boxes having the same meaning of the text together. (Configuration 11) 6. The information processing apparatus according to configuration 5, wherein the grouping means groups together text boxes having the same font for the text. (Configuration 12) 6. The information processing apparatus according to configuration 5, wherein the grouping means groups the text boxes based on the attribute values or the additional information. (Configuration 13) 6. The information processing device according to configuration 5, wherein the grouping means groups text boxes selected by a user operation. (Configuration 14) The information processing device according to configuration 1, wherein the grouping means further groups the text boxes not included in the object group into the object group based on a result of comparing any of the text boxes included in the object group with text boxes not included in the object group based on the attribute information. (Configuration 15) The information processing device described in configuration 5 is characterized in that, when information indicating the character direction of the text boxes included in the object group is horizontal, the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the character alignment of the uppermost text box within the object group. (Configuration 16) The information processing device described in configuration 5 is characterized in that, when information indicating the character direction of the text boxes included in the object group is vertical writing, the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the character alignment of the rightmost text box within the object group. (Configuration 17) The information processing device according to configuration 5, wherein the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the most frequently set character justification within the object group. (Configuration 18) The information processing device described in configuration 5, wherein the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the character justification of the text box that uses the largest font within the object group. (Configuration 19) The information processing device described in configuration 5, wherein the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the alignment of the text box with the widest text width within the object group. (Configuration 20) 6. The information processing apparatus according to configuration 5, wherein the setting means sets a reference point in the bounding rectangle of the object group based on the position that most frequently matches the start position of text within the object group. (Configuration 21) The information processing device according to configuration 5, wherein the setting means sets a reference point in the bounding rectangle of the object group based on the position that most frequently matches the end position of the text within the object group. (Configuration 22) an acquiring step of acquiring attribute information of an object included in the document data based on an instruction to change the paper size of the document data; a grouping step of grouping objects in the document data into object groups based on the acquired attribute information; a setting step of setting a reference point for the grouped object group; a placement step of placing the object group at a position based on the set reference point and the changed paper size instructed by the user; 10. A method for controlling an information processing device, comprising: (Configuration 23) An application program for editing document data, comprising: acquiring means for acquiring attribute information of an object included in the document data based on an instruction to change the paper size of the document data; a grouping means for grouping objects in the document data into object groups based on the acquired attribute information; a setting means for setting a reference point for the grouped object group; a placement unit that places the object group at a position based on the set reference point and the changed paper size that has been specified; A program characterized by functioning as
Claims
1. an acquisition means for acquiring attribute information of an object included in the document data based on an instruction to change the paper size of the document data; a grouping means for grouping objects in the document data into object groups based on the acquired attribute information; a setting means for setting a reference point for the grouped object group; a placement unit that places the object group at a position based on the set reference point and the changed paper size that has been specified; An information processing device comprising:
2. 2. The information processing apparatus according to claim 1, wherein the arranging means arranges the object group without changing the ratio of the distance between the text boxes included in the object group.
3. 2. The information processing apparatus according to claim 1, wherein the placement means places the object group at a position where the position of the reference point before the change in paper size and the position of the reference point after the change in paper size have the same ratio from the origin of the paper.
4. 2. The information processing apparatus according to claim 1, wherein the object includes a text box, a graphic, or an image.
5. 5. The information processing device according to claim 4, wherein the attribute information includes information indicating the type of the object, coordinate information of the text box, coordinate information of the text, information indicating character direction, information indicating character justification, information indicating a font, attribute values, additional information, or information indicating the meaning of the text.
6. 6. The information processing apparatus according to claim 5, wherein the grouping means groups together text boxes having the same X coordinate of the left edge of the text box or the left edge of the text.
7. 6. The information processing apparatus according to claim 5, wherein the grouping means groups the text boxes or text boxes having the same Y coordinate of the top end of the text.
8. 6. The information processing apparatus according to claim 5, wherein said grouping means groups text boxes arranged within a predetermined range.
9. 6. The information processing apparatus according to claim 5, wherein said grouping means groups text boxes that are arranged overlapping each other.
10. 6. The information processing apparatus according to claim 5, wherein said grouping means groups together text boxes whose text has the same meaning.
11. 6. The information processing apparatus according to claim 5, wherein the grouping means groups together text boxes having the same font for the text.
12. 6. The information processing apparatus according to claim 5, wherein said grouping means groups the text boxes based on the attribute values or the additional information.
13. 6. The information processing apparatus according to claim 5, wherein the grouping means groups text boxes selected by a user operation.
14. 2. The information processing device according to claim 1, wherein the grouping means further groups the text boxes not included in the object group into the object group based on a result of comparing any of the text boxes included in the object group with text boxes not included in the object group based on the attribute information.
15. The information processing device described in claim 5, characterized in that when information indicating the character direction of the text boxes included in the object group is horizontal, the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the character alignment of the uppermost text box within the object group.
16. The information processing device described in claim 5, characterized in that when information indicating the character direction of the text boxes included in the object group is vertical writing, the setting means sets a reference point in the circumscribing rectangle of the object group based on information indicating the character alignment of the rightmost text box within the object group.
17. 6. The information processing apparatus according to claim 5, wherein the setting means sets a reference point in a circumscribing rectangle of the object group based on information indicating the most frequently set character alignment within the object group.
18. 6. The information processing apparatus according to claim 5, wherein the setting means sets a reference point in the bounding rectangle of the object group based on information indicating the alignment of characters in the text box that uses the largest font in the object group.
19. 6. The information processing apparatus according to claim 5, wherein the setting means sets a reference point in a circumscribing rectangle of the object group based on information indicating the alignment of the text box having the widest text width within the object group.
20. 6. The information processing apparatus according to claim 5, wherein said setting means sets a reference point in the circumscribing rectangle of said object group based on the position in said object group that most frequently matches the start position of text.
21. 6. The information processing apparatus according to claim 5, wherein said setting means sets a reference point in the circumscribing rectangle of said object group based on the position in said object group that most frequently matches the end position of the text.
22. an acquiring step of acquiring attribute information of an object included in the document data based on an instruction to change the paper size of the document data; a grouping step of grouping objects in the document data into object groups based on the acquired attribute information; a setting step of setting a reference point for the grouped object group; a placement step of placing the object group at a position based on the set reference point and the changed paper size instructed by the user; 10. A method for controlling an information processing device, comprising:
23. An application program for editing document data, comprising: an acquisition means for acquiring attribute information of an object included in the document data based on an instruction to change the paper size of the document data; a grouping means for grouping objects in the document data into object groups based on the acquired attribute information; a setting means for setting a reference point for the grouped object group; a placement unit that places the object group at a position based on the set reference point and the changed paper size that has been specified; A program characterized by functioning as
Citation Information
Patent Citations
Document layout editing apparatus, document layout editing method and computer program
JP2010020646A