Last Comment Bug 323783 - Print to Ledger/Tabloid (11"x17") paper
: Print to Ledger/Tabloid (11"x17") paper
Status: RESOLVED FIXED
: fixed1.8.1.1
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: Trunk
: x86 Linux
: -- enhancement (vote)
: mozilla1.9alpha1
Assigned To: Carl Ponder
: Kenneth Herron
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-17 09:45 PST by Carl Ponder
Modified: 2006-12-03 16:55 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add tabloid paper size (1020 bytes, patch)
2006-03-06 14:41 PST, Philip Withnall (unavailable)
kherron+mozilla: review+
roc: superreview+
dveditz: approval1.8.1.1+
Details | Diff | Splinter Review
Tabloid PS file (55.06 KB, application/postscript)
2006-03-19 03:52 PST, Philip Withnall (unavailable)
no flags Details
Another tabloid PS file (173.38 KB, application/postscript)
2006-03-20 10:30 PST, Philip Withnall (unavailable)
no flags Details

Description Carl Ponder 2006-01-17 09:45:47 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

Firefox allows me to specify the paper sizes letter, legal, executive, a3, a4 & a5. It doesn't allow me the option of Ledger or Tabloid (I believe there are the names of the portrait vs. landscape orientations of 11x17", but am not absolutely sure).

Could you please add this? I imagine it's just a matter of adding the parameters to some configuration file. I doubt there will be any more paper types shoowing up anytime soon, so why not finish the job?


Reproducible: Always

Steps to Reproduce:
1. Select File -> Print
2. CLick on "Properties"
3. Click on "paper size" to see the list of available options.
Actual Results:  
Options are letter, legal, executive, a3, a4 & a5.

Expected Results:  
Expected Ledger or Tabloid to appear in the list.

I'd suggect adding it in the next drop, even if you can't test it extensively. I'll report bugs back as I find them.
Comment 1 Carl Ponder 2006-01-17 09:46:21 PST
Why not add "printing" as it's own component?
Comment 2 Nickolay_Ponomarev 2006-01-17 09:47:59 PST
That dialog is printer/OS-specific, no?
Comment 3 Carl Ponder 2006-01-17 10:13:31 PST
Here's what I have from Kenneth Heron:

Unfortunately, with the postscript printing support for unix, the list
of paper sizes is hardcoded. The file in question is
<http://lxr.mozilla.org/seamonkey/source/gfx/src/psshared/nsPaperPS.cpp>.
You could file a bug to add new paper sizes to that list, but it'd be a
while before any change made it into a release version. Of course, it'd
be nice to have a mechanism to let the user support custom paper sizes,
but we already have an RFE for that; see
<https://bugzilla.mozilla.org/show_bug.cgi?id=230220>.

As I interpret this, the dialog box is configured this way because FireFox recognizes that it is running in a UNIX/CUPS environment. However, FireFox has no capability to print to these paper dimensions; it's not that it doesn't receive the right parameters from the printer, it just doesn't have it.
Comment 4 Carl Ponder 2006-03-06 12:20:47 PST
Looking at the file

   http://lxr.mozilla.org/seamonkey/source/gfx/src/psshared/nsPaperPS.cpp

I'd assume that the only change needed is to add one line between 54 & 55:

46 const nsPaperSizePS_ nsPaperSizePS::mList[] =
 47 {
 48 #define SIZE_MM(x)      (x)
 49 #define SIZE_INCH(x)    ((x) * 25.4)
 50     { "A5",             SIZE_MM(148),   SIZE_MM(210),   PR_TRUE },
 51     { "A4",             SIZE_MM(210),   SIZE_MM(297),   PR_TRUE },
 52     { "A3",             SIZE_MM(297),   SIZE_MM(420),   PR_TRUE },
 53     { "Letter",         SIZE_INCH(8.5), SIZE_INCH(11),  PR_FALSE },
 54     { "Legal",          SIZE_INCH(8.5), SIZE_INCH(14),  PR_FALSE },
>>>     { "Tabloid",        SIZE_INCH(11),  SIZE_INCH(17),  PR_FALSE },
 55     { "Executive",      SIZE_INCH(7.5), SIZE_INCH(10),  PR_FALSE },
 56 #undef SIZE_INCH
 57 #undef SIZE_MM
 58 };

