Change default paper size to A4
Categories
(Firefox for Android :: General, enhancement)
Tracking
()
People
(Reporter: schnusch, Assigned: cswilson252)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
Steps to reproduce:
Use Firefox for Android's "Save as PDF".
Actual results:
The produced PDF has US letter paper size.
Expected results:
The A4 is internationally standardized and more widely used, see https://en.wikipedia.org/wiki/Paper_size#/media/File:Prevalent_default_paper_size.svg.
| Reporter | ||
Comment 1•3 years ago
|
||
These seem to be the relevant changes:
--- a/widget/src/xpwidgets/nsPrintSettingsImpl.cpp Thu Mar 22 10:30:00 2007 -0700
+++ b/widget/src/xpwidgets/nsPrintSettingsImpl.cpp Tue Dec 27 21:40:17 2022 +0100
@@ -66,9 +66,9 @@
mPrintPageDelay(500),
mPaperData(0),
mPaperSizeType(kPaperSizeDefined),
- mPaperWidth(8.5),
- mPaperHeight(11.0),
- mPaperSizeUnit(kPaperSizeInches),
+ mPaperWidth(210),
+ mPaperHeight(297),
+ mPaperSizeUnit(kPaperSizeMillimeters),
mPrintReversed(PR_FALSE),
mPrintInColor(PR_TRUE),
mOrientation(kPortraitOrientation),```
| Reporter | ||
Comment 2•3 years ago
|
||
...or rather:
--- a/widget/nsPrintSettingsImpl.h Tue Dec 27 05:07:30 2022 +0000
+++ b/widget/nsPrintSettingsImpl.h Wed Dec 28 00:02:32 2022 +0100
@@ -110,9 +110,9 @@
nsString mFooterStrs[NUM_HEAD_FOOT];
nsString mPaperId;
- double mPaperWidth = 8.5;
- double mPaperHeight = 11.0;
- int16_t mPaperSizeUnit = kPaperSizeInches;
+ double mPaperWidth = 210;
+ double mPaperHeight = 297;
+ int16_t mPaperSizeUnit = kPaperSizeMillimeters;
bool mPrintReversed = false;
bool mPrintInColor = true;```
I seem to have used a very ancient revision of mozilla-central.
Updated•2 years ago
|
| Assignee | ||
Updated•21 days ago
|
| Assignee | ||
Comment 3•12 days ago
|
||
Probably makes more sense to do this browser-wide, since nsPrintSettingsImpl.h is browser-wide, and AFAIK GV does not set overrides for default paper size.
| Assignee | ||
Updated•12 days ago
|
Comment 4•11 days ago
|
||
(In reply to Charlotte Wilson [:cswilson252] from comment #3)
Probably makes more sense to do this browser-wide, since
nsPrintSettingsImpl.his browser-wide, and AFAIK GV does not set overrides for default paper size.
I'm not sure what GV is refering to, but from a quick look, all platforms other than Android seem to be handling this properly. It seems sensible to apply a narrow fix to Android rather than touching all platforms, but I could be convinced otherwise with the appropriate patch and testing.
| Assignee | ||
Comment 5•11 days ago
|
||
(In reply to Stephen A Pohl [:spohl] from comment #4)
(In reply to Charlotte Wilson [:cswilson252] from comment #3)
Probably makes more sense to do this browser-wide, since
nsPrintSettingsImpl.his browser-wide, and AFAIK GV does not set overrides for default paper size.I'm not sure what
GVis refering to, but from a quick look, all platforms other than Android seem to be handling this properly. It seems sensible to apply a narrow fix to Android rather than touching all platforms, but I could be convinced otherwise with the appropriate patch and testing.
Sorry, "GV" was referring to GeckoView :).
I'll see what I can do in terms of updating this on Android.
Description
•