Closed Bug 1659527 Opened 1 year ago Closed 1 year ago

Bad scaling and clipping of Save to PDF output [was: Erratic glyph spacing in Save As PDF output] on Windows

Categories

(Core :: Printing: Output, defect, P1)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- unaffected
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [print2020_v81][old-ui+])

Attachments

(4 files)

Looking at a PDF generated via Save As PDF on Windows, I'm seeing much inferior glyph spacing (some glyphs too crowded, others with gaps between) compared to the same document saved via Microsoft Print to PDF.

FWIW, I tried the same page on macOS, and the Save As PDF output looks much better there.

Jonathan, how does this relate to bug 1662820?

Flags: needinfo?(jfkthame)
Whiteboard: [print2020]

Hmm, sounds like it may be the same thing. Leaving needinfo until I re-test this....

Trying to reproduce this, I'm now getting incorrectly scaled PDF output (looks fine in Preview but is oversized and clipped in the output). Most likely a regression from bug 1662820, I guess. :(

Flags: needinfo?(jfkthame)

Ugh, that got uplifted to beta 81. Presumably the output with print.tab_modal.enabled set to false has also been broken?

No, this only affects Save to PDF output, which isn't exposed as a destination via the old UI. So AFAICS that's not an issue.

It is exposed via the Web Extensions API. We may have broken Save to PDF for dw-dev, for example.

Flags: needinfo?(dw-dev)

Yes, I can confirm that Save As PDF from Print Edit WE is broken. I will test both a backout and a possible fix shortly (once my windows build is ready).

Confirmed that backing out bug 1662820 fixes the bad scaling of Save to PDF output (but reintroduces the bad glyph spacing, as seen both in preview and the actual PDF output).

The real fix is that we also need to update nsDeviceContextSpecWin::GetPrintingScale to reflect the DPI value we're using. Patch coming after one more re-test locally...

Severity: -- → S2
OS: Unspecified → Windows
Priority: -- → P1
Regressed by: 1662820
Summary: Erratic glyph spacing in Save As PDF output on Windows → Bad scaling of Save to PDF output [was: Erratic glyph spacing in Save As PDF output] on Windows
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Whiteboard: [print2020] → [print2020_v81][old-ui+]
Summary: Bad scaling of Save to PDF output [was: Erratic glyph spacing in Save As PDF output] on Windows → Bad scaling and clipping of Save to PDF output [was: Erratic glyph spacing in Save As PDF output] on Windows

Comment on attachment 9174673 [details]
Bug 1659527 - [for beta-81] Back out m-c changeset c7c18b456034 (bug 1662820) for regressing scaling in Save as PDF output. r=jwatt

Beta/Release Uplift Approval Request

  • User impact if declined: Extensions that provide save-to-pdf functionality will create broken and clipped PDFs on Windows.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Backout. Reverts us to the previous code.
  • String changes made/needed:
Attachment #9174673 - Flags: approval-mozilla-beta?
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ebc35a7e152
Correct scaling for Save to PDF output on Windows to reflect DPI setting. r=jwatt,emilio

Comment on attachment 9174673 [details]
Bug 1659527 - [for beta-81] Back out m-c changeset c7c18b456034 (bug 1662820) for regressing scaling in Save as PDF output. r=jwatt

Approved for 81.0b9.

Attachment #9174673 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Flags: needinfo?(dw-dev)
You need to log in before you can comment on or make changes to this bug.