X
Tap here to go to the mobile version of the site.

Support Forum

why does saving an svg image as a pdf lose the ellipse?

Posted

When firefox renders an svg line with an oval at the end it displays fine but if it is saved as a pdf the oval is missing. This seems to be a firefox problem (31 OSX) as the pdf is created correctly using Safari or Chrome.

e.g.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118px" height="18px" version="1.1"><defs/><g transform="translate(0.5,0.5)"><path d="M 8 8 L 105 8" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="108" cy="8" rx="3" ry="3" fill="#000000" stroke="#000000" pointer-events="none"/></g></svg>

I rather suspect that for some reason when firefox converts to pdf it always fails to convert an ellipse.

When firefox renders an svg line with an oval at the end it displays fine but if it is saved as a pdf the oval is missing. This seems to be a firefox problem (31 OSX) as the pdf is created correctly using Safari or Chrome. e.g. <pre><nowiki><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118px" height="18px" version="1.1"><defs/><g transform="translate(0.5,0.5)"><path d="M 8 8 L 105 8" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="108" cy="8" rx="3" ry="3" fill="#000000" stroke="#000000" pointer-events="none"/></g></svg></nowiki></pre> I rather suspect that for some reason when firefox converts to pdf it always fails to convert an ellipse.

Modified by cor-el

Additional System Details

Installed Plug-ins

  • Shockwave Flash 14.0 r0
  • Displays Java applet content, or a placeholder if Java is not installed.
  • The Google Earth Plugin allows you to view 3D imagery and terrain in your web browser.
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.
  • DivX VOD Helper Plug-in
  • DivX Plus Web Player version 2.2.2.14
  • 5.1.20125.0
  • View PDF documents within your web browser.
  • Microsoft Office for Mac SharePoint Browser Plug-in
  • Version 1.9.2.1599
  • Google Talk Plugin Video Accelerator version:0.1.43.4
  • The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime.
  • Office Live Update v1.0
  • iPhoto6
  • RealPlayer Plugin
  • Yahoo! Installer Plug-in provides application installation support

Application

  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:31.0) Gecko/20100101 Firefox/31.0

More Information

cor-el
  • Top 10 Contributor
  • Moderator
11987 solutions 111378 answers

Works for me if I print this file to PDF on Linux.

Do you use an extension to do the conversion?


data:text/html;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTE4cHgiIGhlaWdodD0iMThweCIgdmVyc2lvbj0iMS4xIj48ZGVmcy8+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC41LDAuNSkiPjxwYXRoIGQ9Ik0gOCA4IEwgMTA1IDgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludGVyLWV2ZW50cz0ibm9uZSIvPjxlbGxpcHNlIGN4PSIxMDgiIGN5PSI4IiByeD0iMyIgcnk9IjMiIGZpbGw9IiMwMDAwMDAiIHN0cm9rZT0iIzAwMDAwMCIgcG9pbnRlci1ldmVudHM9Im5vbmUiLz48L2c+PC9zdmc+
Works for me if I print this file to PDF on Linux. Do you use an extension to do the conversion? ---- <pre><nowiki>data:text/html;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTE4cHgiIGhlaWdodD0iMThweCIgdmVyc2lvbj0iMS4xIj48ZGVmcy8+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC41LDAuNSkiPjxwYXRoIGQ9Ik0gOCA4IEwgMTA1IDgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBwb2ludGVyLWV2ZW50cz0ibm9uZSIvPjxlbGxpcHNlIGN4PSIxMDgiIGN5PSI4IiByeD0iMyIgcnk9IjMiIGZpbGw9IiMwMDAwMDAiIHN0cm9rZT0iIzAwMDAwMCIgcG9pbnRlci1ldmVudHM9Im5vbmUiLz48L2c+PC9zdmc+</nowiki></pre>

Question owner

Thanks for your reply although I'm afraid I didn't understand the format of your file.

I don't use an extension. I just open the .svg file in firefox and then attempt to print to pdf using the normal print dialogue box. Indeed, the ellipse also fails to appear when selecting preview before going to print or choosing to print to pdf.

Thanks for your reply although I'm afraid I didn't understand the format of your file. I don't use an extension. I just open the .svg file in firefox and then attempt to print to pdf using the normal print dialogue box. Indeed, the ellipse also fails to appear when selecting preview before going to print or choosing to print to pdf.
cor-el
  • Top 10 Contributor
  • Moderator
11987 solutions 111378 answers

The code I posted above is a data URI with the SVG code that you can open via the location/address bar to get this SVG image in the current Firefox tab.

You can prefix the code with view-source: to see the source code.

  • view-source:data:text/html;charset=utf-8;base64,<base64 encoded SVG code>

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.

  • Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
  • Do NOT click the Reset button on the Safe Mode start window
The code I posted above is a data URI with the SVG code that you can open via the location/address bar to get this SVG image in the current Firefox tab. You can prefix the code with view-source: to see the source code. *view-source:data:text/html;charset=utf-8;base64,<base64 encoded SVG code> Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem. *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance *Do NOT click the Reset button on the Safe Mode start window *https://support.mozilla.org/kb/Safe+Mode *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Question owner

Thanks, but no that doesn't do it. Even in Safe mode selecting print and then view in Preview, or saving the PDF, the ellipse is missing. Preview shows the ellipse as does the pdf if I use Chrome instead of Firefox

Thanks, but no that doesn't do it. Even in Safe mode selecting print and then view in Preview, or saving the PDF, the ellipse is missing. Preview shows the ellipse as does the pdf if I use Chrome instead of Firefox