SVG to PDF does not work

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MrsCalahan
Posts: 9
Joined: 2009-05-13T01:28:22-07:00
Authentication code: 8675309

SVG to PDF does not work

Post by MrsCalahan »

Hallo,

I try to convert a SVG vector grafic via IM convert to a pdf file.

Code: Select all

convert -density 300  inkscape_svgbox.svg svgbox.pdf
inkscape_svgbox.svg:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="100"
   height="100"
   id="svg2"
   version="1.1"
   inkscape:version="0.48.2 r9819"
   sodipodi:docname="New document 1">
  <defs
     id="defs4" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="3.959798"
     inkscape:cx="53.824714"
     inkscape:cy="51.005366"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1048"
     inkscape:window-height="702"
     inkscape:window-x="1491"
     inkscape:window-y="125"
     inkscape:window-maximized="0" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-952.36218)">
    <text
       xml:space="preserve"
       style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="15.909903"
       y="1010.9459"
       id="text2985"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan2987"
         x="15.909903"
         y="1010.9459">TEST</tspan></text>
  </g>
</svg>
The created PDF file ist defect.
My IM Version: ImageMagick 6.3.7 11/12/08 Q16

Can anybody help me?

Thanks
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: SVG to PDF does not work

Post by whugemann »

Works just fine on my computer (Windows 7, ImageMagick-6.8.0-1). Try to convert the SVG to something simpler first, say GIF. If that works, PDF is the problem, not SVG.
Wolfgang Hugemann
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: SVG to PDF does not work

Post by snibgo »

It works okay for me (Windows, 6.7.9-Q16).

What error do you get? You might try upgrading to a more recent version of IM.
snibgo's IM pages: im.snibgo.com
Post Reply