Closed Bug 1302069 Opened 8 years ago Closed 8 years ago

[PDF Viewer] Scaling PDF in print preview doesn't work since version 48

Categories

(Firefox :: PDF Viewer, defect)

48 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 52
Tracking Status
firefox48 --- wontfix
firefox49 --- wontfix
firefox50 + verified
firefox51 + verified
firefox52 --- verified

People

(Reporter: korn00rei, Assigned: yury, NeedInfo)

References

Details

(Keywords: regression, Whiteboard: [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixesfixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677 )

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160823121617

Steps to reproduce:

Hi,

I have an issue with the scaling feature before printing on Firefox 48.0.2. I have a long PDF without any page breaks and I have to scale it down to 70% to fit my a4 paper in the Firefox Print preview. It seems to stuck on fit to width of page. I was able to do this in previous versions of Firefox. It only affects PDF with the built in viewer. Webpages I'm able scale down. I have tried to reset Print settings on different computers and windows versions. Here's a link to the PDF. http://www.biggun.com.au/pdf/Big%20Gun%20Ad%20Week%20start%207.9.2016.pdf 



Expected results:

In the page setup at Print Preview there is a “shrink to fit page width” check box, In future versions it should include “Shrink oversized pages” like in Adobe Acrobat.
It's a regression in FF48:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=5582a25d289de681271efd51a75ce5392f4b1639&tochange=d9c26f4f5a3be0f1023238ab1d7e3932ba165b0b

Ryan VanderMeulen — Bug 1261352 - Update pdf.js to version 1.4.185. r=bdahl, r=Mossop

On the fly, I'd say it regressed by:
#7005 Fixes insertion of blank pages during print if page sizes differ
Blocks: 1261352
Status: UNCONFIRMED → NEW
Component: Untriaged → PDF Viewer
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → All
Summary: PDF's not scaling from version 48. → [PDF Viewer] Scaling PDF in print preview doesn't work since version 48
Tracking 51+ for this regression which dates back to 48.
Too late to fix in 49, sadly but we could still take a patch for 50.
Yury, can you please help investigate here? Doesn't look like Tim or Toby have BMO accounts.
Flags: needinfo?(ydelendik)
I looked into the issue. Current code is too fragile -- reverting back means reopening such as bug 1020878 and bug 972677, which makes printer to produces un-need blank pages.

I opened a pilot PR to make both issues go away https://github.com/mozilla/pdf.js/pull/7677 . There is a risk that something can be broken for some documents with different paper sizes than printer's or for different hardware/OSes. 


(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #3)
> Too late to fix in 49, sadly but we could still take a patch for 50.

If we can test and land it on m-c, I'll be happy to uplift it to beta/aurora.
Flags: needinfo?(ydelendik) → needinfo?(lhenry)
Thanks Yury, sounds like a good plan. You would need to request uplift to aurora and beta once you land and test a fix.
Flags: needinfo?(lhenry) → qe-verify+
Assignee: nobody → ydelendik
Whiteboard: [pdfjs-c-printing][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/7677
Bug 1308362 landed. 

Rares, can you help me to further test/verify if I got this right for this bug, bug 1020878 and bug 972677. Settings on print (preview) or page settings (e.g. ignore scale) matters.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(rares.bologa)
Resolution: --- → FIXED
Kanchan, please help us with this bug verification.
Flags: needinfo?(rares.bologa) → needinfo?(kkumari)
Attached image PrintPreview.PNG
Hello Yury, I tested on build from Bug 1308362. Bug 1020878 and bug 972677 are not reproducible anymore however I encountered some new issues 

1. Print preview Intermittently shows poor rendering
   e.g. http://petrucci.mus.auth.gr/imglnks/usimg/8/83/IMSLP234990-WIMA.6c49-Schubert_Ave-Maria-G-Dur-Soli.-Latin-Adaptation.pdf
   (For issue, see the attachment)

2. Shows blank page when scale option is changed on print preview page (e.g.        shrink to fit to 60%)

If you want I can file new bugs for these.
Flags: needinfo?(kkumari)
(In reply to Kanchan Kumari QA from comment #9)
> Created attachment 8798968 [details]
> PrintPreview.PNG
> 
> Hello Yury, I tested on build from Bug 1308362. Bug 1020878 and bug 972677
> are not reproducible anymore however I encountered some new issues 
> 
> 1. Print preview Intermittently shows poor rendering
>    e.g.
> http://petrucci.mus.auth.gr/imglnks/usimg/8/83/IMSLP234990-WIMA.6c49-
> Schubert_Ave-Maria-G-Dur-Soli.-Latin-Adaptation.pdf
>    (For issue, see the attachment)

mozPrintCallback is broken atm and it's hard to tell if it's bug 1308579 or bug 1308259. We can ignore any preview font display issues for simplicity of this bug.

> 
> 2. Shows blank page when scale option is changed on print preview page (e.g.
> shrink to fit to 60%)
> 
> If you want I can file new bugs for these.

They probably exist in some form or intermittent, but you can file them anyway with better STRs. Thank you.

I think it will be a good idea just to make sure we are fixing the initial problem(s) stated in this bug and not regressing the other.
Filed bug 1308642 and bug 1308643 for other issues.
> I think it will be a good idea just to make sure we are fixing the initial
> problem(s) stated in this bug and not regressing the other.

This is to confirm that the original problem stated in this bug has been fixed in m-c build but as stated above, I saw a couple of new issues in this area. It seems that both these issues (bug 1308642 and bug 1308643) are not regressions of this code fix because the same issues can be seen even in the released nightly build.

Whenever I get some bandwidth, I will try  to provide regression range for the above two defects (bug 1308642 and bug 1308643).
Attached patch Uplift for FF51Splinter Review
Approval Request Comment
[Feature/regressing bug #]: Bug 1261352
[User impact if declined]: pages will not be printed at size requested by a user
[Describe test coverage new/current, TreeHerder]: tested at m-c
[Risks and why]: low, printing of non-standard page sizes will change
[String/UUID change made/needed]: none

https://treeherder.mozilla.org/#/jobs?repo=try&revision=88e160b005f63e90833cc9ade362863130080193
Attachment #8799731 - Flags: review?(bdahl)
Attachment #8799731 - Flags: approval-mozilla-aurora?
Attached patch Uplift for FF50Splinter Review
Approval Request Comment
[Feature/regressing bug #]: Bug 1261352
[User impact if declined]: pages will not be printed at size requested by a user
[Describe test coverage new/current, TreeHerder]: tested at m-c
[Risks and why]: low, pdf printing of non-standard page sizes will change
[String/UUID change made/needed]: none

https://treeherder.mozilla.org/#/jobs?repo=try&revision=7f8c7c18e7f1717360df7dd620ff94d71ee55b35
Attachment #8799732 - Flags: review?(bdahl)
Attachment #8799732 - Flags: approval-mozilla-beta?
Whiteboard: [pdfjs-c-printing][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/7677 → [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677
Target Milestone: --- → Firefox 52
Attachment #8799731 - Flags: review?(bdahl) → review+
Attachment #8799732 - Flags: review?(bdahl) → review+
Hello there, could you please verify this issue is fixed as expected on a latest Nightly build? Thanks!
Flags: needinfo?(korn00rei)
Comment on attachment 8799731 [details] [diff] [review]
Uplift for FF51

Fix was verified on Nightly52, Aurora51+
Attachment #8799731 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment on attachment 8799732 [details] [diff] [review]
Uplift for FF50

Beta50+
Attachment #8799732 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Keywords: checkin-needed
Whiteboard: [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677 → [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixesfixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677 [checkin-needed-for-beta][checkin-needed-for-aurora]
https://hg.mozilla.org/releases/mozilla-aurora/rev/40f08404c1b1
Keywords: checkin-needed
Whiteboard: [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixesfixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677 [checkin-needed-for-beta][checkin-needed-for-aurora] → [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixesfixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677 [checkin-needed-for-beta]
https://hg.mozilla.org/releases/mozilla-beta/rev/f25b571379d0
Whiteboard: [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixesfixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677 [checkin-needed-for-beta] → [pdfjs-c-printing][pdfjs-f-fixed-upstream][fixesfixed for Fx52 in bug 1308362] https://github.com/mozilla/pdf.js/pull/7677
I can confirm "Big Gun Ad Week start 7.9.2016.pdf" scaled down to 70% fits the A4 paper. However this process is blocked by bug 1308643 and bug 1308461, the preview shows a blank page when scaling, it can be reproduced on : Fx 50.0b11, Fx 51.0a1 and Fx 52.0a2.
The workaround is to select the wanted scale(it will be blank, if the user prints the page, it will be a blank page) close the print preview and open it again(now the scaled page is displayed).

Cheers!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: