• Not Answered

Is there a way to import / open SVG files in Corel X5?

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

18 Replies - Latest Reply

  • Your PC configuration is more than enough to open / import the file, as well as CDGS X5 version is correct.

    Perhaps the file itself has become corrupted(?).

    Could you post it on this Forum for some of us may try to open it? Or, if it´s a very large file, post it in a free Sharing site(*) and provide us the link.

    (*) Example: www.megauplod.com
  • 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.



    [edited by: silvershoes at 8:18 (GMT -5) on Thu, Dec 23 2010] Added link.
  • In reply to silvershoes:

    silvershoes

    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"

    Devil  the 'dd'

     



    [edited by: digital demon at 13:29 (GMT -5) on Thu, Dec 23 2010]
  • In reply to digital demon:

    Dragged and dropped from where?

    "Open" makes CorelDraw abort. "Import" makes CorelDraw abort. But I'm willing to try drag and drop.

    Thanks!

     

    Edit:

    I tried drag and drop from the file menu, and CorelDraw aborted. So then I tried drag and drop from CorelConnect and got an error from Microsoft Visual C++ Runtime Library that said "Runtime Error! Program ...\Corel\CorelDRAW Graphics Suite X5\Programs\CorelDRW.exe abnormal program termination."



    [edited by: silvershoes at 15:17 (GMT -5) on Thu, Dec 23 2010]
  • In reply to silvershoes:

    silvershoes
    Dragged and dropped from where?

    I had to check this out so I went to the link referenced earlier and downloaded the file which actually just opened in firefox as an image.  So I went to file menu, saved it as 29699-kleanSweep.svg on my desktop.

    Opened draw x5 & started a new blank document.  Un-maximized the Draw window so I could see the svg on my desktop and dragged it onto the CorelDraw page.

    Worked like a charm and shows as a group of 7 objects

    [Edit]

    For what it's worth, I'm on a 64-bit Vista box. And I just tried both Import and Open, both worked fine.



    [edited by: Andrew at 16:02 (GMT -5) on Thu, Dec 23 2010]
  • In reply to Andrew:

    just to add to this conversation i also downloaded the svg file and tried to open it in X4. i got the same error messages as posted here and CorelDRAW crashed. this happened for opening, importing and dragging/dropping. only crashes.

     

    was able to open the file in Illustrator then resaved with new name as an uncompressed svg. after this i was able to successfully open the file in CorelDRAW.

     

    ghi

  • In reply to Ghiangelo:

    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.

    --Chuck

     

  • In reply to Chuck:

    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. :(

  • In reply to Chuck:

    cmcmanis

    http://robotics.mcmanis.com/foo.svg

    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.

    Both of these do bring Draw down for me too.  One difference I noticed.. the file I tested earlier saved to my desktop with just .svg at the extension while the two foo files had an additional .xml extension(foo.svg.xml and foo2.svg.xml) .   But now it's getting beyond my experience as I don't really know SVG.  There must be something different in how they're defined but I've no clue what.  They all just looked like cryptic xml to me when I did a view source on them.

  • In reply to silvershoes:

    silvershoes

    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)

    Devil  the 'dd'

     

  • In reply to digital demon:

    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. Smile

    It didn't work with Chuck's, though; his still crashes the program and reports to MicroSoft. Sad

  • In reply to silvershoes:

    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.

     

    --Chuck

     

  • In reply to Chuck:

    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 files

    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');

    $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();

    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>

    (this happens to be the 'V' of SVG Test)

    and then it puts it into the diagram using this code:
    <g style="fill:rgb(25%,25%,100%);fill-opacity:1;">
      <use xlink:href="#glyph0-1" x="350" y="250"/>
      <use xlink:href="#glyph0-2" x="357.299805" y="250"/>
    ...
      <use xlink:href="#glyph0-8" x="397.824951" y="250"/>
    </g>
    Everything you need to reproduce is available from my web site now:
        http://robotics.mcmanis.com/svg-test.svg                 *this is the working SVG file*
        http://robotics.mcmanis.com/failing-svg-test.svg      *this is the failing SVG file*
        http://robotics.mcmanis.com/svg-test.pl                     *this is the perl file that generates them*
    Note you will need to install the Cairo api using CPAN for this to work on your machine.
    --Chuck

  • In reply to Chuck:

    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

  • In reply to 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.