Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

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

  • 4 trả lời
  • 3 gặp vấn đề này
  • 8 lượt xem
  • Trả lời mới nhất được viết bởi turnipeater

more options

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.

Được chỉnh sửa bởi cor-el vào

Tất cả các câu trả lời (4)

more options

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+
more options

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.

more options

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
more options

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