PDF.js prints documents rendered as plain images

NEW
Unassigned

Status

()

P3
normal
a year ago
11 months ago

People

(Reporter: north99, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643

Steps to reproduce:

- Create a fresh Ubuntu 16.04 amd64 VM
- Compile and install a patched cups-pdf that supports printing PDF files with text https://github.com/alexivkin/CUPS-PDF-to-PDF
- Download Firefox 56.0a1-2017-07-31, start a new profile
- Open a PDF file with text in it (e.g. http://www.pdf995.com/samples/pdf.pdf) using PDF.js
- Use the cups-pdf printer to print the document

Also tested with Firefox 55.0b13 and 52.2.1esr, all downloaded from the Mozilla FTP repos.


Actual results:

The final printed document is rendered completely as one image per page.

The printing process makes some kind of preprocessing before cups-pdf, which can take very long for big files. I assume that this is the step where the flattening happens.




Expected results:

Text in printed documents remains as such. Firefox shouldn't flatten the PDF.

Every other program I tested on the same machine didn't have this behaviour. In particular, Evince and Chromium produce "correct" printed PDFs with nearly no processing time.
Component: Untriaged → PDF Viewer

Comment 1

a year ago
Also happened when Nightly 57 + Win10 with Microsoft Print to PDF in pdf.js.
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Keywords: testcase
OS: Unspecified → All
Hardware: Unspecified → All
(Reporter)

Comment 2

a year ago
Similar issues at GitHub

PDF is printed as image
https://github.com/mozilla/pdf.js/issues/8075

Retain vectors and the fonts when rendering
https://github.com/mozilla/pdf.js/issues/6718

> There is an open project for an SVG back-end (https://github.com/mozilla/pdf.js/projects/2) that would allow us to print vectors instead of images, but it's still a work in progress.

SVG backend kanban
https://github.com/mozilla/pdf.js/projects/2

https://github.com/mozilla/pdf.js/tree/master/examples/svgviewer
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.