Closed Bug 323783 Opened 19 years ago Closed 18 years ago

Print to Ledger/Tabloid (11"x17") paper

Categories

(Core :: Printing: Output, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: CarlPonder, Assigned: CarlPonder)

Details

(Keywords: fixed1.8.1.1)

Attachments

(3 files)

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.
Why not add "printing" as it's own component?
That dialog is printer/OS-specific, no?
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.
Status: UNCONFIRMED → NEW
Component: General → OS Integration
Ever confirmed: true
Summary: Print web-pages to Ledger/Tabloid (11x17 inch) paper → Print to Ledger/Tabloid (11"x17") paper
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...
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).
Attachment #214229 - Flags: review?
Component: OS Integration → Printing
Flags: review?
Product: Firefox → Core
QA Contact: general → bzbarsky
Version: unspecified → Trunk
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.
Attachment #214229 - Flags: review?(bzbarsky)
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.
Attachment #214229 - Flags: review?(bzbarsky) → review?(kherron)
QA Contact: bzbarsky → kherron
(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.
(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...
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?
Attached file 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. :)
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.
Here you go. :)
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?
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. ;)
Status: NEW → ASSIGNED
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).
Attachment #214229 - Flags: review?(kherron) → review+
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.
Assignee: nobody → ponder
Status: ASSIGNED → NEW
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...
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.
Attachment #214229 - Flags: superreview?(roc)
Comment on attachment 214229 [details] [diff] [review]
Add tabloid paper size

get someone on irc.mozilla.org #developers to check this in for you.
Attachment #214229 - Flags: superreview?(roc) → superreview+
Whiteboard: [checkin needed]
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!
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Kenneth -- does this mean it will show up in the next distribution?
And if so, is this FireFox, SeaMonkey, or both?
(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 :)
Target Milestone: --- → mozilla1.9alpha
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.
Attachment #214229 - Flags: approval1.8.1?
Attachment #214229 - Flags: approval1.8.1.1?
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.
Attachment #214229 - Flags: approval1.8.1?
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)
Attachment #214229 - Flags: approval1.8.1.1? → approval1.8.1.1+
No localization changes are needed. Checked in on the MOZILLA_1_8_BRANCH branch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: