This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2022-049669 filed Mar. 25, 2022.
The present invention relates to an information processing apparatus, a non-transitory computer readable medium storing a program, and an information processing method.
For example, an office application of Microsoft Corporation has a function of setting a link destination to text in a generated document. The link destination may be set to a reference destination in an identical document or an address to a web page.
Incidentally, in a case where a document is transmitted by e-mail or the like, the document may be converted into a file format that can be viewed without special software, for example, a Portable Document Format (PDF) file, and then attached. Consequently, the document can be viewed even in a case where an application that has created the document is not installed on a personal computer (PC) used by a recipient of the document that is a transmission destination.
However, in a case where an external web page or the like that can be referenced only in an online environment is specified as a link destination inserted in a document, and an information processing apparatus that refers to the document cannot be connected to an online environment, the document being a document in a document format that can be viewed without depending on a software environment, information obtained from the link destination cannot be referred to.
Aspects of non-limiting embodiments of the present disclosure relate to an image processing apparatus, a non-transitory computer readable medium storing a program, and an image processing method capable of referring to information obtained from an external link destination inserted in a document even in an offline environment.
Aspects of certain non-limiting embodiments of the present disclosure overcome the above disadvantages and/or other disadvantages not described above. However, aspects of the non-limiting embodiments are not required to overcome the disadvantages described above, and aspects of the non-limiting embodiments of the present disclosure may not overcome any of the disadvantages described above.
According to an aspect of the present disclosure, there is provided an image processing apparatus including a processor configured to: acquire information from an external link destination inserted into a document in a document format that is viewable without depending on a software environment; in a case where the acquired information is a web page, convert the web page into a file in the document format; and store the file obtained from the external link destination in an offline environment in association with the document.
Exemplary embodiment(s) of the present invention will be described in detail based on the following figures, wherein:
Hereinafter, exemplary embodiments of the present invention will be described with reference to the drawings.
The LAN system 1 is, for example, a local system constructed in one office of a company, and is constructed by a user terminal 10 used by an employee or the like (hereinafter, a “user”), a file server 5 installed as means for storing a file used by the user, and a gateway (GW) 6 connecting the LAN system 1 to the Internet 3, which are connected to a LAN 7. A plurality of user terminals 10 may be connected to the LAN 7, but since each of the user terminals has a processing function that will be described later,
The web server 2 holds various types of information provided to the user terminal 10 via the Internet 3. The web server 2 provides information by allowing a user to view a web page or download a file such as a download file. Although a plurality of web servers 2 are connected to the Internet 3,
The user terminal 10 in the present exemplary embodiment is provided as an information processing apparatus according to an exemplary embodiment of the present invention. The user terminal 10 can be implemented by, for example, a general-purpose PC or the like. That is, the user terminal 10 is configured as a hardware configuration by connecting a CPU, a ROM, a RAM, and a hard disk drive (HDD) as storage means, a user interface, and a network interface as communication means connected to the LAN 7 in a wired or wireless manner, to an internal bus. The user interface has input means such as a mouse and a keyboard and display means such as a display. Alternatively, the user interface may be configured with a touch panel or the like that also serves as input means and display means.
The user terminal 10 has a document acquisition unit 11, a PDF conversion processing unit 12, an external information acquisition unit 13, a storage file creation unit 14, a display control unit 15, and a control unit 16. Constituents not used in the description of the present exemplary embodiment are not illustrated in the drawings.
The document acquisition unit 11 acquires a document to be converted into a PDF file. In the present exemplary embodiment, the “document” is an electronic document and is synonymous with a document file. The document to be converted into a PDF file is a document in which a hyperlink can be set in the document, and is, for example, a document created by an office application of Microsoft Corporation.
The “hyperlink” that is also referred to simply as a “link” is reference information to other information resources embedded in an information resource such as a document, and is defined as an element in a document such as text or an image in which such a reference is set. In general, inserting a link in a document may be expressed as “setting a link” or “creating a link”. In the following description, inserting a link is inserted or setting a link refers to an identical operation. The “link destination” is a storage location of information designated by a Uniform Resource Locator (URL) or the like in the hyperlink. The link destination may also indicate a file such as a “direct link”.
The link destination is usually another location in the document or a storage location of information in the web server 2. In the present exemplary embodiment, a case where an information acquisition destination is the latter, that is, the web server 2 accessible via the Internet 3 will be particularly referred to as an “external link destination”. A “link” is roughly classified into an “internal link” and an “external link”. The “internal link” is defined as a link between pages within a site. In the present exemplary embodiment, the LAN system 1 corresponds to the above site. On the other hand, the “external link” is defined as a link other than the internal link. The “external link” in the present exemplary embodiment includes a link that for connection to an external site, that is, another site (the above web server 2) outside the LAN system 1, and a link, which is generally called a “direct link”, for direct connection to a resource (this resource is stored in the web server 2) other than a page (HyperText Markup Language (HTML)) such as an image file.
Returning to
Each of the constituents 11 to 16 in the user terminal 10 is realized through a cooperative operation of a computer forming the user terminal 10 and a program running on a CPU mounted on the computer.
The program used in the present exemplary embodiment may be provided not only by communication means but also by being stored in a computer readable recording medium such as a CD-ROM or a USB memory. Programs provided by communication means or a recording medium are installed in a computer, and various processes are realized by a CPU of the computer sequentially executing the programs.
In the present exemplary embodiment, the above constituents 11 to 16 are shown as the functions of the user terminal 10, but these functions may be realized by different programs. Alternatively, the functions may be realized by using a function of one application, or may be realized by linking a plurality of applications. The applications include, for example, various types of software that handles PDF of Adobe System, and DocuWorks (registered trademark) of Fuji Xerox Business Innovation.
In a case where a user using the user terminal 10 sends a document to another person by e-mail or the like, for example, the document may be converted into a PDF file such that the other person (that is, a recipient of the document) can view the document without special software. Since the link setting is not deleted even in a case where the document is converted into a PDF file, a viewer (a user or a recipient) of the PDF file can acquire information from an external link destination designated in the PDF file in a case where the PDF file is referred to in an online environment. However, in the offline environment, even in a case where a viewer of the PDF file selects an external link, information at an external link destination cannot be referred to.
Therefore, in the present exemplary embodiment, when the user terminal 10 is operating in an online environment, information is acquired in advance from an external link destination, and a document is converted into PDF such that the document is stored in an offline environment in association with a created PDF file. Therefore, the information at the external link destination can be referred to even in a state in which the user terminal 10 is placed in an offline environment at the time of referring to the PDF file.
Hereinafter, a file conversion process of converting a document file into a PDF file in the present exemplary embodiment will be described with reference to the flowchart of
In a case where the document acquisition unit 11 acquires a document file designated by a user (step S111), the PDF conversion processing unit 12 converts the document file into a PDF file (step S112). As this file conversion function, a function that has existed before may be used.
Subsequently, the control unit 16 analyzes the PDF file to check whether or not an external link is set in the PDF file. The fact that the external link is set means that a storage destination of information attached to text or an image in the PDF file is the inside of the web server 2 accessed via the Internet 3. In a case where a plurality of external links are set in the PDF file, processes described below may be repeatedly performed on each of the external links. Therefore, one of the set external links will be focused on here.
In a case where no external link is set in the PDF file (N in step S113), this process is ended. In this case, the PDF file is stored in a predetermined storage location of the file server 5. As described above, since the focus is on the external link here, in a case where only an internal link is set, this process is ended.
In a case where an external link is set in the PDF file (Y in step S113), the external information acquisition unit 13 acquires information from the external link destination (step S114). The information acquired by the external information acquisition unit 13 may be roughly classified into information written on a web page stored in a storage location designated by the external link (more specifically, a file written in a markup language such as HTML for displaying the web page) and files disclosed in) and a file such as a download file or a compressed file.
Here, in a case where the acquired information is a web page (Y in step S115), the PDF conversion processing unit 12 converts the web page into a PDF file. More specifically, the web page is generated as a PDF file by performing format conversion of an HTML file or the like (step S116). In a case where the acquired information is not a web page but a file (N in step S115), the control unit 16 proceeds to step S117 without converting the acquired information into a PDF file.
In the following description, unless otherwise specified, a PDF file converted from a web page will be described.
The present exemplary embodiment is characterized in that a file obtained from an external link destination is associated with a PDF file 21 and stored in an offline environment, that is, in the LAN system 1. The “file obtained from the external link destination” corresponds to the PDF file created in step S116 and a file directly acquired from the web server 2, such as the download file, but here, the PDF file created in step S116 corresponds to the file obtained from the external link destination.
Subsequently, the control unit 16 determines whether or not the file acquired from the external link destination matches predetermined attachment conditions. Specific details of the attachment conditions will be described later, and here, a case where the file does not match the attachment conditions will be described first.
In a case where the file acquired from the external link destination does not match the predetermined attachment conditions (N in step S117), the storage file creation unit 14 combines the PDF file 24 as an appendix in the PDF file 21 to create a PDF file 25 to be stored (step S119). The “combination” in the present exemplary embodiment means that a plurality of files are integrally formed, that is, one file is generated. In the present exemplary embodiment, the PDF file 24 is added to the PDF file 21 and combined at the end of the document, but a location in a combined document is not necessarily limited to this. For example, a combined document may be inserted immediately after the external link 22.
According to the present exemplary embodiment, since the information of the web page 23 obtained from the external link destination is converted into PDF and combined with the original PDF file 21 to be stored, the information of the web page 23 can be referred to even in a case where the user terminal 10 is operating in an online environment.
The storage file creation unit 14 sets an in-document link between the PDF file 21 and the PDF file 24 in the PDF file 25 for storage (step S120).
On the other hand, in the PDF file 24, the in-document link for returning the display to the insertion position of the text 26 is set to text “back” 27. Therefore, in a case where the user clicks the text 27, the display control unit 15 returns the display to the original display position where the text 26 has been displayed.
In the present exemplary embodiment, the PDF file 21 and the PDF file 24 can be exchanged with each other by setting in-document links (also referred to as “mutual links”) that can be exchanged with each other.
The PDF file 25 for storage is stored in any place in an offline environment. In the present exemplary embodiment, the file is stored in the file server 5, but the present exemplary embodiment is not limited to this, and the file may be stored in the user terminal 10 that has created the PDF file 25.
Here, specific details of the predetermined attachment conditions will be described.
As described above, in a case where the PDF file 24 is combined with the PDF file 21, the information of the original document and the information obtained from the external link destination can be integrally created, and thus it can be said that file management becomes simple. However, in a case where the PDF file 24 to be combined has a large capacity, a capacity of the PDF file 25 for storage also increases, which may make the management and viewing of the PDF file 25 inconvenient. Therefore, as a predetermined attachment condition, a case is set in which the number of pages of the PDF file 24 associated with the PDF file 21 is equal to or more than a threshold value, that is, equal to or greater than a predetermined number of pages. In a case where the PDF file 24 matches this attachment condition, the PDF file 24 is attached without being combined with the PDF file 21, that is, stored in an offline environment separately from the PDF file 21.
As an “attachment” method, an attached file of the PDF file 21 may be used, or a portfolio function provided by an application of Adobe Systems Incorporated may be used. Here, the attached PDF file will be collectively referred to as an “attached file” and stored in a predetermined folder on the file server 5.
In a case where the file acquired from the external link destination matches the predetermined attachment conditions (Y in step S117), the storage file creation unit 14 stores the PDF file 34 as an attached file 35 of the PDF file 31 in an offline environment (step S118). A storage destination of the attached file 35 is predetermined as a predetermined folder in the file server 5, but the user may be inquired in a case of storing the file.
The predetermined attachment conditions are not necessarily limited to the above example. An attachment condition may be a case where an external link is a direct link and a file can be obtained directly from an external link destination. An attachment condition may be a case where, instead of performing automatic determination by setting a threshold value as described above, the user is inquired about a method of associating the PDF file 34 with the PDF file 31, and selects to attach and store the PDF file 34.
In the present exemplary embodiment, a document file acquired by the document acquisition unit 11 is converted into a PDF file, and then information is acquired from an external link destination. However, a timing of acquiring information is not necessarily limited to this. For example, since the document acquisition unit 11 can specify an external link destination by acquiring a document file and it is clear that a PDF file is created, information may be acquired from the external link destination before the PDF file is created. Information acquired from an external link destination may be converted into PDF before or after a document file acquired by the document acquisition unit 11 is converted into PDF.
Incidentally, for example, in
As described above, the PDF file 48 corresponding to the web page 47 is stored in an offline environment similarly to the PDF file 44 corresponding to the web page 43. In the example shown in
In
The same may apply in a case where a file obtained from an external link destination does not match the attachment conditions. That is, in
Each lower layer PDF file created from a web page of the second layer or lower may be stored in association with a PDF file of the immediately upper layer. A user may be allowed to select a storage location of information indicating the hierarchical relationship.
Incidentally, in a case where a description will be made with reference to
However, depending on the content of the information obtained from the web server 2, in a case where the web server 2 can be accessed, information may be acquired from the web server 2 each time. For example, for information that the web server 2 needs to keep the latest information at all times, for example, information such as manufacturer's notification information or a registration form for inquiries, the user wants to use the latest information. In consideration of such a case, in the present exemplary embodiment, designation of an external link originally set in a PDF file is not simply replaced with a link in a document, but is retained in an offline environment. The designation of the external link may be included in an attached file or an appendix, for example.
In a case where information can be acquired in an online environment when a link inserted into a PDF file is selected by a user, the control unit 16 determines whether an acquisition destination of the information is an online environment or an offline environment depending on characteristics of information obtained from an external link destination. The characteristics of the information obtained from the external link destination are, as exemplified above, information for which the web server 2 needs to keep the latest information at all times. For example, in a case where it is determined that it is better to acquire the information from the web server 2, the control unit 16 causes the external information acquisition unit 13 to acquire the information from the external link destination. The display control unit 15 presents the acquired information to the user by displaying the information on the display. On the other hand, in a case where it is determined that information stored in an offline environment is better, the display control unit 15 presents the information stored in the offline environment to the user by displaying the information on the display.
In the above description, the control unit 16 automatically performs determination depending on the characteristics of the information obtained from the external link destination, but in a state in which the information can be acquired from the web server 2, the user may be allowed to select an online environment or an offline environment as an information acquisition destination.
However, for example, in a case where a description will be made with reference to
Therefore, in the present exemplary embodiment, it is possible to ascertain from which environment information is acquired before the user selects the text 26.
As described above, the display control unit 15 performs display control such that it can be determined whether an information acquisition destination is an online environment or an offline environment.
In
In a display example shown in
In a display example shown in
In the embodiments above, the term “processor” refers to hardware in a broad sense. Examples of the processor include general processors (e.g., CPU: Central Processing Unit) and dedicated processors (e.g., GPU: Graphics Processing Unit, ASIC: Application Specific Integrated Circuit, FPGA: Field Programmable Gate Array, and programmable logic device).
In the embodiments above, the term “processor” is broad enough to encompass one processor or plural processors in collaboration which are located physically apart from each other but may work cooperatively. The order of operations of the processor is not limited to one described in the embodiments above, and may be changed.
The foregoing description of the exemplary embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2022-049669 | Mar 2022 | JP | national |