Save to PDF produces unuseable output from PDF




2 years ago
a year ago


(Reporter: alec, Unassigned)


51 Branch
Mac OS X

Firefox Tracking Flags

(Not tracked)



(5 attachments)



2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce:

1. Open the svg files in the following bug

2. Export them as PDF, and look closely at the PDF.  

You can also look at the PDF included in the bug for comparsion.

Actual results:

Inside/outside examples look very pixelated, have color bleeding, and outside stroke isn't masked properly.

Expected results:

The inside/outside cases (using mask) should look crisp.  We will attempt to export with a collection of paths in a clipPath, but this should just work.  The render of the SVG is correct in the browser, it's the PDF conversion that is bad in Firefox, Safari, and Chrome.
(In reply to Alecazam from comment #0)
> 2. Export them as PDF

Which feature do you refer?
Are you using Firefox for Android?
Flags: needinfo?(alec)

Comment 2

2 years ago
This happens on all platforms that can print (or save as PDF).  See the chromium bug that I mentioned for more details.  The PDF converter is doing really poor rasterization of SVG alpha masks used for inside/outside stroke.  This results in very poor quality for printing.  Firefox, Chrome, Safari all have different issues with the save svg -> pdf conversion.
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
So you mean [Print...]-[PDF]-[Save as PDF...], right?
Assuming it's about [Print...]-[PDF]-[Save as PDF...], I confirmed the rasterized output of masked path, in generated PDF.
Component: Untriaged → SVG
Ever confirmed: true
Product: Firefox → Core
Created attachment 8783232 [details]
reporter's testcase
Created attachment 8783233 [details]
reporter's PDF printout
Created attachment 8783234 [details]
dholbert's PDF printout

I've attached reporter's testcase & PDF printout from Firefox, taken from the chromium bug report.

I can't reproduce the bug locally, though -- here's my PDF result from latest Firefox release (48) on Ubuntu Linux. (Same results in Nightly, too.)  My results look correct.

Comment 8

2 years ago
I'm on OSX 10.11.2, but I have a feeling the SVG -> PDF converter is the same.  Make sure you look at the file that actually has inside, center, outside stroke.  Print -> then "Save as PDF".  Make sure you look closely at the output.  The inside/outside files are badly pixelated, and bleed around the mask and lettering badly.

Comment 9

2 years ago
Created attachment 8783243 [details]

This is the original Group.svg file with inside/center/outside stroke using an SVG Mask.  I'll attach the Group.pdf next.

Comment 10

2 years ago
Created attachment 8783244 [details]

Converted using FF48 on OSX 10.11.2 using "Print..." "Save As Adobe PDF".  "Save as PDF" was similarly poor output.
sorry, forgot to remove needinfo flag.
Flags: needinfo?(alec)
Priority: -- → P3

Comment 12

a year ago
Gettng doubled text in Firefox 52. I'm using my own font settings for readibility, though, maybe save to pdf fails with user font settings.
You need to log in before you can comment on or make changes to this bug.