can you use Ab2d.ReaderSvg library from a service ?
#1
Hi,
I want to use ReaderSvg to convert a svg file to xaml on the fly in a webservice something like the code below.

byte[] byteArray = Encoding.ASCII.GetBytes(svg);
using (MemoryStream stream = new MemoryStream(byteArray))
{
Ab2d.ReaderSvg svgReader = new Ab2d.ReaderSvg();
svgReader.Read(stream);

SilverlightXamlWriterSettings settings = new SilverlightXamlWriterSettings(SilverlightXamlWriterSettings.SilverlightVersionType.Silverlight_4);

string xaml = svgReader.GetXaml(settings);

return xaml;
}

As it pops up the evaluation screen on the webs server I get

The calling thread must be STA, because many UI components require this.

Is there a way to use this library without UI ?
  


Messages In This Thread
can you use Ab2d.ReaderSvg library from a service ? - by grendo - 07-04-2010, 02:27 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)