PDF with annotations is incorrectly printed from Win XP

NEW
Assigned to

Status

()

P3
normal
5 years ago
a month ago

People

(Reporter: petruta.rasa, Assigned: bas.schouten)

Tracking

({regression})

Trunk
x86
Windows XP
regression
Points:
---

Firefox Tracking Flags

(firefox26 unaffected, firefox27+ wontfix, firefox28+ wontfix, firefox29+ wontfix, firefox30 affected)

Details

(Whiteboard: [pdfjs-c-integration][pdfjs-d-printing])

Attachments

(2 attachments)

Created attachment 8359791 [details]
annotations print

Reproducible on:
latest Nightly (20140113030203)
Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 
latest Aurora (20140114004002)
Mozilla/5.0 (Windows NT 5.1; rv:28.0) Gecko/20100101 Firefox/28.0 
Firefox 27 beta 6 (20140113161826)
Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 

Steps to reproduce:
1. Launch Firefox
2. Open http://mozqa.com/data/firefox/pdf/annotationsAndOutline.pdf
3. Select to print the file and verify the output

Expected results: 
The pdf is correctly printed.

Actual results: 
The text is jerky, please see the attachment.

Notes:
1. The issue is not reproducible with Firefox 19 and Firefox 26
2. The issue is reproducible with Firefox 27 beta 1 (recent regression)
3. No printing issues with another pdfs with annotations such as https://bug741239.bugzilla.mozilla.org/attachment.cgi?id=611315 or https://bug741239.bugzilla.mozilla.org/attachment.cgi?id=778613

Updated

5 years ago
Keywords: regression
status-firefox26: --- → unaffected
status-firefox27: --- → affected
status-firefox28: --- → affected
status-firefox29: --- → affected
tracking-firefox27: --- → ?
Keywords: regressionwindow-wanted
tracking-firefox28: --- → ?
tracking-firefox29: --- → ?
NI on :bdahl to help with investigation.
Flags: needinfo?(bdahl)
Please find the regression range:
Last good revision: 9f8233fcce1d <2013-10-25>
First bad revision: ef3f5669b53e <2013-10-26>
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9f8233fcce1d&tochange=ef3f5669b53e

I had issues when I tried to bisect further: "Exception WindowsError: (2, 'The system cannot find the file specified', u'firefox-27.0a1.en-US.win32.zip') in <bound method FirefoxNightly.cleanup of <mozregression.runnightly.FirefoxNightly object at 0x0132C070>> ignored".

Please let me know if there is anything else I can help with.
Keywords: regressionwindow-wanted
tracking-firefox27: ? → +
tracking-firefox28: ? → +
tracking-firefox29: ? → +
bdahl, any luck to reproducing this?
Yes. I haven't tried removing the changes but it's highly likely this regression came from Bug 811002 which is in the above change log. I'll try to revert these changes and try things out tomorrow.
Flags: needinfo?(bdahl)
(In reply to Brendan Dahl [:bdahl] from comment #4)
> Yes. I haven't tried removing the changes but it's highly likely this
> regression came from Bug 811002 which is in the above change log. I'll try
> to revert these changes and try things out tomorrow.

we are going to go-to-build with one of our final beta for Desktop today, should i consider this as a wontfix in that case for this cycle ?

Do we understand what kind of pdf's are impacted, would this be a common use case?
Flags: needinfo?(bdahl)
I would consider this a won't fix for this cycle. As for which pdfs are affected, this is currently the only pdf I know that exhibits this issue.

My windows build is finally working again, so I should be able to verify the regression commit in a few hours.
Flags: needinfo?(bdahl)
I can confirm part 1 of bug 811002 causes the regression.

Bas, any ideas here? Does this cause a different font engine to be used?
Blocks: 811002
Flags: needinfo?(bas)
(Assignee)

Comment 8

5 years ago
(In reply to Brendan Dahl [:bdahl] from comment #7)
> I can confirm part 1 of bug 811002 causes the regression.
> 
> Bas, any ideas here? Does this cause a different font engine to be used?

To some extent, yes, fixing this bug caused us to actually print text as text, rather than bitmaps (i.e. it draws them with the GDI font engine (when printing), rather than as bitmaps retrieved from our font engine).
Flags: needinfo?(bas)
status-firefox27: affected → wontfix
Priority: -- → P2
Whiteboard: [pdfjs-c-integration][pdfjs-d-printing]
BTW windows computers with hardware acceleration are unaffected.
Brendan, we still have a couple of weeks of FF28 on Beta where we can take slightly more speculative fixes and/or a backout - can you update on your progress here?
status-firefox30: --- → affected
Flags: needinfo?(bdahl)
I've made no progress. Gfx on windows is outside my expertise and I don't think I'll be able to find a solution without spending a significant amount of time.

If someone from gfx can look into this, that would be ideal. Otherwise, I suggest we back out the patch and regress the quality of print output.
Flags: needinfo?(bdahl)
Milan can you help get some gfx expertise on this?
Flags: needinfo?(milan)
Yes, but it will take a while, as mentioned in the platform meeting.  I will leave needinfo on me.
This will have to remain unfixed in FF28 as we are now wrapping up the beta cycle.
status-firefox28: affected → wontfix
Bas, can you take a look at this?  Let's see if we can get a trunk fix and then how well it uplifts to 29.  It'd probably be good to do it before the work week if possible.
Assignee: nobody → bas
Flags: needinfo?(milan)
(Assignee)

Comment 16

5 years ago
(In reply to Petruta Rasa [QA] [:petruta] from comment #0)
> Created attachment 8359791 [details]
> annotations print
> 
> Reproducible on:
> latest Nightly (20140113030203)
> Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 
> latest Aurora (20140114004002)
> Mozilla/5.0 (Windows NT 5.1; rv:28.0) Gecko/20100101 Firefox/28.0 
> Firefox 27 beta 6 (20140113161826)
> Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 
> 
> Steps to reproduce:
> 1. Launch Firefox
> 2. Open http://mozqa.com/data/firefox/pdf/annotationsAndOutline.pdf
> 3. Select to print the file and verify the output
> 
> Expected results: 
> The pdf is correctly printed.
> 
> Actual results: 
> The text is jerky, please see the attachment.
> 
> Notes:
> 1. The issue is not reproducible with Firefox 19 and Firefox 26
> 2. The issue is reproducible with Firefox 27 beta 1 (recent regression)
> 3. No printing issues with another pdfs with annotations such as
> https://bug741239.bugzilla.mozilla.org/attachment.cgi?id=611315 or
> https://bug741239.bugzilla.mozilla.org/attachment.cgi?id=778613

I can't reproduce a problem with this file on windows 7 with Direct2D turned off, every way I print this it looks fine to me.. could we get a scan pointing out what exactly I'm looking for?
Created attachment 8397701 [details]
d2dOnAndOff.pdf

(In reply to Bas Schouten (:bas.schouten) from comment #16)
> I can't reproduce a problem with this file on windows 7 with Direct2D turned
> off, every way I print this it looks fine to me.. could we get a scan
> pointing out what exactly I'm looking for?

The attachment added in 14th Jan is a scan copy of the file printed from Win XP.

I retested using latest Nightly (20140326030203) under Win 7 64-bit. Please see the new attachment with two pages representing the scan with the pref gfx.direct2d.disabled set to true and false. (I'm hoping this is the correct pref)
(Assignee)

Comment 18

5 years ago
(In reply to Petruta Rasa [QA] [:petruta] from comment #17)
> Created attachment 8397701 [details]
> d2dOnAndOff.pdf
> 
> (In reply to Bas Schouten (:bas.schouten) from comment #16)
> > I can't reproduce a problem with this file on windows 7 with Direct2D turned
> > off, every way I print this it looks fine to me.. could we get a scan
> > pointing out what exactly I'm looking for?
> 
> The attachment added in 14th Jan is a scan copy of the file printed from Win
> XP.
> 
> I retested using latest Nightly (20140326030203) under Win 7 64-bit. Please
> see the new attachment with two pages representing the scan with the pref
> gfx.direct2d.disabled set to true and false. (I'm hoping this is the correct
> pref)

Interesting, I was confused by all the invalid fonts in the rest of the page. So it seems you're seeing the bug with direct2d enabled (i.e. direc2d.disabled set to false), are you certain this is correct? Since the bug is reported for WinXP, where direct2d doesn't exist.
(Assignee)

Comment 19

5 years ago
FWIW, I finally managed to print something with direct2d on, and it prints just fine, so I'm completely at a loss as to how I will be able to reproduce this bug.
I also printed from that system another random pdf, and I didn't encounter any problems.
Is there any other tests I could try in order to see if this is a d2d problem or not?
I was able to reproduce on a win xp virtual machine with FF2014-03-27.

I assume you guys are printing the url in the bug description, NOT the attached PDF?

http://mozqa.com/data/firefox/pdf/annotationsAndOutline.pdf ?
(Assignee)

Comment 22

5 years ago
(In reply to Brendan Dahl [:bdahl] from comment #21)
> I was able to reproduce on a win xp virtual machine with FF2014-03-27.
> 
> I assume you guys are printing the url in the bug description, NOT the
> attached PDF?
> 
> http://mozqa.com/data/firefox/pdf/annotationsAndOutline.pdf ?

Yes, I am. Perhaps this is a problem strictly related to something inside WinXP? Like a font there or something. I don't have an up to date WinXP machine sadly.
Is it possible to get a reduced test case of this problem? It would make analyzing what's happening easier
It's also worth noting that pdf.js would produce nicer pdfs and have better performance if it didn't draw each character individually. It seems reasonably to have pdf.js preserve strings at the same granularity that they are in the original document.
Any chance this bug can be fixed for 29? beta6 and 7 are planned for this week.
Thanks
29 is going live soon. So, too late for 29.
Not tracking for the next releases.
status-firefox29: affected → wontfix
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.