A blank page is added at the end of some documents when printing

NEW
Unassigned

Status

()

Firefox
PDF Viewer
P3
normal
4 years ago
2 years ago

People

(Reporter: petruta, Unassigned)

Tracking

({regression})

Trunk
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
Reproducible on:
Firefox 30 RC - 20140603140158
 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
latest Aurora -  20140604004003
 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
latest Nightly - 20140604030202
 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0

Steps to reproduce:
1. Open a PDF (eg http://www.cqpub.co.jp/dwm/contents/0110/dwm011000820.pdf)
2. Pay attention to the number of pages
3. Select File - Print Preview and verify the number of pages
4. Print the document

Actual results:
A blank page is added at the end of the document and is printed.
Other pdf samples:
https://bug1020358.bugzilla.mozilla.org/attachment.cgi?id=8434177
http://www.t-engine.org/ja/wp-content/themes/wp.vicuna/pdf/ja/tef-j_20120830.pdf
http://ec.europa.eu/employment_social/esf/docs/succes_stories_phare_ro.pdf
http://www.logistis.gr/files/diafora/ika_e41_402_2011/paradeigma.pdf
http://www.startupgreece.gov.gr/sites/default/files/2.%20%CE%A0%CE%B1%CF%81%CE%B1%CE%B4%CE%B5%CE%AF%CE%B3%CE%BC%CE%B1%CF%84%CE%B1.pdf
https://moztrap.mozilla.org/media/attachments/2013/01/23/math.pdf

Expected results:
Document is shown in print preview and printed correctly. No extra pages are added to it.

Notes: 1. The issue occurs also Ubuntu 12.10 32-bit and Mac OSX 10.8.5.
2. The issue is a Fx 27 regression:
Last good revision: 4e7d1e2c93a6 (2013-10-18)
First bad revision: e25e62d174ed (2013-10-19)
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=4e7d1e2c93a6&tochan
ge=e25e62d174ed

Possibly regressed by bug 928358 - Update pdf.js to version 0.8.629.

Updated

4 years ago
Priority: -- → P3
Whiteboard: [pdfjs-c-ff-integration][pdfjs-d-printing]

Comment 1

3 years ago
In bug 928358:
#3670 Polyfill for mozPrintCallback

Possible regression?

Updated

3 years ago
Blocks: 928358

Updated

2 years ago
Duplicate of this bug: 1184872

Comment 3

2 years ago
Any news on this?
We also encounter this problem.
When printing one of the samples, a blank page is added.
Also a pdf file we generate (a single page) gets another blank page while printing.
This only happens in pdfjs.


Systems:
Linux Mint with firefox version: 42.0+linuxmint1+rosa
Windows 7 with firefox version: 42

Updated

2 years ago
Duplicate of this bug: 1150433

Updated

2 years ago
Duplicate of this bug: 1038735

Comment 6

2 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160203030249

This bug still persists in Nightly. An additional blank page is printed when using pdf.js.

Comment 7

2 years ago
Created attachment 8715518 [details]
test pdf processed by pdfjs

I managed to retrieve the processed print job file as it is sent to CUPS by pdf.js.
First thing to notice is that it is very large compared to the original or a print job file processed by evince document viewer. I'm really interested why, but i have no idea about it.

Second there's a suspicious text snippet in the bottom after lots of binary glibberish, that reads:

   /Type /Pages
   /Kids [ 13 0 R 20 0 R ]
   /Count 2

Same snippet processed by evince says:

   /Type /Pages
   /Kids [ 10 0 R ]
   /Count 1

...and only one page gets printed instead of two.

I don't speak PDF but maybe someone who knows how the processing happens before print has a clue?

Comment 8

2 years ago
Created attachment 8715519 [details]
test pdf processed by evince

Comment 9

2 years ago
Created attachment 8715520 [details]
original unprocessed pdf
You need to log in before you can comment on or make changes to this bug.