title: Using Ghostscript in a Webapplication (PDF Thumbnails)
body: <p>i am using the ghostscriptsharp wrapper for c# and ghostscript. I want to generate thumbnails out of pdf-files.</p>
  <p>There are different Methods imported form the ghostscript-c-dll &quot;gsdll32.dll&quot;.</p>
  <pre><code> [DllImport(&quot;gsdll32.dll&quot;, EntryPoint = &quot;gsapi_new_instance&quot;)]
   private static extern int CreateAPIInstance(out IntPtr pinstance, 
                                          IntPtr caller_handle);
  
   [DllImport(&quot;gsdll32.dll&quot;, EntryPoint = &quot;gsapi_init_with_args&quot;)]
   private static extern int InitAPI(IntPtr instance, int argc, IntPtr argv);
  
   //...and so on
  </code></pre>
  <p>I am using the GhostscriptWrapper for generating the thumbnails in a webapplication (.net 2.0). This class uses the methods imported above.</p>
  <pre><code> protected void Page_Load(object sender, EventArgs e){
        GhostscriptWrapper.GeneratePageThumb(&quot;c:\\sample.pdf&quot;, &quot;c:\\sample.jpg&quot;, 1, 100, 100);
   }
  </code></pre>
  <p>When i debug the Web-Application in Visual Studio 2008 by hitting key &quot;F5&quot; it works fine (a new instance of webserver is generated). When i create a WindowsForm Application it works too. The thumbnails get generated.</p>
  <p>When i access the application with the webbrowser directly (http://localhoast/mywebappliation/..) it doesn't work. No thumbnails are generated. But there is also no exception thrown.</p>
  <p>I placed the gsdll32.dll in the system32-folder of windows xp. The Ghostscript Runtime is installed too. I have given full access in the IIS-Webproject (.Net 2.0).</p>
  <p>Does anybody know why i can't access Ghostscript from my webapplication? Are there any security-issues for accessing dll-files on the IIS-Server?</p>
  <p>Greetings
  Klaus</p>