Closed Bug 1271900 Opened 8 years ago Closed 8 years ago

Firefox prints with wrong size when either size is less than inch.

Categories

(Core :: Printing: Output, defect)

46 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla49
Tracking Status
firefox46 - wontfix
firefox47 - fixed
firefox48 - fixed
firefox49 --- verified

People

(Reporter: r.chrzanowski, Assigned: bobowen)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached image Bez tytułu.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160502172042

Steps to reproduce:

Set either
print.printer_PDFCreator.print_paper_height
or 
print.printer_PDFCreator.print_paper_width
to less than 25.4
when
print.printer_PDFCreator.print_paper_size_unit = 1

or to less than 1 
when
print.printer_PDFCreator.print_paper_size_unit = 0

resulting in desired page size less than inch.
Open print preview by chosing print option from menu or print by ctrl+p.


Actual results:

Preview shows a page with dimensions higher than intended.
Page prints with dimensions higher than intended.


Expected results:

Preview should have shown a page with desired dimensions.
Page should have been printed with desider dimensions.
Component: Untriaged → Printing: Output
Product: Firefox → Core
Was it intended to don't allow small print? What would be the reason?
It's important when printing small stickers using Firefox.
(In reply to r.chrzanowski from comment #1)
> Was it intended to don't allow small print? What would be the reason?
> It's important when printing small stickers using Firefox.

It was to prevent problems with people incorrectly setting prefs.
25.4 mm was chosen as it appeared to be the minimum on at least a couple of printers that allowed custom sizes, including PDFCreator (when you choose PostScript custom page size).

However if this is causing a problem I can change this back to just testing for > 0.
Assignee: nobody → bobowen.code
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
[Tracking Requested - why for this release]:
Whoops.

[Tracking Requested - why for this release]:
Regressed by bug 1238964, which landed in Firefox 46.
Thanks for quick answer. I'd be glad if that was reverted as it affects sticker/label printers, slide printers etc. 
And as shown on png file I have attached the resulting sizes are bit weird.
(In reply to r.chrzanowski from comment #5)
> Thanks for quick answer. I'd be glad if that was reverted as it affects
> sticker/label printers, slide printers etc. 
> And as shown on png file I have attached the resulting sizes are bit weird.

No problem.
The height will be reverting back to whatever the paper size specifies.
Sorry for the inconvenience caused.

I'm slightly surprised that the old code worked when setting these sorts of custom sizes, because in one place it used to mistakenly store the values in the DEVMODE (Windows printer device data structure) in tens of millimetres instead of tenths of millimetres.

Anyway, should have a fix in soon, would you be prepared to test this in Nightly once it lands?
Both height and width I hope. :)
Old code worked but we had to multiply our dimensions by 100 in our printing addon in Firefox <= 45.

Yes, I will be able to test it as I'm testing our addon in each version anyway. Unfortunately I have missed that one change. Is there any workaround to it besides using ESR?
(In reply to r.chrzanowski from comment #7)
> Both height and width I hope. :)

I was referring to the .99 inch x 1 inch example and paper size as in A4, Letter etc.
I will fix both. :-)

> Old code worked but we had to multiply our dimensions by 100 in our printing
> addon in Firefox <= 45.

Ah, that explains it, you'll be able to use the proper dimensions (once this is fixed).
What is your addon, by the way, so I can use it for testing?
 
> Yes, I will be able to test it as I'm testing our addon in each version
> anyway. Unfortunately I have missed that one change. Is there any workaround
> to it besides using ESR?

I'm afraid I don't think there is, sorry.
It should definitely get into Firefox 47, but the only chance of getting it into 46 is if we have to do another dot release for some other reason, after this has landed.
Keywords: regression
I'm sorry, it's commercial one so I'm not allowed to show it but effects are the same as when printing or showing preview without it.
I'm glad to hear it will get to Firefox 47 and I will be able check the change soon.
Thank you for your help. :)
Blocks: 1238964
Comment on attachment 8751205 [details]
MozReview Request: Bug 1271900: Don't require a minimum page size when setting up DEVMODE from print settings. r?jimm

https://reviewboard.mozilla.org/r/51907/#review48815
Attachment #8751205 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/338091f5c27b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Comment on attachment 8751205 [details]
MozReview Request: Bug 1271900: Don't require a minimum page size when setting up DEVMODE from print settings. r?jimm

Nominating for release as well in case we have a dot release.

Approval Request Comment
[Feature/regressing bug #]:
Regressed by bug 1238964.

[User impact if declined]:
Users will continue to be unable to print very small page sizes via setting prefs.
This is done by some addons.

[Describe test coverage new/current, TreeHerder]:
Tested manually using printer drivers for a label printer.
Should have original reporter testing soon.

[Risks and why]: 
Low - very simple code change that removes lower limit on page size, which is more similar to previous code.

[String/UUID change made/needed]:
None.
Attachment #8751205 - Flags: approval-mozilla-release?
Attachment #8751205 - Flags: approval-mozilla-beta?
Attachment #8751205 - Flags: approval-mozilla-aurora?
Looks ok, I was able to print with very small dimensions in Nightly, thank you.
Comment on attachment 8751205 [details]
MozReview Request: Bug 1271900: Don't require a minimum page size when setting up DEVMODE from print settings. r?jimm

Regression from 46, has had manual testing on nightly. Please uplift to aurora and beta.
Attachment #8751205 - Flags: approval-mozilla-beta?
Attachment #8751205 - Flags: approval-mozilla-beta+
Attachment #8751205 - Flags: approval-mozilla-aurora?
Attachment #8751205 - Flags: approval-mozilla-aurora+
This doesn't seem like a release blocker. No need to track it.
Wontfix for 46, we haven't had another driver for a 46.0.2 and it's only a couple of weeks till the 47 release, where this will be fixed (June 7th)
Comment on attachment 8751205 [details]
MozReview Request: Bug 1271900: Don't require a minimum page size when setting up DEVMODE from print settings. r?jimm

Clearing the m-r flag as 46 will EOL in a week and this fix is already in Beta47.
Attachment #8751205 - Flags: approval-mozilla-release?
You need to log in before you can comment on or make changes to this bug.