Could y'all please try this? I'm running Firefox 1.5; I'd be happy to test
a drop if you'd roll in this change. Or for that matter, if you add it to an
official drop and it passes all the other tests, I'd be willing to try to
debug this part of it...
Comment 5 Philip Withnall (unavailable) 2006-03-06 14:41:21 PST
Created attachment 214229 [details] [diff] [review]
Add tabloid paper size

Made and tried the change with CVS, and it appears to work (shows up in the print dialog, anyway: I have no tabloid paper with which to test it).
Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2006-03-06 14:46:25 PST
If the patch needs review, request it from the printing module owner.  That ain't  me, so I don't know how I ended up in the QA contact field.
Comment 7 Philip Withnall (unavailable) 2006-03-06 14:50:16 PST
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

On the one hand, methinks it should go in printing, but then on the other hand, methinks it should go into HTML/PS translation because it's in that directory.
Comment 8 Carl Ponder 2006-03-06 20:55:22 PST
(In reply to comment #5)
> 
> Made and tried the change with CVS, and it appears to work (shows up in the
> print dialog, anyway: I have no tabloid paper with which to test it).
> 

Phil -- could you print the tabloid page to a PostScript file, and mail it to me at "ponder@austin.ibm.com"? Set preferences to "Shrink to fit page width" and set the paper size to "Tabloid" in the print->properties menu. I can check if the file is formatted correctly for the page size.
Comment 9 Philip Withnall (unavailable) 2006-03-18 14:25:37 PST
(In reply to comment #8)
> (In reply to comment #5)
> > 
> > Made and tried the change with CVS, and it appears to work (shows up in the
> > print dialog, anyway: I have no tabloid paper with which to test it).
> > 
> 
> Phil -- could you print the tabloid page to a PostScript file, and mail it to
> me at "ponder@austin.ibm.com"? Set preferences to "Shrink to fit page width"
> and set the paper size to "Tabloid" in the print->properties menu. I can check
> if the file is formatted correctly for the page size.
> 

I'm afraid I can't. :(
Firefox 1.6a crashes when printing to PS for me at the moment. You could try applying the patch to the CVS source yourself and building to test printing...
Comment 10 Carl Ponder 2006-03-19 01:47:21 PST
Yikes! I think I'd rather wait. I'd really like to get this into an official drop of Firefox as soon as possible; would there be a window where your PostScript printing will start working again and I can test the output, before you release the next version?
Comment 11 Philip Withnall (unavailable) 2006-03-19 03:52:05 PST
Created attachment 215569 [details]
Tabloid PS file

Odd...Firefox crashes when trying to print a page such as this one to file, but is fine with something like Google. I'll have to look into this.
Regardless, the PS file is attached. :)
Comment 12 Carl Ponder 2006-03-20 07:16:38 PST
Phil -- so far so good -- the paper is oriented "portrait" (11" across and 17" high) with the "Google" stuff centered at the top of the page. Would you be able to run a Google search, with 100 results on the page (set this in the search Preferences), and print that to a PostScript file that I can test? That way I can see how the stuff ends up splitting across the pages.
Comment 13 Philip Withnall (unavailable) 2006-03-20 10:30:48 PST
Created attachment 215673 [details]
Another tabloid PS file

Here you go. :)
Comment 14 Carl Ponder 2006-03-20 11:21:39 PST
The space is being used correctly, so the search result fits just the way it should on the Tabloid. This particular page only has 10 entries so there isn't anything to split onto the next page, and I can't confirm whether the page-splits are happening right.

Regardless, this looks great! What will it take to get it into an official release? Can you get it into a beta that I can test? Or just release it as a "not fully supported" feature?
Comment 15 Philip Withnall (unavailable) 2006-03-20 11:35:57 PST
I'm just a bug triager; I have no control over what happens to patches. At the moment, this patch is waiting for a review. Once it has been review-approved, it'll have to be super-reviewed, and then somebody'll have to check it into CVS.
I'll look into it. ;)
Comment 16 Kenneth Herron 2006-08-02 16:43:16 PDT
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

Carl, sorry for not getting to this sooner. I haven't had any time for mozilla this year (and the requestee you set was an old account I don't use any more).
Comment 17 Nickolay_Ponomarev 2006-08-10 08:19:11 PDT
Technically, you need an sr now, but I'm not sure what is the deal with printing code and whether you need a real sr for such a simple change. You can go ask in #developers or just pick a super-reviewer and ask him for sr.

After you figured that out, add [checkin needed] to the status whiteboard to get the patch checked into the tree.
Comment 18 Carl Ponder 2006-10-10 19:19:13 PDT
So far it looks like you all think the fix is okay, but none of you have the authority to apply the patch, correct? Who do I have to nag to get this to happen?
Thanks...
Comment 19 Nickolay_Ponomarev 2006-10-11 03:12:39 PDT
I have no idea whether the fix is correct, I'm just telling you what the process for getting fixes in is.

Usually in core code two reviews are needed before one can commit the patch. However, since this is a simple change -and- it's printing code, I'm not sure the second review is required.

Which is why I suggested to go to #developers on irc.mozilla.org and try getting someone to sr or check this in.
Comment 20 Robert O'Callahan (:roc) (email my personal email if necessary) 2006-10-19 10:24:45 PDT
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

get someone on irc.mozilla.org #developers to check this in for you.
Comment 21 Kenneth Herron 2006-10-23 10:36:52 PDT
Checked in:

/cvsroot/mozilla/gfx/src/psshared/nsPaperPS.cpp,v  <--  nsPaperPS.cpp
new revision: 1.2; previous revision: 1.1

Thanks for the patch, Carl!
Comment 22 Carl Ponder 2006-10-24 04:02:57 PDT
Kenneth -- does this mean it will show up in the next distribution?
And if so, is this FireFox, SeaMonkey, or both?
Comment 23 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-10-24 07:56:07 PDT
(In reply to comment #22)
> Kenneth -- does this mean it will show up in the next distribution?
> And if so, is this FireFox, SeaMonkey, or both?

Carl: It was checked in on the trunk, which means it will be in SeaMonkey 1.5 and Firefox 3. It could potentially land for Firefox 2.0.0.1/SeaMonkey 1.1 if you ask for approval 1.8.1.1, although minor dot releases are usually focused primarily on low-risk, high gain security or stability fixes. If you can make the case that this is high-gain, I'd say go ahead and ask :)
Comment 24 Kenneth Herron 2006-10-26 12:32:31 PDT
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

Requesting approval to check in on either or both of these branches. This patch just adds a paper size to the standard list used for printing on unix/linux.
Comment 25 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-10-26 12:34:48 PDT
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

There is only one branch - MOZILLA_1_8_BRANCH is going to be used for both the 1.8.1 release and 1.8.1.x dot releases. Since 1.8.1 has shipped, the approval1.8.1? flag is no longer applicable.
Comment 26 Daniel Veditz [:dveditz] 2006-11-27 18:01:12 PST
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

Does this require any localized string additions?

approved for 1.8 branch, a=dveditz for drivers (unless there are locale changes required)
Comment 27 Kenneth Herron 2006-12-03 16:44:09 PST
No localization changes are needed. Checked in on the MOZILLA_1_8_BRANCH branch.

Note You need to log in before you can comment on or make changes to this bug.