Stray Thin Lines in Adobe Reader (PDF exported incorrectly).
Reported by
matt...@amristar.com,
May 18 2017
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36 Steps to reproduce the problem: Steps to reproduce bug: 1. Open http://jsfiddle.net/8r7p59a5/embedded/result/ or attached "index.html" 2. Save as pdf (A3) 3. Open in Adobe Reader DC (stray lines appear, see "adobe-reader.png") 4. Open in chromes/firefox pdf viewer, no lines appear. Then open "pdf-deflated-simplified-broken-other-readers.pdf", defective lines now appear (draw code was switch around). Similar to the response from Adobe (see other comments). What is the expected behavior? The defective line(s) should not be drawn. What went wrong? Seems line a incorrect draw point (-42.249756 887.25024 l) was added, see line 824 in "pdf-deflated-simplified-broken-adobe-reader.pdf". Moving line 822 (1026.75159 697.00397 l), to bellow (-42.249756 887.25024 l), causes chromes pdf viewer to show the defective line. Seems like it could be a bug in chrome pdf exporter and chrome pdf viewer. Did this work before? N/A Chrome version: 58.0.3029.96 Channel: n/a OS Version: 10.0 Flash Version: Reported to Adobe, they responded with: Following is an excerpt of the content stream: q 1 0 0 1 500 591.2638981 cm .5 0 0 rg 0 0 m 18.077 8.467 l 28.007 35.821 l 27.63 40.168 l 48.563 49.615 l . . . -22.338 8.427 l -16.777 2.76 l 0 0 l -1069.001 190.247 l 0 0 l h f Q We see that the extra line is being rendered by the highlighted line to call (-1069.001 190.247 l). It seems that the other pdf viewers are not honoring the above line to call. These viewers don’t render anything after the line-to call to 0 0 point. When we move this command before the first 0 0 l, then the other pdf viewers also start showing the above line. This seems to be a faulty behavior and is not as per PDF specification. Acrobat & Reader are behaving as per the PDF specification.
,
May 23 2017
So it sounds like there are actually two bugs here. Is my reading of this bug report correct? 1) Chrome is incorrectly generating a PDF for a given HTML file when one prints to PDF. 2) Chrome's PDF Viewer does not display the stray line in the incorrectly generated PDF file, whereas Acrobat does.
,
May 23 2017
That's correct. Apologies, should have created two issues, is it possible to add sub-tasks or split this one up?
,
May 23 2017
No worries. I'll split the PDF Viewer part into bug 725555. We'll use this bug for the PDF generation issue.
,
May 24 2017
,
May 31 2017
,
Jun 8 2017
Able to reproduce the issue on the latest canary(61.0.3123.0) on Windows-10, Mac OS 10.12.5 and Linux Ubuntu 14.04. This is non-regression issue as similar behavior is seen on older chrome version(30.0.1549.0). Test steps followed: ==================== 1. Opened index.html from chrome-line-bug.zip and saved as pdf. 2. Opened the same pdf file in chrome and on Adobe Reader. 3. Chrome doesn't render thin lines as is rendered on Adobe Reader.
,
Jun 8 2017
-1069.00,190.247 appears in the original SVG as "-1069.001401,190.2463". This is not Skia's fault for including it.
Apply this sed command to index.html, and everything will be fixed:
sed 's/ 0,0 0,0 [^z]* z/z/' < index.html > index-fixed.html
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by nyerramilli@chromium.org
, May 18 2017Labels: Needs-Triage-M58