This application claims priority benefit from Korean Patent Application No. 2011-0108338, filed in the Korean Intellectual Property Office on Oct. 21, 2011, the disclosure of which is incorporated herein by reference.
1. Field
Embodiments relate to a mobile apparatus and print controlling method, and more particularly, to a mobile apparatus for printing a webpage in an image capture method and a print controlling method having the same.
2. Description of the Related Art
In general, an image forming apparatus refers to an apparatus which prints print data generated in a terminal such as a computer on recording paper. A copier, printer, facsimile, and multi function peripheral (MFP) which embodies multi functions of a copier, printer, and facsimile in one apparatus are examples of such an image forming apparatus.
Nowadays, as it is possible to connect to the internet in a mobile apparatus such as a mobile phone, PMP, and MP3 player, it also became possible to perform a printing operation of a webpage in a mobile apparatus. However, since a printer driver is not installed in a mobile apparatus unlike in a print controlling terminal such as a PC, in a mobile apparatus, a printing operation is performed by generating a plurality of capture images of a webpage, combining the generated capture images, and transmitting the combined images to the image forming apparatus.
More specifically, an image is generated by capturing a portion of a webpage while scrolling the webpage by portions using a capture API inside a browser installed in a mobile apparatus, cutting out repetitive areas among a plurality of captured images, and then combining them.
However, this conventional method takes a long time due to the process of cutting out repetitive areas among the plurality of captured images.
In addition, the capturing process also takes a long time since capturing a webpage depends on whether or not scrolling is possible. Moreover, in the conventional method, printing operation itself is not possible in a browser which does not have a capture API.
An aspect of embodiments relates to a mobile apparatus for printing a web page in an image capture method and a print controlling method having the same.
According one or more embodiments, there is provided a mobile apparatus connectible to an image forming apparatus and internet may include a user interface unit which is selected with a web page to be printed; a size obtaining unit which obtains a size of the selected web page; a calculating unit which calculates a plurality of capture areas regarding the web page in such a manner that there is no repeated area, based on the obtained size of the web page; an image processing unit which generates a capture image regarding the web page per calculated plurality of capture areas, and combines the generated capture images to generate a print image; and a communication interface unit which transmits the generated print image to the image forming apparatus.
The size obtaining unit may obtain a size of the web page using a size calculation API (Application Programming Interface) of a web browser which displays the web page.
The size obtaining unit may obtain a size of the selected web page using a Javascript function.
The calculating unit may divide the web page into a plurality of capture areas by a predetermined capture size in such as manner that there is not repeated area, and calculate x, y coordinates per divided capture area.
The predetermined capture size may be a size of the web page which can be displayed in the user interface unit in the case of displaying the web page without any expansion.
The image processing unit may control so that the calculated plurality of capture areas are displayed consecutively on the user interface unit, and generate a screen displayed consecutively as a capture image.
The image processing unit may control so that the plurality of capture areas are displayed consecutively on the user interface unit using the Javascript function, to generate a plurality of capture images.
The image processing unit may combine the generated plurality of capture images to correspond to the capture area, and cut out an area which does not correspond to the size of the web page, to generate a print image.
The user interface unit may receive information of a size of a paper where the print image is to be printed, and the image processing unit may perform at least one processing from among an expansion processing, reduction processing, and dividing processing on the combined capture image according to the received size of the paper, to generate a print image.
The user interface unit may display the generated print image.
According to one or more embodiments, there is provided a print controlling method in a mobile apparatus connectible to an image forming apparatus and internet may include being selected a web page to be printed; obtaining a size of the selected web page; calculating a plurality of capture areas regarding the web page so that there is no repeated area, based on the obtained size of the web page; generating a capture image regarding the web page per calculated plurality of capture areas; combining the generated capture images to generate a print image; and transmitting the generated print image to the image forming apparatus.
The obtaining the size may obtain a size of the web page using a size calculation API (Application Programming Interface) of a web browser which displays the web page.
The obtaining the size may obtain a size of the selected web page using a Javascript function.
The calculating may divide the web page into a plurality of capture areas by a predetermined capture size in such a manner that there is no repeated area, and calculate x, y coordinates per divided capture area.
The predetermined capture size may be a size of a web page area which can be displayed in the user interface unit in the case of displaying the web page without any expansion.
The generating the capture image may control so that the calculated plurality of capture areas are displayed consecutively on the user interface unit, and generates a screen displayed consecutively as a capture image.
The generating the capture image may control so that the plurality of capture areas are displayed consecutively on the user interface unit using the Javascript function to generate a plurality of capture images.
The generating the print image may combine the generated plurality of capture images to correspond to the capture area, and cut out an area that does not correspond to the size of the web page, to generate a print image.
The print controlling method may further include receiving information of a size of a paper where the print image is to be printed, and the generating the print image may perform at least one processing from among an expansion processing, reduction processing, and dividing processing on the combined capture image according to the size of the paper to generate a print image.
The print controlling method may further include displaying the generated print image.
The above and/or other aspects of embodiments will be more apparent by describing embodiments with reference to the accompanying drawings, in which:
Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout. Embodiments are described below by referring to the figures.
In the following description, like drawing reference numerals are used for the like elements, even in different drawings. The matters defined in the description, such as detailed construction and elements, are provided to assist in a comprehensive understanding of exemplary embodiments. However, exemplary embodiments can be practiced without those specifically defined matters. Also, well-known functions or constructions are not described in detail since they would obscure the application with unnecessary detail.
With reference to
The communication interface unit 110 is formed to connect the mobile apparatus 100 with an external apparatus, is connected to an image forming apparatus (10) through Local Area Network (LAN), the Internet network and wireless communication systems such as global system for mobile communication (GSM), universal mobile telephone system (UMTS), and long term evolution (LTE).
The communication interface unit 110 may receive a web page through the internet.
In addition, the communication interface 110 may transmit a print image to the image forming apparatus 10. More specifically, the communication interface 110 may transmit the print image generated in an image processing unit 160 to be explained hereinbelow to the image forming apparatus 10.
The user interface unit 120 has a plurality of function keys through which a user may set or select various functions that the mobile apparatus 100 supports, and displays various information that the mobile apparatus 100 provides. The user interface 120 may be embodied as an apparatus where input and output are embodied simultaneously such as a touch pad, and may be embodied as an apparatus through combination of a mouse and a monitor.
The user interface unit 120 displays a web page. More specifically, the user interface unit 120 may display a web page received through the communication interface unit 110 according to a control of a web browser installed in the mobile apparatus 100. Herein, the user interface unit 120 may expand/reduce and then display the web page according to a control of the user or the web browser. More specifically, the web browser installed in the mobile apparatus 100 stores a screen to be displayed in the user interface unit 120 to a display data buffer. Therefore, the user interface unit 120 may obtain information stored in the display data buffer and display the web page.
The user interface unit 120 is selected with a web page to be printed. More specifically, the user may post a web page address to be printed on a user interface window displayed on the user interface unit 120, and select the web page to be printed. In addition, the user may input a print command regarding the displayed web page through the web browser and select the web page to be printed.
In addition, the user interface unit 120 may receive information on a size of a paper where the print image is to be printed. More specifically, the user interface 120 may receive information on a size of a paper where print image is to be printed (for example, A4, B5, or width length/height length of the print paper).
In addition, the user interface unit 120 may set a layout of a print image. More specifically, the user may set expansion/reduction of the print image, location on the print paper on the user interface window provided in the user interface unit.
In addition, the user interface unit 120 may display a preview regarding the generated print image. More specifically, the user interface unit 120 may display the print image generated in the processing unit 160 to be explained hereinbelow as a preview. The user may check the displayed preview image and determine whether or not to proceed with the print operation.
The storage unit 130 may include a display data buffer. Herein, the display data buffer is a configuration of a web browser temporarily storing a screen to be displayed on the user interface unit 120, and the user interface unit 120 may display the web page using the information stored in the display data buffer, and the image processing unit 160 to be explained hereinbelow may obtain the information stored in the display data buffer and generate the capture image.
The storage unit 130 may store the capture image. More specifically, the storage unit 130 may store the screen displayed on the user interface unit 120 as the capture image.
In addition, the storage unit 130 may store the combined capture image. More specifically, the storage unit 130 may store the combined capture image regarding the plurality of capture images in the image processing unit 160 to be explained hereinbelow. Herein, in the case where there is an unnecessary area in the combined capture image, an image from which the unnecessary area has been removed may be stored in the storage unit 130.
In addition, the storage unit 130 may store the generated print image. More specifically, the storage unit 130 may store the print image generated in the image processing unit 160 to be explained hereinbelow.
Moreover, the storage unit 130 may store a default viewport of the web browser. Herein, the default viewport is a pixel count displayed on the user interface unit 120 in a case where there is no additional viewport set on the web page. Default width pixel count per web browser is illustrated in
The storage unit 130 may be embodied as a storage medium inside the mobile apparatus 100 and outer storage medium, for example, a removable disk including a universal serial bus (USB), and web server through network.
A size obtaining unit 140 obtains a size of the selected web page. More specifically, when the web browser installed in the mobile apparatus 100 has a size calculation API (Application Programming Interface), the size obtaining unit 140 may obtain a width or height value of the selected web page using the size calculation API. When the selected web page is expanded or reduced and displayed, the size obtaining unit 140 may obtain an actual pixel size of the selected web page in proportion to the expansion/reduction ratio.
When the web browser installed in the mobile apparatus 100 does not have a size calculation API, the size obtaining unit 140 may obtain the size of the selected web page using a Javascript function. More specifically, the size obtaining unit 140 may obtain the width and height value of the web page, and obtain the size of the selected web page using the Javascript function which enables the obtained width and height value to be stored in a cookie of the web browser. Such a Javascript function may obtain the width and height value using ‘document.body.clientHeight’ and ‘document.body.clientWidth’ which are separate Javascript functions that could obtain the width and height value of the web page. The width and height value obtained through the Javascript may be converted into the actual pixel size considering the expansion/reduction ratio and viewport.
Although an embodiment explained the case of obtaining the width and height value of the web page using ‘document.body.clientHeight’ and ‘document.body.clientWidth’, this is merely an example. That is, functions such as ‘document.body.scrollHeight’ or ‘document.body.offsetHeight’ can obviously be used, but all Javascript functions that could obtain the width and height value of the web page can obviously be used in the size obtaining unit.
A calculating unit 150 calculates a plurality of capture areas regarding the web page in such a manner that there is no repeated area, based on the size of the obtained web page. More specifically, the calculating unit 150 may divide the web page into a plurality of capture areas by a predetermined capture size so that there is no repeated area, and calculate x, y coordinates per divided capture area. Herein, the predetermined capture size is the size of the web page area which can be displayed in the user interface unit when displaying the web page without any expansion. In an example where the displayed web page is a mobile web page, the width of the mobile web page is suited to the width of the user interface window, and thus the calculating unit 150 may divide the web page into a plurality of capture areas with only a y coordinate.
The image processing unit 160 generates a capture image regarding the web page per calculated plurality of capture areas. More specifically, the image processing unit 160 may control so that the calculated plurality of capture areas are displayed consecutively on the user interface unit, and capture the screen displayed consecutively, to generate the capture image. More specifically, in a case where the web browser installed in the mobile apparatus 100 has a scrolling API, the image processing unit 160 may control so that the calculated plurality of capture areas are displayed consecutively on the user interface unit 120 using the scrolling API, and perform an operation of obtaining the screen stored in the display data buffer, to generate a capture image. As such, in that the image processing unit 160 according to this exemplary embodiment obtains the screen stored in the display data buffer and generates a capture image, it becomes able to perform a capture operation in a browser which does not have a capture API.
In an example where the web browser installed in the mobile apparatus 100 does not have a scrolling API, the image processing unit 160 may control so that the plurality of capture areas are displayed consecutively on the user interface unit 120 using the Javascript function such as ‘scrollTo’, and generate a plurality of capture images.
In addition, the image processing unit 160 combines the generated capture images. More specifically, the image processing unit 160 may generate one capture image by combining the captured plurality of capture images in such a manner that they each correspond to the area location of each capture image. The combined capture image may or may not have an unnecessary area. For example, in a case where the web page is divided as in
However, when the web page is divided as in
In addition, the image processing unit 160 may perform at least one processing from among expansion processing, reduction processing, and dividing processing according to the size of the paper which received the combined image, and generate a print image. More specifically, the image processing unit 160 may edit the combined capture image based on the information on the paper size and layout command received from the user, and generate a print image.
For example, in a case where the size of the paper input by the user is A4, and the width of the combined capture image is greater than the width of A4 as illustrated in
A controlling unit 170 controls each configuration inside the mobile apparatus 100. More specifically, when a web page to be printed is selected through the user interface unit 120, the controlling unit 170 may control the size obtaining unit 140 so that the size of the selected web page is obtained. In addition, when the size of the web page is obtained, the controlling unit 170 may control the calculating unit 150 so that a plurality of capture areas are calculated, and control the image processing unit 160 so that capturing of the calculated plurality of capture areas is performed.
In addition, the controlling unit 170 may control the image processing unit 160 so that a final print image which corresponds to the size of the paper predetermined by the user is generated. In addition, the controlling unit 170 may control the communication interface unit 110 so that the generated print image is transmitted to the image forming apparatus 10.
Therefore, in that the mobile apparatus 100 according to this exemplary embodiment calculates the area to be captured and generates a capture image prior to performing the capture operation, it is unnecessary to perform additional processing of cutting out the repeated area regarding the capture image, thereby improving the print processing time. In addition, in that the area to be captured is calculated in advance, capturing can be performed promptly. Moreover, the mobile apparatus 100 according to this exemplary embodiment may perform capture operation regarding the web page even in a web browser which does not have a capture API and scrolling API.
In explaining
More specifically,
The calculating unit 140 calculates the plurality of capture areas to be the predetermined size so that there is no repeated area, based on the obtained size of the web page 20. Therefore, the web page 20 such as
In an example of the mobile web page, the width of the web page is suited to the width of user interface window 50, and thus is divided into a plurality of capture areas 51, 52, 53 of vertical directions so that there is no repeated area.
More specifically,
With reference to
With reference to
With reference to
The capture image generated by
With reference to
With reference to
With reference to
With reference to
With reference to
With reference to
A picture area 1310 is an area for receiving a command for printing an image stored in the mobile apparatus 100. When the picture area 1310 is selected, the mobile apparatus 100 may display the image stored in the mobile apparatus 100 and may be selected with the image where print operation is to be performed from among the displayed images. The selected image may be transmitted to the image forming apparatus 10 by the direct printing method and be printed.
The web page area 1320 is an area for receiving a command to print the web page. When the web page area 1320 is selected, a user interface window 1400 such as
A mail area 1330 is an area for receiving a command for printing a mail. When the mail area is selected, the mobile apparatus 100 may display the received mail and be selected with the mail where printing operation is to be performed from among the displayed mails. The selected mail may be imaged, and the imaged mail may be transmitted to the image forming apparatus 10 and be printed. Otherwise, the selected mail file itself may be transmitted to the image forming apparatus 10 and be printed.
A document area 1340 is an area for receiving a command for printing a document file. When the document area 1340 is selected, the mobile apparatus 100 may display a document file stored in the mobile apparatus 100, and be selected with a document file where printing operation is to be performed from among the displayed documents files. The selected document file may be transmitted to the image forming apparatus 10 by the direct printing method and be printed.
With reference to
The first area 1410 is an area for displaying a web page selected through a second area 1420.
The second area 1420 is an area selected with the web page to be printed.
A third area 1430 is an area for receiving a capture command or print command regarding the web page displayed on the first area 1410.
With reference to
In addition, the size of the selected web page is obtained S1520. More specifically, in the case where the web browser installed in the mobile apparatus 100 has a size calculation API (Application Programming Interface), the width and height of the selected web page may be obtained using the size calculation API. In an example where the web browser installed in the mobile apparatus 100 does not have a size calculation API, the size of the selected web page may be obtained using the Javascript function.
In addition, based on the obtained size of the web page, a plurality of capture areas regarding the web page is calculated in such a manner that there is no repeated area S1530. More specifically, it is possible to divide the web page into a plurality of capture areas by a predetermined capture size so that there is no repeated area, and calculate x, y coordinates per divided capture area. In an example where the displayed web page is a mobile web page, the width of the mobile web page is suited to the width of the user interface window, and thus it is possible to divide the web page into a plurality of capture areas with only y coordinates.
In addition, a capture image regarding the web page is generated per calculated plurality of capture areas S1540. More specifically, it may be controlled so that the calculated plurality of capture areas are displayed consecutively on the user interface unit, and that the screen displayed consecutively is captured to generate a capture image. More specifically, in the case where the web browser installed in the mobile apparatus 100 has a scrolling API, the calculated plurality of capture areas may be displayed on the user interface window consecutively using the scrolling API, and the screen displayed consecutively may be captured to generate a capture image. When the web browser installed in the mobile apparatus 100 does not have a scrolling API, a plurality of capture areas may be displayed on the user interface unit consecutively using the Javascript such as ‘scrollTl’ to generate a plurality of capture images.
In addition, the generated capture images are combined to generate a print image S1550. More specifically, the plurality of capture images can be combined in such a manner that they correspond to the area location of each capture image. The combined capture image may or may not have an unnecessary area. Therefore, in the case where there is an unnecessary area, an area that does not correspond to the size of the web page from among the one combined capture image (that is, the unnecessary area) may be cut out and generate a print image. In an example where the information of the size of the paper and the layout command have been received from the user, an image processing such as expansion processing, reduction processing and dividing processing may be performed regarding the combined capture image based on the received information of the size of the paper and the layout command, to generate a print image.
In addition, the generated print image is transmitted to the image forming apparatus S1560. More specifically, the generated print image may be transmitted to the image forming apparatus so that the generated print image can be printed in a direct printing method.
With reference to
In addition, a web print is selected S1603. More specifically, when the application which performs a print control operation is driven, a user interface window 1300 such as
In addition, the selected web page is connected S1605. More specifically, when the web page to be printed is selected on the second area 1420, the selected web page may be loaded, and the loaded web page may be displayed on the first area 1410.
When the loading of the web page is completed S1607, a capture command regarding the corresponding web page is received from the user S1609. More specifically, when the web page is loaded on the first area 1410, a third area 1430 is selected by the user, and a capture command regarding the corresponding web page may be received.
When the capture command is received, it is determined whether or not the web browser has a size calculation API S1613, and when the web browser does not have a size calculation API S1611—No, the size of the web page is calculated using the Javascript S1613, the calculated size of the web page may be recorded in the cookie S1615, and the size of the web page recorded in the cookie may be obtained to obtain the size of the web page S1617. When the web browser does have a size calculation API S1611—Yes, the size of the web page may be obtained using the size calculation API S1617.
When the size of the web page is obtained, the plurality of capture areas regarding the web page are calculated in such a manner that there is no repeated area based on the obtained size of the web page S1619.
When the plurality of capture areas are calculated, the user interface window currently displayed is captured S1621, and it is determined whether or not all capture areas are captured S1623.
When not all capture areas are captured S1623—No, it is determined whether or not the web browser has a scrolling API S1625, and when the web browser does have a scrolling API, the user interface window which corresponds to a next capture area is displayed using the scrolling API S1629, and when the web browser does not have a scrolling API, the user interface window which corresponds to the next capture area may be displayed using the Javascript S16127, S1629.
In the case where all capture areas are captured S1623—Yes, the plurality of capture images are combined to generate a print image S1631.
In addition, the generated print image is displayed as a preview image S1633. The user may input a final print command regarding the corresponding web page through the displayed preview image.
When the print command is input from the user S1635—Yes, the generated print image may be transmitted to the image forming apparatus to perform a print operation S1637. If a print command is not input by the user S1635—No, the aforementioned operation may be repeated.
Therefore, the print control method according to an embodiment improves the print processing time in that the area to be captured is calculated in advance to generate the capture image before performing the capture operation, and thus it is needless to perform an additional processing of cutting out the repeated area regarding the capture image. In addition, in that the area to be captured is calculated in advance, it is possible to perform a capturing operation promptly. Moreover, it becomes able to perform a capture operation on the web page even in a web browser which does not have a capture API and a scrolling API. Print controlling method as in
Print controlling processes, functions, methods, and/or software in mobile apparatuses described herein may be recorded, stored, or fixed in one or more non-transitory computer-readable storage media (computer readable recording medium) that includes program instructions (computer readable instructions) to be implemented by a computer to cause one or more processors to execute or perform the program instructions. The media may also include, alone or in combination with the program instructions, data files, data structures, and the like. The media and program instructions may be those specially designed and constructed, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of non-transitory computer-readable storage media include magnetic media, such as hard disks, floppy disks, and magnetic tape; optical media such as CD ROM disks and DVDs; magneto-optical media, such as optical disks; and hardware devices that are specially configured to store and perform program instructions, such as read-only memory (ROM), random access memory (RAM), flash memory, and the like. Examples of program instructions include machine code, such as produced by a compiler, and files containing higher level code that may be executed by the computer using an interpreter. The described hardware devices may be configured to act as one or more software modules that are recorded, stored, or fixed in one or more computer-readable storage media, in order to perform the operations and methods described above, or vice versa. In addition, a non-transitory computer-readable storage medium may be distributed among computer systems connected through a network and computer-readable codes or program instructions may be stored and executed in a decentralized manner. In addition, the computer-readable storage media may also be embodied in at least one application specific integrated circuit (ASIC) or Field Programmable Gate Array (FPGA.
Therefore, each block may be carried out as computer recordable codes on a recording medium readable by a computer. A computer readable recording medium may be a device which can store data which can be read by a computer system.
Although a few embodiments have been shown and described, it would be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the disclosure, the scope of which is defined in the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
10-2011-0108338 | Oct 2011 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
20100045772 | Roo et al. | Feb 2010 | A1 |
20100073693 | Lee et al. | Mar 2010 | A1 |
20100195134 | Miyata | Aug 2010 | A1 |
20100223571 | Krete | Sep 2010 | A1 |
20110194127 | Nagakoshi et al. | Aug 2011 | A1 |
20110221766 | Ko et al. | Sep 2011 | A1 |
20120010920 | Yuan | Jan 2012 | A1 |
20120010995 | Skirpa et al. | Jan 2012 | A1 |
20120084835 | Thomas et al. | Apr 2012 | A1 |
20120184289 | Wang et al. | Jul 2012 | A1 |
20130143651 | Harrison et al. | Jun 2013 | A1 |
Number | Date | Country |
---|---|---|
2010107036 | Sep 2010 | WO |
Entry |
---|
Extended European Search Report dated Nov. 7, 2013 in European Patent Application No. 12183066.5. |
Number | Date | Country | |
---|---|---|---|
20130100463 A1 | Apr 2013 | US |