Open Bug 1711659 Opened 3 years ago Updated 2 years ago

The content in print preview is very small and the scale settings does not work

Categories

(Firefox :: PDF Viewer, defect, P3)

defect

Tracking

()

Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- affected
firefox89 --- wontfix
firefox90 --- wontfix
firefox91 --- wontfix
firefox92 --- wontfix
firefox93 --- fix-optional

People

(Reporter: csasca, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [pdfjs-printing])

Attachments

(1 file)

Affected versions

  • Firefox 89.0b13
  • Firefox 90.0a1

Affected platforms

  • Ubuntu 20.04
  • macOS 11.3.1
  • Windows 10

Steps to reproduce

  1. Launch Firefox
  2. Access this pdf sample
  3. Select print
  4. Change the Scale value

Expected result

  • The page is stretched and easily visible and the scale settings changes for each entered value

Actual result

  • The content is very small and the scale settings does not work.

Regression range

  • Seems to be a regression, a good build is from 2020-12-20, will see for an exact regression.

Additional notes

  • The issue can be seen in the attachment
  • This happens with old ui and new ui
Has Regression Range: --- → no
Has STR: --- → yes
QA Whiteboard: [qa-regression-triage]

The video doesn't seem to be playable fwiw.

Flags: needinfo?(catalin.sasca)

I did a recording on macOS too and uploaded it on gdrive. Here's the attachment.

Flags: needinfo?(catalin.sasca)

Mozregression pointed the regression between 2021-04-02 and 2021-04-03 with the following bug being the culprit:
Bug 1702796 - Update pdf.js to version 2.8.320
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=f0995e7b318af33c677fe0c0cae6616a6d8dfb3d&tochange=6754c6b70539e3cb7313cb5412f049a6e35a3aba

Has Regression Range: no → yes

Brendan, Calixte, do you have an idea what could be the cause? Maybe https://github.com/mozilla/pdf.js/pull/13145?

Component: Printing: Setup → PDF Viewer
Flags: needinfo?(cdenizet)
Flags: needinfo?(bdahl)
Product: Core → Firefox
Regressed by: 1702796

When the scale factor is between 1 and 63, the factor is applied and we can see the effect on the print preview (even if it isn't super fast).
After 63 the scaling is kind of blocked because of (or thanks to):
https://github.com/mozilla/pdf.js/pull/13145/files#diff-d1047e1376717fbe7c554bb385cd48b2dcbbb135e02884be3db97ad072ba741eR1776-R1777
and I guess it's to avoid some overflows.
About The content in print preview is very small: it's just a preview so I don't really know what we can do.
Anyway I compared with chrome preview and the size is almost the same but the fonts look a way better.

Flags: needinfo?(cdenizet)
Flags: needinfo?(bdahl)
Priority: -- → P3
Whiteboard: [pdfjs-c-printing]
Whiteboard: [pdfjs-c-printing] → [pdfjs-printing]

I just noticed that this bug (the PDF print-scaling failure discussed here) effectively breaks our workaround for bug 1693989 -- the workaround that I discussed at the end of bug 1693989 comment 8, regarding testcase 1 there.

(context: bug 1693989 is about the fact that, if you have a PDF that places some content very close to the edge of the paper, and you try to print it to a physical printer, then the close-to-the-edges content will be missing/clipped due the printer's inability to draw to that region. For a short period of time, Nightly users could work around that by e.g. reducing scale to 90% (for example) in the Firefox print dialog. But as of the PDF.js update in bug 1702796 [the regressor here], that doesn't work anymore, unless they choose a very small scale like e.g. 60%.)

Hence: I'm setting this bug as a blocker for bug 1693989; we need to fix this bug as a prereq to fixing bug 1693989, I think.

Blocks: 1693989

Can you elaborate? Using custom margins works in the test-case for bug 1693989 for example.

Depends on: 1795258
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: