Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: On Azure, Text Doesn't Render When Converting SVG to PNG

$
0
0
Hey all;

Got a weird one here. Our application converts SVGs into PNGs. Locally, everything works hunky-dory, but when we push the code up to Azure (it's hosted on an Azure website), we have noticed that if the SVG included text, then the text does not convert. Even using very simple SVG markup, like the example from Mozilla:
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg"
     width="100px" height="30px" viewBox="0 0 1000 300">

  <text x="250" y="150" 
        font-family="Verdana" 
        font-size="55pt">
    Hello, out there
  </text>

  <!-- Show outline of canvas using 'rect' element -->
  <rect x="1" y="1" width="998" height="298"
        fill="none" stroke-width="2" />
</svg>
Locally, it will render fine, but on the server, it won't render the text. The code that I am using for the conversion is very minimal (the above XML is loaded in the xmlStream object):
using (var image = new MagickImage())
{
    image.Read(xmlStream, new MagickReadSettings { Format = MagickFormat.Svg });
    var outputStream = new MemoryStream();
    image.Write(outputStream, MagickFormat.Png);
}
Any idea why that wouldn't work on Azure App Services, but works just fine on a regular IIS machine? I have enabled the debug on Magick, and there are no glaring errors in the conversion.

Thank you! Any help is greatly appreciated.

Dave

Viewing all articles
Browse latest Browse all 3693

Trending Articles