Я хотел бы преобразовать PDF-файл в формат .GIF, используя C # и magicknet.dll. Я добавил ссылку на MagickNet Dll в свой проект.
MagickNet.Magick.Init();
MagickNet.Image img = new MagickNet.Image("d:/aa.pdf");
img.Write("d:/bb.gif");
MagickNet.Magick.Term();
img.Dispose();
System.Runtime.InteropServices.SEHException was unhandled by user code
Message="External component has thrown an exception."
Source="ImageMagickNET"
ErrorCode=-2147467259
StackTrace:
at Magick.Image.{ctor}(Image* , basic_string\,std::allocator >* )
at ImageMagickNET.Image..ctor(String imageSpec)
at Test1._Default.Button1_Click(Object sender, EventArgs e) in C:\Users\PANKAJ\Documents\Visual Studio 2008\Projects\Test1\Test1\Default.aspx.cs:line 31
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: