New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 637584 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

SVG's with a mask for outside stroke don't render properly when converted to PDF

Reported by alecazam...@gmail.com, Aug 14 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0

Example URL:

Steps to reproduce the problem:
1. Generate an svg using a mask to handle outside stroke.
   This is a 2x width stroke with inverted mask of the fill.
2. Print... PDF -> save as PDF (or print)
3. See that the mask is gone, and so are the fills in the PDF.

What is the expected behavior?
Honor inside/outside stroke in the SVG correctly. This causes signficant rendering artifacts from the visible SVG to the PDF.

What went wrong?
The browser don't seem to be converting the mask properly in this case.  This is one of the few methods of exporting inside/outside stroke in a SVG 1.1 file.  It renders properly, so it should print as well.

I'm surprised that none of the browser PDF converters get a lot of the vector conversions correct.  This isn't the only print conversion mismatch (f.e. blend modes in SVG).  Chrome is using Skia, Firefox is Cairo, and Safari is using WebKit.  I would think at least one of these would get PDF conversion correct.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? No Firefox, Safari

Chrome version: 51.0.2704.103 (Official Build) (64-bit)  Channel: stable
OS Version: OS X 10.11.2
Flash Version: 

This file was generate in Figma, which exports inside/outside stroke.
 
Hello.svg
13.9 KB Download
Hello-Chrome.pdf
23.3 KB Download
Hello-Firefox.pdf
23.0 KB Download
Hello-Safari.pdf
52.2 KB Download
I should say the fills aren't gone, but because the mask isn't honored, the fill isn't visible, since the stroke dominates in the PDF.
Here are inside/center/outside stroke examples from the Group.svg, and PDF exports from Chrome, Firefox, and Safari.  None of them capture the original SVG content properly, even though each browser renders the SVG correctly.  There are obvious gaps and rasterization bleeding on the inside/outside stroke objects (which use an alpha mask to simplify grouping the masks).  Chrome is by far the worst of the bunch, but none of them are useable PDF.
Group.svg
131 KB Download
Group-Chrome.pdf
134 KB Download
Group-Firefox.pdf
57.7 KB Download
Group-Safari.pdf
119 KB Download

Comment 3 by f...@opera.com, Aug 15 2016

Components: -Blink Internals>Skia>PDF
Status: Untriaged (was: Unconfirmed)
Cc: thestig@chromium.org
thestig: Who would be a good owner for this?
Cc: -thestig@chromium.org halcanary@chromium.org

Comment 7 by kbr@chromium.org, Aug 20 2016

Cc: bsalomon@chromium.org
Components: Blink>SVG
Components: -Blink>SVG
Removing SVG component. We'll be happy to take it back again if it turns out that SVG is sending something non-usable by the pdf canvas.
Status: Available (was: Untriaged)
simplified test case attached.
crbug_637584.svg
497 bytes Download
It seems blink is using SkBlendmode::kDstIn.  This is not supported by SkPDF.
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 21 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment