Greetings Forum,
I've got an SVG file, it was generated by a program which generates such things, its completely valid according to the W3C validator. If I try to open it or import it into Corel X5, X5 crashes. I send off a WER to Corel hopefully (it says it sends it but one never knows for sure.)
My system Win XP (32 bit, SP3), 3.5GB of RAM, 500+GB free hard drive space
Corel X5 - I am pretty sure it has SP2 applied it calls it self 10.2.0.661 in the About menu.
Its annoying that it can't read this file, the documentation claims svg support.
--Chuck
Good question. I'm having the same problem you are. I've tried open and import, and both close CorelDraw without warning.
I've also tried opening the files in Inkscape, and they're fine there. Exporting to another format converts a lot of stuff to bitmap, however, and makes the files a mess to edit in CorelDraw. In some cases I've been forced to completely redraw the file, not fun and totally inefficient.
Here's an example file: http://kde-look.org/content/show.php?content=29699 It's nothing special, but it was the last one I wrestled with.
silvershoes said: Here's an example file: http://kde-look.org/content/show.php?content=29699 It's nothing special, but it was the last one I wrestled with.
This one I dragged & dropped on to an X5 page... no problem. group of 7 objects, all layer locked. Right mouse click on them after ungrouping and choose "Unlock object"
the 'dd'
So I've put up the file that is at issue you can look at it in a browser by visiting:
http://robotics.mcmanis.com/foo.svg
I was wondering if it was a line termination issue (the file was generated on a Linux system) so I converted it to DOS line endings and its available as
http://robotics.mcmanis.com/foo2.svg
They display fine in a browser, if I try to open them or import them into X5 then X5 crashes and sends off an error report.
Thanks y'all for at least trying.
So Andrew could open it using Vista, but the original poster uses WinXP and so do I. I'm not real clear on why that should make a difference with CorelDraw, but maybe it's a clue for someone.
I'll try this on Chuck's file next, but it happens to me fairly often and there's no real way to predict. Some files are fine, and some do this. :(
silvershoes said: Thanks y'all for at least trying. So Andrew could open it using Vista, but the original poster uses WinXP and so do I. I'm not real clear on why that should make a difference with CorelDraw, but maybe it's a clue for someone. I'll try this on Chuck's file next, but it happens to me fairly often and there's no real way to predict. Some files are fine, and some do this. :(
Dragged and dropped from the Documents directory where I saved it.
Used XP & X5 (with all updates, SP's)
Sonofagun, dd, that actually worked for me with my file. Thanks! There's still a bug in Corel, but that seems to bypass it nicely.
It didn't work with Chuck's, though; his still crashes the program and reports to MicroSoft.
I don't know if it helps or not but this also passes the SVG validator
http://validator.w3.org/check?uri=http://robotics.mcmanis.com/foo.svg&charset=(detect+automatically)&doctype=Inline&group=0
Which does complain about the utf8 vs us-ascii implication but otherwise sees it as a valid SVG 1.1 file.
Ok, so I've been playing around a bit (not much else to do when you're main illustration tool is down :-(, and I can add some texture to this problem.
The SVG file is generated by a perl script that is using the CPAN interface to Cairo, the 2D Graphics library, and the SVGSurface that is available therein. I wrote a very small perl program that draws a box with a circle in it and loaded that SVG file. It worked fine. Then I wrote the text "SVG Test" inside the circle and *boom* X5 blows chunks. Here is the perl program:
#!/usr/bin/perl # Test program to generate some svg filesuse strict;use warnings;use Cairo;my $surface;$surface = Cairo::SvgSurface->create("svg-test.svg", 800, 600);my $ctx = Cairo::Context->create($surface);$ctx->select_font_face('comic', 'normal', 'normal');$ctx->set_font_size(11.5); $ctx->set_source_rgb(1, 1, 1); $ctx->rectangle(0, 0, 800, 600); $ctx->fill(); $ctx->set_source_rgb(0,0,0); $ctx->rectangle(300,200, 200, 200); $ctx->stroke(); $ctx->set_source_rgb(0, 1, 0); $ctx->arc(400, 300, 100, 0, 2 * 3.14159); $ctx->stroke(); $ctx->set_source_rgb(.25, .25, 1); $ctx->move_to(350,250); #$ctx->show_text("SVG Test"); ###### KILLER STATEMENT ####### $surface->write_to_png("svg-test.png"); $surface->show_page();
use strict;
use warnings;
use Cairo;
my $surface;
$surface = Cairo::SvgSurface->create("svg-test.svg", 800, 600);
my $ctx = Cairo::Context->create($surface);
$ctx->select_font_face('comic', 'normal', 'normal');
If you can read that it basically it draws a circle and a square. If you uncomment the 'show_text' call it writes "SVG Test" inside the circle.
The way it writes text in an SVG file, is that it creates a 'group' with the XML code:
<symbol overflow="visible" id="glyph0-2">
<path style="stroke:none;" d="M 3.4375 0 L 0.09375 -8.75 L 1.328125 -8.75 L 4.109375 -1.390625 L 6.875 -8.75 L 8.109375 -8.75 L 4.78125 0 L 3.4375 0 Z M 3.4375 0 "/>
</symbol>
http://www.fileformat.info/convert/image/svg2pdf.htm
Convert to PDF online then import to Draw. Tried it with your file and works 100%.
Corel might need to do some work on SVG as they were an early implementer and maybe lost a bit of faith in the process as the take up on the web has been hell slow thanks to MS and IE. A plague on Internet Explorer! It is supported in IE 9 but it will take years for all the crud versions to die and svg to be a true web format thanks to MS.
Yani
Corel has a test case of a legit SVG file that breaks their renderer, I'm hoping they can actually fix it. Inkscape (freeware) doesn't have issues with SVG nor does Illustrator.
(I know it's an old thread, but this might be helpful to anyone trying to deal with SVG files...)
You don't even need to convert the SVG online. Just open the SVG file within your browser (all modern ones can visualize SVG files) and print the page with your PDF printer. Then import the PDF into Draw, like Yani suggested. It works much better than struggling with SVG's...
Regards
Vorce