Closed Bug 640449 Opened 13 years ago Closed 5 years ago

Save as PDF produces incorrect page size (6.67 x 11.11)

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: patrickhwood, Unassigned)

Details

(Keywords: helpwanted, mobile)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
Build Identifier: Mozilla/5.0 (Android; Linux amv7; rv:2.0b13pre) Gecko/20110309 Firefox/4.0b13pre Fennec/4.0b6pre

Save as PDF on Android Fennec generates the wrong page size (6.67 x 11.11 inches according to Acrobat Reader).  The size should be 8.5 x 11 (letter).  Linux and Windows desktop Fennec emulator produces 8.5 x 11 pages.

printSettings.paperWidth and printSettings.paperHeight) are correct prior to calling webBrowserPrint.print(printSettings, listener); in chrome/content/content.js.

Observed in beta 4, beta 5, and latest nightly build.

Reproducible: Always

Steps to Reproduce:
1. Go to any page (about:home is fine).
2. Select "Save as PDF"
3. Pull file to host (adb -d pull /sdcard/download/"Fennec Start.pdf" .
4. Open file in acrobat reader, check page size.
Actual Results:  
Acrobat reader reports page size as 6.67x11.11 instead of 8.5x11.

Expected Results:  
Acrobat reader should report page size as 8.5x11.

Desktop Fennec simulator produces 8.5x11 inch page as expected.
OS: Other → Android
Product: Firefox → Fennec
Hardware: Other → ARM
Version: unspecified → Trunk
URL: any
QA Contact: general → general
Screen capture of msnbc.com web site from Dell Streak (480x800); see also msnbc.pdf file, which shows the PDF saved from this site with clipped right-hand side of the page.  Observed in latest nightly build (fennec-6.0a1.en-US.eabi-arm.apk 21-Apr-2011 04:58).
See description of msnbc.png attachment.
I was able to reproduce the "page size" issue on: 
Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110902 Firefox/9.0a1 Fennec/9.0a1
Device: HTC Desire
OS: Android 2.2

I cannot reproduce the "clipped page" issue mentioned in comment #2.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I believe that the two problems I originally reported are interrelated: the PDF page size corresponds to the screen size on the two Android devices I used for testing (480x800); however, it should probably be either letter or A4.  Several printers balked when I tried to print the page, requiring manual intervention.

Clipped pages only occur on some web sites, perhaps those that perform some kind of automagic scaling to the screen width.
A Motorola Xoom user reported the "right side clipped" page issue on SUMO this week, see https://support.mozilla.com/en-US/questions/885674
firefox18.0 on Android
When we save to PDF the size reported by evince is 169 × 282 mm
In Firefox 45.0:

I still get 6.67" x 11.11" with Page > Save as PDF (DownloadPDFSaver.execute in DownloadCore.jsm)

I also get 6.67" x 11.11" with Page > Print (new generatePDF function in PrintHelper.js)

The main differences between the two appears to be:

(1) These two properties are true for Save as PDF and false for Print: printSettings.printBGImages, printSettings.printBGColors

(2) Save as PDF clears the headers and footers.

Neither function sets an output paperHeight, paperWidth, or paperSizeUnit. However, I don't know whether that would make any difference -- setting the equivalent preferences in about:config doesn't appear to have any effect.
Closing all opened bug in a graveyard component
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: