Closed Bug 959596 Opened 10 years ago Closed 2 years ago

PDF with annotations is incorrectly printed from Windows

Categories

(Firefox :: PDF Viewer, defect, P3)

x86
Windows
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox26 --- unaffected
firefox27 + wontfix
firefox28 + wontfix
firefox29 + wontfix
firefox30 --- wontfix

People

(Reporter: phorea, Assigned: bas.schouten)

References

Details

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

Attachments

(3 files)

Attached file 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
Keywords: regression
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.
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)
(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)
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?
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.
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)
(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?
Attached file 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)
(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.
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 ?
(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.
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

Is this only reproducible on Windows XP? If so, we can close this as WONTFIX.

(In reply to Marco Castelluccio [:marco] from comment #28)

Is this only reproducible on Windows XP? If so, we can close this as WONTFIX.

I noted in comment 18 that Win 7 was also affected.
However, the pdf is no longer available (404 - Not Found) and I couldn't find another copy of it, so I guess this issue + bug 959553 can be closed now.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
See Also: → 959553
Status: RESOLVED → REOPENED
OS: Windows XP → Windows
Resolution: INCOMPLETE → ---

Are you still able to reproduce the bug?

Flags: needinfo?(petruta.rasa)
Summary: PDF with annotations is incorrectly printed from Win XP → PDF with annotations is incorrectly printed from Windows

Looks good to me on Print Preview using latest Firefox versions under Win 7 32-bit and Win 10 64-bit.

I don't own a physical printer to actually test this, so passing the ni? to Bogdan (currently OOO).

Flags: needinfo?(petruta.rasa) → needinfo?(bogdan.maris)

I used a physical printer (HP Deskjet 3720) on both Windows 7 32bit and Windows 11 and the PDF from comment 30 is printed without issues on paper as well. Based on Comment 33 and this one I will go ahead and close this bug as WORKSFORME.

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Flags: needinfo?(bogdan.maris)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: