Open Bug 364421 Opened 18 years ago Updated 2 years ago

Same size daily boxes and week rows in monthly grid print output

Categories

(Calendar :: Printing, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: CarlPonder, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061116 Fedora/1.5.0.8-2_EL4 (CK-IBM) (CK-IBM) Firefox/1.5.0.8
Build Identifier: SunBird 0.3

I print the "calendarPrint.html" file using the "opera" browser, so I can get a full month grid on tabloid paper. I'd really like the grid to fill the whole sheet of paper, with extra whitespace in the boxes so I can pencil in notes.

As it is, each horizontal row represents on week, and the vertical size of each row is set to minimize the whitespace. DIfferent weeks end up with different vertical sizes.

I'd prefer that (a) each week have the same vertical size, just like the calendar view on my screen, and (b) the cumulative vertical size is the same as the height of the paper I'm printing on. (Note that this looks more like the calendars that you buy at the store).

Reproducible: Always
Summary: Larger daily boxes in monthly grid → Monthly layout: Larger daily boxes in monthly grid
Note that when I run the SunBord tool and view the Monthly calendar, it formats on the screen just as I describe here. Each day is sized the same, and the days are sized so it fills the entire screen.

I just want it to work the same way when I print it, particularly on "tabloid" paper size.
With the recent version

       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8pre)
       Gecko/20071023
       Sunbird/0.7

I can print the calendar directly in Landscape mode on Tabloid paper without having to save it to a file first. (Thanks!!). But there is still the matter of each week being printed with a different height.

Maybe this would be better as an option to the monthly view:

    1. Size the grid to fill the whole sheet and size every day the same.
    2. Size each week separately, to fit the longest daily list in that week,
       and leave extra empty space at the bottom of the sheet.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Summary: Monthly layout: Larger daily boxes in monthly grid → Same size daily boxes and week rows in monthly grid print output
One other thing: I'd like the monthly grid to fill the page, but have the font stay at a reasonably small size. I currently have to adjust the overall size to make the calendar fit on one Tabloid/Landscape sheet, but end up with print so big that it doesn't leave any empty space in the boxes, so there's no room to write in any notes. I want to be able to use a font about 70% of this and have some blank space in each box.
Is there an easy way for me to control the font-size of the printed calendar?
I see some hacks posted on the web, but they don't explain what file needs to be edited.
When I print, I'm scaling the whole calendar to fill the (11x17, landscape) page but don't like it oversizing the font at the same time.
With Lightning 3.3.3 (atop Thunderbird 31.8.0) I can fix the sizing problems as follows:
Edit this HTML template

~/.thunderbird/r1a4da81.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome/skin/common/printing/calMonthGridPrinter.html

to changes the box-heights as follows:

    height=140          # Month spans 6 weeks.
    height=165          # Month spans 5 weeks.

and change the fontsize in this entry:

     29       <tr id="item-template">
     30         <td valign="top" style="font-size: 10px; text-align: left;" class="category-color-box calendar-color-box">
     31           <span class="item-interval"/>
     32           <span class="item-title"/>
     33         </td>
     34       </tr>

Then I print at 100% scale and it fits exactly the way I want.
The above isn't a general fix, it just works when I print my calendar-grid.
If you have a longer list of entries in a day, the week will come out over-height, and the grid will spill off of the (11x17 landscape) page.

To automate this, as opposed to editing the calMonthGridPrinter.html template each time you print, the template would have to be re-parameterized depending on how many Sun-Sat weeks are spanned by the given month, not to mention that the Thunderbird+Lightning menus would have to ask whether you want this kind of sizing.
I've upgraded to

    Lighntning  6.2.2.1
    Thunderbird 60.2.1

and it looks like this file no longer exists:

    ~/.thunderbird/r1a4da81.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome/skin/common/printing/calMonthGridPrinter.html

I tried grep'ing through the files in my ~/.thunderbird directory, as well as looking at the thunderbird config menu, but haven't found any explicit settings for the font-size or the day-box height & width.
Can you tell me how to control these with the current thunderbird/lightning release?
There are no setting available to style that individually accept editing the template (like you already learned).

calMonthGridPrinter.html still exists, but Lightning isn't unpacked since that isn't supported anymore, so to edit the template, you would need to look for {e2fda1a4-762b-4020-b5ad-a41df1933103}.xpi (in your profile or in the app directory, dependends how you distribution provides Lightning). If you want to edit something, you need to extract that, do your changes and pack it again.

With bug 1498791, we have a similar bug for printing the week view.
I may give that a try. The printed calendar doesn't leave any room to pen-in appointments.
Is anyone looking at sizing the month-frame to fit the whole page, and then sizing the day-cells within that box?
Not at the moment. But we're happy to accept a patch, if you want to give it a try.
The problem is that I can insert some fixed parameters, but that doesn't solve the problem of automatically optimizing the size.
One thing I have to ask -- can you somehow expose this calMonthGridPrinter.html file in the future version?
So I don't have to uninstall/unpack/edit/repack/reinstall every time i want to change a parameter?

Here is what I would want to add:
(1) fit the calendar box to the whole page.
(2) use a uniform size of the daily box.
(3) use a smaller fixed-size font.
Having to hand-edit the control-file case-by-case was a pain before, and impossible now.
Could you point me to the file I would have to modify to make the patch?
Also suggest what variables I would have to read and set in order to calculate the sizings.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.