Bug 65478 - SVG images with <embed> and <object> do not print
Summary: SVG images with <embed> and <object> do not print
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-08-01 12:08 PDT by Christopher Schultz
Modified: 2011-08-02 14:37 PDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Schultz 2011-08-01 12:08:26 PDT
Filing with webkit as nobody at Google Chrome seems to be responding:

Chrome Version       : 8.0.552.237 (Official Build 70801)
URLs (if applicable) : http://www.christopherschultz.net/temp/SVG_test.html

Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
   Chrome 8/9/10/11/12/13: Printing problems as described in this bug report
     Safari 5: Display problems with <img>, <embed>, and <object>, but all images are visible
  Firefox 3.x: OK (no <img> support)
  Firefox 4.x: OK
       IE 7/8: FAIL, but not expected to work
       MSIE 9: OK
     Opera 10: Display problems with <img> and <object>, <embed> works

What steps will reproduce the problem?
1. Load the page indicated above
2. Print to a PDF

What is the expected result?
All 4 images are visible

What happens instead?
Neither the <object> nor the <embed> SVG images are displayed at all. Also, the <img> rendering is compressed horizontally (aspect ratio is skewed).

Please provide any additional information below. Attach a screenshot if
1. I'm using PDFCreator 1.0.2 to generate the PDF files rather than printing to actual paper.
2. This is a test adapted from W3C's SVG test to put both <object> and <embed> on the same page, as well as add an <img> attempt. The W3C tests can be found here (http://www.w3.org/Graphics/SVG/Test/20080912/htmlObjectHarness/index.html) for the <object> tag: I randomly chose "shapes-circle-01-t" as the test to adapt.

I'm attaching a screenshot of Chrome's rendering of this page in regular "view" mode (only problem is incorrect <img> aspect ratio) as well as the resulting PDF (where neither the <object> nor <embed> images are displayed).

(Please see Google Chrome's bug tracker for the PDF attachments. Sorry for any inconvenience this causes).
Comment 1 Christopher Schultz 2011-08-01 12:11:04 PDT
Google Chrome 13 adds a print-preview which exhibits this (non-printing) behavior so I'm sure it's not part of the print-to-PDF process at this point.

I'd even be happy if someone would show me that my SVG is broken that /that/ is the real problem. Given that MSIE and FF both display and print as expected (and how often do THEY ever agree on anything?), I suspect this is a problem in WebKit SVG/Print components.
Comment 2 Christopher Schultz 2011-08-02 14:37:09 PDT
When using the nightly build from 2011-08-02, when I print-preview the test page, the bottom 2 images are shifted to the right and truncated.