Various embodiments evaluate content that is to be printed and ascertain whether the content is going to overflow or be “orphaned” onto a second page when printed. If some content will create an orphan when printed, then the content is scaled to fit onto a single page when printed. In some embodiments, the content is simply proportionally scaled to fit onto a single page. In other embodiments, the content is further processed to scale it in a manner that makes intelligent use of the white space on the printed page.
|
9. A computer-implemented method comprising:
ascertaining that content, when printed by a printer, will create an orphan, wherein the ascertaining comprises:
comparing a height of a portion of the content that would be printed on a second page with the second page's printable height;
based on the height of the portion of the content that would be printed on the second page being less than a predefined percentage of the second page's printable height, classifying the portion of the content that would be printed on the second page as the orphan;
computing a scaling factor as a function of a height of a portion of the content that would be printed on a first page and the height of the portion of the content that would be printed on the second page, wherein said computing comprises computing the scaling factor by dividing the height of the portion of the content that would be printed on the first page by a sum of the height of the portion of the content that would be printed on the first page and the height of the portion of the content that would be printed on the second page;
computing a layout structure having at least one dimension that is a function of the scaling factor, wherein said at least one dimension comprises a width of the layout structure, and wherein said width of the layout structure is computed as a width of the content divided by the scaling factor;
laying out the content using the layout structure; and
scaling the laid out content to be printable on a single page.
1. A computer-implemented method comprising:
ascertaining whether content that is to be printed by a printer will create an orphan, wherein the ascertaining comprises:
determining a height of content that would be printed on a first page, a height of the content that would be printed on a second page, and a printable height of the second page;
comparing the height of said content that would be printed on the second page with the printable height of the second page, wherein the printable height of the second page is less than a height of the second page;
determining that the height of said content that would be printed on the second page is less than a predefined percentage of the printable height of the second page;
based on determining that the height of said content that would be printed on the second page is less than the predefined percentage, classifying said content that would be printed on the second page as the orphan; and
defining a layout structure to include said content, wherein the defining comprises:
computing a scaling factor by dividing the height of the content that would be printed on the first page by the sum of the height of the content that would be printed on the first page and the height of the content that would be printed on the second page;
computing at least a width dimension of the layout structure, wherein the width dimension is computed as a width of the content divided by the scaling factor; and
scaling said layout structure inwardly in accordance with the scaling factor so that the content fits on the single page.
5. A computer-implemented method comprising:
laying out content to be printed by a printer as laid out content;
determining that the laid out content, when printed, will create an orphan, wherein the determining comprises:
comparing a height of a portion of the laid out content that would be printed on a second page with a height of a portion of the second page that can contain printable content;
based on the height of the portion of the laid out content that would be printed on the second page being less than a predefined percentage of the height of the portion of the second page that can contain printable content, classifying the height of the portion of the laid out content that would be printed on the second page as the orphan, wherein the height of the portion of the second page that can contain printable content is less than a height of the second page;
computing a scaling factor by dividing a height of a portion of the laid out content that would be printed on a first page by the sum of the height of the portion of the laid out content that would be printed on the first page and the height of the portion of the laid out content that would be printed on the second page;
computing a layout structure, wherein a width dimension of the layout structure is computed as a width of the laid out content divided by the scaling factor; and
re-laying out the content to be printed as re-laid out content using the layout structure, the layout structure being scaled in accordance with the scaling factor to enable the re-laid out content to be printed on a single page.
3. One or more computer-readable media having computer-readable instructions thereon which, when executed, implement the method of
4. A computing device embodying the one or more computer-readable media of
6. The method of
7. One or more computer-readable media having computer-readable instructions thereon which, when executed, implement the method of
8. A computing device embodying the one or more computer-readable media of
10. The method of
11. The method of
|
This invention pertains to methods and systems for printing content.
Printing is a very important feature that is provided by many software applications for end users. For example, email applications typically allow a user to print email message to create a hard copy record. Likewise, other applications such as word processing applications, browser applications and the like permit a user to print various pages. Yet, these types of applications, as well as others, often have inefficiencies that not only make the end user's experience not all that it could be, but waste paper as well.
As an example, consider the following in connection with
Accordingly, this invention arose out of concerns associated with providing improved methods and systems for printing content.
Various embodiments evaluate content that is to be printed and ascertain whether the content is going to overflow or be “orphaned” onto a second page when printed. If some content will create an orphan when printed, then the content is scaled to fit onto a single page when printed.
In some embodiments, the content is simply proportionally scaled to fit onto a single page. In other embodiments, the content is further processed to scale it in a manner that makes intelligent use of the white space on the printed page.
Overview
The embodiments described below evaluate content that is to be printed and ascertain whether the content is going to overflow or be “orphaned” onto a second page when printed. If some content will create an orphan when printed, then the content is scaled to fit onto a single page when printed.
In some embodiments described below, the content is simply proportionally scaled to fit onto a single page. In other embodiments, the content is further processed to scale it in a manner that makes intelligent use of the white space on the printed page.
Proportional Scaling
In one embodiment, content that is to be printed is evaluated to ascertain whether printing the content will create an orphan on a second printed page. If an orphan will be created on a second printed page, then the content is proportionally scaled to fit onto a single page when printed.
As an example, consider
Once classified as an orphan, a layout structure is defined to include the content that would appear on the first and second page. In this example, a layout structure 206 is defined in the form of a layout rectangle and contains the content that would appear on the first and second pages. In this example, the layout structure is exaggerated in its length for illustrative purposes only. Next, having defined the layout structure to include the content that would appear on the first and second page, the layout structure is scaled proportionally, in the direction of the arrow, so that the content fits onto a single page. Notice scaled layout structure 208 and the content contained within it fits on a single page.
Step 300 lays out content that is to be printed. Any suitable method can be utilized to lay the content out for printing. Step 302 ascertains whether the laid out content will create an orphan. Any suitable criteria can be used to define an orphan. But one example of how an orphan can be defined is given above.
In an event the laid out content will not create an orphan, step 304 can proceed to print the content. If, however, step 302 ascertains that the laid out content will create an orphan, step 306 scales the content to fit on a single page. One example of how this can be done is given above.
Notice in
To address this situation and to mitigate the effects of a larger right margin area stemming from proportional content scaling, at least some embodiments can employ intelligent re-sizing techniques described just below.
Intelligent Re-Sizing
In the intelligent re-sizing case, when an orphan is detected, the content is re-laid out. An intelligence decision is made with regard to the dimensions of the layout structure that is utilized to re-lay out the content such that when the content is scaled back, the content fits on to a single page and the previously-induced larger right margin area is eliminated or at least reduced. The intelligent decision is based, at least in part, on a computed scaling factor that attempts to use as much of the paper as possible to fit the content onto a single page.
As an example, consider
Once classified as an orphan, a scaling factor and a layout structure are defined so that the content can be reflowed or re-laid out into the layout structure and then scaled onto a single page. In this example, content 400 has a width w and a height which is represented as h1+h2. A scaling factor (α) is computed as a ratio of the height of the content on the first page to the total height of the content. In this example, the scaling factor (α) is represented as:
h1/(h1+h2).
As an example, consider that the width w and height h1 of the content on the first page are, respectively, 20 units and 50 units. Assume also that the height of the orphan content h2 is 10 units. Accordingly, the scaling factor (α) would be 50/(50+10)=50/60 or 0.83.
Using the computed scaling factor (α), and applying this scaling factor to the content (whose height is 60 units and whose width is 20 units), we arrive at a height dimension of 49.8 units and a width dimension of 16.6 units. Hence, at this point, the content just fits height-wise on one page. Width-wise, however, if this content were to be reflowed using a width of 20 units, the effective height of the content would be reduced, thus leaving a larger bottom margin than is desirable. For example, the new reflowed height of the content may now be 44 units.
Thus at this point, the following can be ascertained. At the original scaling factor of 1, the content's height dimension (60 units) was too high and created an orphan. At the scaling factor of 0.83, the content would not have created an orphan, but when reflowed using a width of 20 units, a larger than desirable bottom margin would be created. As the goal is to get the content to a height as close to 50 units as possible, the optimal scaling factor (α′) would be somewhere between 0.83 and 1.0.
The optimal scaling factor can thus be computed in any suitable way. For example, trial and error calculations could be made. Alternately or additionally, a table can be used to ascertain the optimal scaling factor.
Consider again
In the
Step 500 lays out content that is to be printed. Any suitable method can be utilized to lay the content out for printing. Step 502 ascertains whether the laid out content will create an orphan. Any suitable criteria can be used to define an orphan. But one example of how an orphan can be defined is given above.
In an event the laid out content will not create an orphan, step 504 can proceed to print the content. If, however, step 502 ascertains that the laid out content will create an orphan, step 506 computes a scaling factor that is to be used to scale the content. Any suitable scaling factor or technique for computing a scaling factor can be utilized. But one example of how to compute a scaling factor is provided above. Note that this step can result in multiple different scaling factors being computed to find the optimal scaling factor for a given printable height and width.
Step 508 computes new layout structure dimensions. Any suitable layout structure can be utilized. In the example above, a layout structure in the form of a rectangle was used. Other structures can be utilized without departing from the spirit and scope of the claimed subject matter. The dimensions of the new layout structure can be computed in any suitable way. In but one embodiment, at least some of the dimensions of the layout structure are a function of the computed scaling factor. In the example above, the width of the new layout structure is computed as a function of the scaling factor. Once the new layout structure dimensions have been computed, step 510 flows the content into the new layout structure and step 512 scales the content inwardly by the scaling factor.
By selecting an appropriate scaling factor and layout structure, the orphan-inducing content can be scaled in a manner such that it appears on a single page when printed.
Exemplary Systems
The resize component can comprise a standalone software component, or can comprise part of application(s) 706 (as indicated by the dashed line). Application(s) 706 can comprise any suitable application including, by way of example and not limitation, an email application, word processing application, Internet browser application and the like. In this particular embodiment, resize component 708 is configured to operate as was described above in connection with
Implementation Example
In an implementation, the above techniques can be employed as follows. Assume that a user is working within an application and desires to print a document. At this point, the user clicks on a print icon and the application begins to process the data for printing. In this example, current printing defaults are captured and initial layout rectangles with default settings are created. Once the initial layout rectangles are created, the content that is to be printed is flowed into the layout rectangles. At this stage, once the content has been flowed into the initial layout rectangles, the content is evaluated for orphans. Typically, this is done by checking the last page of the document that is to be printed. Techniques that can be utilized to identify orphans are identified above and, for the sake of brevity, are not repeated here.
If there is no orphan, then the document can simply be printed. If, on the other hand, an orphan is detected, a scaling factor is computed and a re-layout step is executed which re-defines the layout rectangle for the second-to-last page in the document. In some cases, the second-to-last page will be the first page of a document. Methods for computing scaling factors and for re-defining layout rectangles are described above and, for the sake of brevity, are not described here further. The content is then flowed into the new layout rectangle and subsequently scaled to fit into one page. Any suitable scale-to-fit algorithm can be utilized, as will be appreciated by the skilled artisan. Additionally, it is to be appreciated and understood that these techniques could be applied to the whole document. That is, in some embodiments, the whole document could be rescaled and reflowed so that all pages are at the same consistent scale, thus sharing, for example, consistent font sizes.
Exemplary Computing System
Computer system 830 includes one or more processors or processing units 832, a system memory 834, and a bus 836 that couples various system components including the system memory 834 to processors 832. The bus 836 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. The system memory 834 includes read only memory (ROM) 838 and random access memory (RAM) 840. A basic input/output system (BIOS) 842, containing the basic routines that help to transfer information between elements within computer 830, such as during start-up, is stored in ROM 838.
Computer 830 further includes a hard disk drive 844 for reading from and writing to a hard disk (not shown), a magnetic disk drive 846 for reading from and writing to a removable magnetic disk 848, and an optical disk drive 850 for reading from or writing to a removable optical disk 852 such as a CD ROM or other optical media. The hard disk drive 844, magnetic disk drive 846, and optical disk drive 850 are connected to the bus 836 by an SCSI interface 854 or some other appropriate interface. The drives and their associated computer-readable media provide nonvolatile storage of computer-readable instructions, data structures, program modules and other data for computer 830. Although the exemplary environment described herein employs a hard disk, a removable magnetic disk 148 and a removable optical disk 152, it should be appreciated by those skilled in the art that other types of computer-readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, random access memories (RAMs), read only memories (ROMs), and the like, may also be used in the exemplary operating environment.
A number of program modules may be stored on the hard disk 844, magnetic disk 848, optical disk 852, ROM 838, or RAM 840, including an operating system 858, one or more application programs 860, other program modules 862, and program data 864. A user may enter commands and information into computer 830 through input devices such as a keyboard 866 and a pointing device 868. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are connected to the processing unit 832 through an interface 870 that is coupled to the bus 836. A monitor 872 or other type of display device is also connected to the bus 836 via an interface, such as a video adapter 874. In addition to the monitor, personal computers typically include other peripheral output devices (not shown) such as speakers and printers.
Computer 830 commonly operates in a networked environment using logical connections to one or more remote computers, such as a remote computer 876. The remote computer 876 may be another personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to computer 830, although only a memory storage device 878 has been illustrated in
When used in a LAN networking environment, computer 830 is connected to the local network 880 through a network interface or adapter 884. When used in a WAN networking environment, computer 830 typically includes a modem 886 or other means for establishing communications over the wide area network 882, such as the Internet. The modem 886, which may be internal or external, is connected to the bus 836 via a serial port interface 856. In a networked environment, program modules depicted relative to the personal computer 830, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
Generally, the data processors of computer 830 are programmed by means of instructions stored at different times in the various computer-readable storage media of the computer. Programs and operating systems are typically distributed, for example, on floppy disks or CD-ROMs. From there, they are installed or loaded into the secondary memory of a computer. At execution, they are loaded at least partially into the computer's primary electronic memory. The invention described herein includes these and other various types of computer-readable storage media when such media contain instructions or programs for implementing the steps described below in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described below.
For purposes of illustration, programs and other executable program components such as the operating system are illustrated herein as discrete blocks, although it is recognized that such programs and components reside at various times in different storage components of the computer, and are executed by the data processor(s) of the computer.
Conclusion
The embodiments described above evaluate content that is to be printed and ascertain whether the content is going to overflow or be “orphaned” onto a second page when printed. If some content will create an orphan when printed, then the content is scaled to fit onto a single page when printed.
In some embodiments, the content is simply proportionally scaled to fit onto a single page. In other embodiments, the content is further processed to scale it in a manner that makes intelligent use of the white space on the printed page.
Although the invention has been described in language specific to structural features and/or methodological steps, it is to be understood that the invention defined in the appended claims is not necessarily limited to the specific features or steps described. Rather, the specific features and steps are disclosed as preferred forms of implementing the claimed invention.
Mielke, Markus W., Bateman, Adrian
Patent | Priority | Assignee | Title |
8782551, | Oct 04 2006 | GOOGLE LLC | Adjusting margins in book page images |
9465775, | Jun 10 2005 | Microsoft Technology Licensing, LLC | Methods and systems for treating overflow conditions and for re-sizing printable content |
Patent | Priority | Assignee | Title |
5425138, | Dec 26 1991 | Intellectual Ventures Holding 56 LLC | Apparatus and method for automatically editing documents including text data and table data with ruled lines |
5577187, | May 20 1994 | Microsoft Technology Licensing, LLC | Method and system for tiling windows based on previous position and size |
5796401, | Aug 09 1996 | System for designing dynamic layouts adaptable to various display screen sizes and resolutions | |
5835920, | Aug 08 1996 | Qwest Communications International Inc | Dynamic page reduction |
5956737, | Sep 09 1996 | Microsoft Technology Licensing, LLC | Design engine for fitting content to a medium |
6144975, | May 05 1998 | FMR LLC | Computer system for intelligent document management |
6718518, | Dec 20 1999 | International Business Machines Corporation | Non-disruptive search facility |
7212309, | Aug 30 2002 | Microsoft Technology Licensing, LLC | Best fit printing |
7249319, | Dec 22 2003 | Microsoft Technology Licensing, LLC | Smartly formatted print in toolbar |
20020172418, | |||
20030172355, | |||
20030229856, | |||
20050055636, | |||
20050262441, | |||
20060026512, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jun 09 2005 | BATEMAN, ADRIAN | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 016661 | /0975 | |
Jun 10 2005 | Microsoft Corporation | (assignment on the face of the patent) | / | |||
Jul 28 2005 | MIELKE, MARKUS W | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 016661 | /0975 | |
Oct 14 2014 | Microsoft Corporation | Microsoft Technology Licensing, LLC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 034543 | /0001 |
Date | Maintenance Fee Events |
Oct 04 2012 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Dec 08 2016 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Sep 24 2020 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Jun 23 2012 | 4 years fee payment window open |
Dec 23 2012 | 6 months grace period start (w surcharge) |
Jun 23 2013 | patent expiry (for year 4) |
Jun 23 2015 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 23 2016 | 8 years fee payment window open |
Dec 23 2016 | 6 months grace period start (w surcharge) |
Jun 23 2017 | patent expiry (for year 8) |
Jun 23 2019 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 23 2020 | 12 years fee payment window open |
Dec 23 2020 | 6 months grace period start (w surcharge) |
Jun 23 2021 | patent expiry (for year 12) |
Jun 23 2023 | 2 years to revive unintentionally abandoned end. (for year 12) |