<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: A Simple C# Wrapper for Ghostscript</title>
	<atom:link href="http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/</link>
	<description></description>
	<pubDate>Fri, 10 Sep 2010 06:55:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: ND</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-20865</link>
		<dc:creator>ND</dc:creator>
		<pubDate>Tue, 24 Aug 2010 13:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-20865</guid>
		<description>Hi,

We are working on a product which requires a similar functionality of having the thumbnail generated for all the pdf files selected. 
After reading and researching a lot I am totally confused as our solution is hosted on godaddy and not sure if we could use your solution? We don't have control over the box. Will your solution still fit my needs?

Secondly for most of the solution that I read they had a pre-requisite of having the Adobe Acrobat to be installed (not reader) but fully licensed version? Is it required in this case?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>We are working on a product which requires a similar functionality of having the thumbnail generated for all the pdf files selected.<br />
After reading and researching a lot I am totally confused as our solution is hosted on godaddy and not sure if we could use your solution? We don&#8217;t have control over the box. Will your solution still fit my needs?</p>
<p>Secondly for most of the solution that I read they had a pre-requisite of having the Adobe Acrobat to be installed (not reader) but fully licensed version? Is it required in this case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan C. Luna H.</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-20572</link>
		<dc:creator>Juan C. Luna H.</dc:creator>
		<pubDate>Wed, 11 Aug 2010 22:21:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-20572</guid>
		<description>&#62; Update: Here is the code I used to convert the arguments to
&#62; null terminated byte arrays. There might be a better way to
&#62; do this in .Net, this is just the quick solution I’m using.

You can use this code:
public static byte[] StringToAnsi(string original)
{
    return System.Text.Encoding.ASCII.GetBytes(original + "");
}</description>
		<content:encoded><![CDATA[<p>&gt; Update: Here is the code I used to convert the arguments to<br />
&gt; null terminated byte arrays. There might be a better way to<br />
&gt; do this in .Net, this is just the quick solution I’m using.</p>
<p>You can use this code:<br />
public static byte[] StringToAnsi(string original)<br />
{<br />
    return System.Text.Encoding.ASCII.GetBytes(original + &#8220;&#8221;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahrooz</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-17692</link>
		<dc:creator>Shahrooz</dc:creator>
		<pubDate>Sat, 03 Apr 2010 10:38:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-17692</guid>
		<description>Hi, 
Thanks for code, 
But I have a problem and that is , when I call InitAPI it return a -100 error number, I dont know how solve the problem could u help me? 

Thanks again</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for code,<br />
But I have a problem and that is , when I call InitAPI it return a -100 error number, I dont know how solve the problem could u help me? </p>
<p>Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Klaus</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-17453</link>
		<dc:creator>Klaus</dc:creator>
		<pubDate>Tue, 23 Mar 2010 13:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-17453</guid>
		<description>Hello,

thanks for this great library. I have a problem getting this work on a webapplication. when i debug my webapplication ("F5" in Visual Studio 2008) it works great. But when i access the webapplication outside of vs2008 (http://localhost/...) the JPG doesn't get generated. There is also no exception thrown. 

The GS Bin is set in the PATH variable. The gsdll32.dll is in my system32-folder.

Maybe the security settings of the IIS-Server are wrong?

greetings
Klaus</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>thanks for this great library. I have a problem getting this work on a webapplication. when i debug my webapplication (&#8221;F5&#8243; in Visual Studio 2008) it works great. But when i access the webapplication outside of vs2008 (http://localhost/&#8230;) the JPG doesn&#8217;t get generated. There is also no exception thrown. </p>
<p>The GS Bin is set in the PATH variable. The gsdll32.dll is in my system32-folder.</p>
<p>Maybe the security settings of the IIS-Server are wrong?</p>
<p>greetings<br />
Klaus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-17268</link>
		<dc:creator>Tobias</dc:creator>
		<pubDate>Tue, 16 Mar 2010 15:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-17268</guid>
		<description>of course the first argument in the variable "args" has to be empty "" not the first argument of the method InitAPI ;)</description>
		<content:encoded><![CDATA[<p>of course the first argument in the variable &#8220;args&#8221; has to be empty &#8220;&#8221; not the first argument of the method InitAPI <img src='http://www.mattephraim.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-17267</link>
		<dc:creator>Tobias</dc:creator>
		<pubDate>Tue, 16 Mar 2010 15:26:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-17267</guid>
		<description>hi,

there is a lille error in your Wrapper.
The first argument of the arguments you supply in
the method InitAPI(gsInstancePtr, args.Length, args)
is allways ignored by the dll. 

So your arguments should start with 

 return new[]
    {
        "",
        "-q",                     
        "-dQUIET",
....

maybe you didn't recognize this behavior because -q and -dQuit do the same.

Tobias</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>there is a lille error in your Wrapper.<br />
The first argument of the arguments you supply in<br />
the method InitAPI(gsInstancePtr, args.Length, args)<br />
is allways ignored by the dll. </p>
<p>So your arguments should start with </p>
<p> return new[]<br />
    {<br />
        &#8220;&#8221;,<br />
        &#8220;-q&#8221;,<br />
        &#8220;-dQUIET&#8221;,<br />
&#8230;.</p>
<p>maybe you didn&#8217;t recognize this behavior because -q and -dQuit do the same.</p>
<p>Tobias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nike</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-15423</link>
		<dc:creator>Nike</dc:creator>
		<pubDate>Wed, 09 Dec 2009 09:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-15423</guid>
		<description>SPan,

You don't need to add DLL to references. This is not .NET but native PE file (Windows DLL).

Ghostscript should be installed with all it's libraries, and PATH variable should contain gs bin folder ("C:\Program Files\gs\gs8.70\bin" or other directory where you have gs installed )</description>
		<content:encoded><![CDATA[<p>SPan,</p>
<p>You don&#8217;t need to add DLL to references. This is not .NET but native PE file (Windows DLL).</p>
<p>Ghostscript should be installed with all it&#8217;s libraries, and PATH variable should contain gs bin folder (&#8221;C:\Program Files\gs\gs8.70\bin&#8221; or other directory where you have gs installed )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SPan</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-15360</link>
		<dc:creator>SPan</dc:creator>
		<pubDate>Fri, 04 Dec 2009 05:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-15360</guid>
		<description>Hi,

I've tried to use your code in Windows 7 and Windows XP with visualstudio 2008.When I try to add refrenece for gsdll32.dll to a Windows Forms project I got an error saying it is not a valid com component (gsdll32.dll)

Any idea how to overcome from this error and able to run the program?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve tried to use your code in Windows 7 and Windows XP with visualstudio 2008.When I try to add refrenece for gsdll32.dll to a Windows Forms project I got an error saying it is not a valid com component (gsdll32.dll)</p>
<p>Any idea how to overcome from this error and able to run the program?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blasius Riz</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-14663</link>
		<dc:creator>Blasius Riz</dc:creator>
		<pubDate>Wed, 04 Nov 2009 12:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-14663</guid>
		<description>Really the nicest wrapper for Ghostscript I have stumbled upon so far, great!
I have a question for you or anyone else out there who is using a ghostscript wrapper. I´m currently building a tool used in house under windows 7, 64 Bit, VS 2008, .NET 3.5.
I had the problem that ghostscript sometimes crashed with a AccessViolationException, this reproducibly happend when converting imageheavy PDF files. From my tests, I assume that exit and delete_instance didn´t close properly and ghostscript failed to create a new instance thereafter.
The crashes occured with both versions of ghostscript 8.70 and 8.64.
After I ran some tests on a Windows XP VM, I found out that the crashes didn´t happen when the application ran in 32 bit mode. So indeed, once I switched the build settings from Any CPU to x86, the chrashes stopped from happening.
Did anyone else have this problem and maybe found a solution other than targeting x86?
This is not a major showstopper yet, since all of our regular workstations in house run Windows XP 32 bit, but someday we will make the transit to windows 7 and maybe even 64 bit mode, so it would be nice to target x64 for those setups. On a side note, I used the 64 bit Version of ghostscript on the 64 bit setup if anyone wonders.</description>
		<content:encoded><![CDATA[<p>Really the nicest wrapper for Ghostscript I have stumbled upon so far, great!<br />
I have a question for you or anyone else out there who is using a ghostscript wrapper. I´m currently building a tool used in house under windows 7, 64 Bit, VS 2008, .NET 3.5.<br />
I had the problem that ghostscript sometimes crashed with a AccessViolationException, this reproducibly happend when converting imageheavy PDF files. From my tests, I assume that exit and delete_instance didn´t close properly and ghostscript failed to create a new instance thereafter.<br />
The crashes occured with both versions of ghostscript 8.70 and 8.64.<br />
After I ran some tests on a Windows XP VM, I found out that the crashes didn´t happen when the application ran in 32 bit mode. So indeed, once I switched the build settings from Any CPU to x86, the chrashes stopped from happening.<br />
Did anyone else have this problem and maybe found a solution other than targeting x86?<br />
This is not a major showstopper yet, since all of our regular workstations in house run Windows XP 32 bit, but someday we will make the transit to windows 7 and maybe even 64 bit mode, so it would be nice to target x64 for those setups. On a side note, I used the 64 bit Version of ghostscript on the 64 bit setup if anyone wonders.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Ephraim</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-13347</link>
		<dc:creator>Matthew Ephraim</dc:creator>
		<pubDate>Sat, 19 Sep 2009 18:30:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-13347</guid>
		<description>@Troy,

Thanks for posting this. I honestly had never run across your project before, but I'm glad there's a project out there that appears to be further along than I am.</description>
		<content:encoded><![CDATA[<p>@Troy,</p>
<p>Thanks for posting this. I honestly had never run across your project before, but I&#8217;m glad there&#8217;s a project out there that appears to be further along than I am.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy Howard</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-13252</link>
		<dc:creator>Troy Howard</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-13252</guid>
		<description>Matthew -- This looks great! I don't know if you know this already or not, but there's already an open source project that is solving the same problem (in much the same way), called Gouda. It's on Google's code hosting service at: 

http://code.google.com/p/gouda/

I started in on some work to implement the drawing surface callbacks. Right now, the text based callbacks for output/errors works, but I haven't successfully built a fully functional graphics surface for Ghostscript to render to. Haven't had much time to work on it lately, so not much has changed in the past year. 

If you, or anyone else would like to help out with that project, we could probably get more work done as a team, rather than having multiple projects. 

Also, for those of you who are interested in leveraging all the wonderful open source PostScript tools out there in your .Net code, there's another project that I started called Parrano which is a wrapper to PsLib ( http://code.google.com/p/parrano/ ).

Thanks,
Troy</description>
		<content:encoded><![CDATA[<p>Matthew &#8212; This looks great! I don&#8217;t know if you know this already or not, but there&#8217;s already an open source project that is solving the same problem (in much the same way), called Gouda. It&#8217;s on Google&#8217;s code hosting service at: </p>
<p><a href="http://code.google.com/p/gouda/" rel="nofollow">http://code.google.com/p/gouda/</a></p>
<p>I started in on some work to implement the drawing surface callbacks. Right now, the text based callbacks for output/errors works, but I haven&#8217;t successfully built a fully functional graphics surface for Ghostscript to render to. Haven&#8217;t had much time to work on it lately, so not much has changed in the past year. </p>
<p>If you, or anyone else would like to help out with that project, we could probably get more work done as a team, rather than having multiple projects. </p>
<p>Also, for those of you who are interested in leveraging all the wonderful open source PostScript tools out there in your .Net code, there&#8217;s another project that I started called Parrano which is a wrapper to PsLib ( <a href="http://code.google.com/p/parrano/" rel="nofollow">http://code.google.com/p/parrano/</a> ).</p>
<p>Thanks,<br />
Troy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Ephraim</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-11781</link>
		<dc:creator>Matthew Ephraim</dc:creator>
		<pubDate>Thu, 30 Jul 2009 17:32:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-11781</guid>
		<description>@Srikanth I really don't know if that's possible. I think Acrobat Reader may just be dynamically generating the thumbnails, like you said. I'm not sure that it's possible to store those thumbnails inside of the PDF.

You may want to look at a PDF generation library like &lt;a href="http://itextsharp.sourceforge.net/" rel="nofollow"&gt;iTextSharp&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>@Srikanth I really don&#8217;t know if that&#8217;s possible. I think Acrobat Reader may just be dynamically generating the thumbnails, like you said. I&#8217;m not sure that it&#8217;s possible to store those thumbnails inside of the PDF.</p>
<p>You may want to look at a PDF generation library like <a href="http://itextsharp.sourceforge.net/" rel="nofollow">iTextSharp</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srikanth</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-11774</link>
		<dc:creator>Srikanth</dc:creator>
		<pubDate>Thu, 30 Jul 2009 14:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-11774</guid>
		<description>Hi

Once thumbnails are created, is there anyway to embed them as thumbnails in the PDFs, so that it displays on the left side in the Adobe Reader? Though recent versions of Adobe Reader creates thumbnails dynamically, old versions dont. Thats why.

Thanks
Srikanth</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Once thumbnails are created, is there anyway to embed them as thumbnails in the PDFs, so that it displays on the left side in the Adobe Reader? Though recent versions of Adobe Reader creates thumbnails dynamically, old versions dont. Thats why.</p>
<p>Thanks<br />
Srikanth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Ephraim</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-10850</link>
		<dc:creator>Matthew Ephraim</dc:creator>
		<pubDate>Thu, 09 Jul 2009 05:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-10850</guid>
		<description>I finally posted the open sourced version of this &lt;a href="http://www.mattephraim.com/blog/2009/07/08/introducing-ghostscriptsharp/" rel="nofollow"&gt;here&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I finally posted the open sourced version of this <a href="http://www.mattephraim.com/blog/2009/07/08/introducing-ghostscriptsharp/" rel="nofollow">here</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Bird</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-10065</link>
		<dc:creator>Richard Bird</dc:creator>
		<pubDate>Tue, 09 Jun 2009 21:59:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-10065</guid>
		<description>I'd like to also say thanks for this solution. I too simply needed something to generate thumbs from PDFs, and this works perfect. You rock!</description>
		<content:encoded><![CDATA[<p>I&#8217;d like to also say thanks for this solution. I too simply needed something to generate thumbs from PDFs, and this works perfect. You rock!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Ephraim</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-9807</link>
		<dc:creator>Matthew Ephraim</dc:creator>
		<pubDate>Wed, 20 May 2009 22:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-9807</guid>
		<description>Thank you to everyone who has posted improvements to this code. Rather than continually updating this blog post, I'm planning on putting together an open source project some time in the near future that will wrap up this code. That way, anyone who has improvements can work on the code.</description>
		<content:encoded><![CDATA[<p>Thank you to everyone who has posted improvements to this code. Rather than continually updating this blog post, I&#8217;m planning on putting together an open source project some time in the near future that will wrap up this code. That way, anyone who has improvements can work on the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alin</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-9780</link>
		<dc:creator>alin</dc:creator>
		<pubDate>Tue, 19 May 2009 12:00:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-9780</guid>
		<description>hi,

can you help me detect the colored pages in a pdf files using this wrapper?

thanks</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>can you help me detect the colored pages in a pdf files using this wrapper?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C. Ross</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-9703</link>
		<dc:creator>C. Ross</dc:creator>
		<pubDate>Thu, 14 May 2009 14:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-9703</guid>
		<description>You're DLLImport statements could really be simplified to the following:  

        [DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")]
        private static extern int CreateAPIInstance(out IntPtr pinstance,
                                                IntPtr caller_handle);

        [DllImport("gsdll32.dll", EntryPoint = "gsapi_init_with_args")]
        private static extern int InitAPI(IntPtr instance, int argc, string[] argv);

        [DllImport("gsdll32.dll", EntryPoint = "gsapi_exit")]
        private static extern int ExitAPI(IntPtr instance);

        [DllImport("gsdll32.dll", EntryPoint = "gsapi_delete_instance")]
        private static extern void DeleteAPIInstance(IntPtr instance);


This would remove the need for some of your more complicated code (including StringToAnsi).

Thanks for all your hard work!</description>
		<content:encoded><![CDATA[<p>You&#8217;re DLLImport statements could really be simplified to the following:  </p>
<p>        [DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")]<br />
        private static extern int CreateAPIInstance(out IntPtr pinstance,<br />
                                                IntPtr caller_handle);</p>
<p>        [DllImport("gsdll32.dll", EntryPoint = "gsapi_init_with_args")]<br />
        private static extern int InitAPI(IntPtr instance, int argc, string[] argv);</p>
<p>        [DllImport("gsdll32.dll", EntryPoint = "gsapi_exit")]<br />
        private static extern int ExitAPI(IntPtr instance);</p>
<p>        [DllImport("gsdll32.dll", EntryPoint = "gsapi_delete_instance")]<br />
        private static extern void DeleteAPIInstance(IntPtr instance);</p>
<p>This would remove the need for some of your more complicated code (including StringToAnsi).</p>
<p>Thanks for all your hard work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andypro</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-9693</link>
		<dc:creator>Andypro</dc:creator>
		<pubDate>Wed, 13 May 2009 17:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-9693</guid>
		<description>I have another tip for refining the thumbnail creator further:  use ghostscript's -dUseCropBox option.  This will create a proper thumbnail image for pdfs whose cropbox is set differently than the mediabox.  I've converted about 20,000 pdfs so far - and while there aren't many that do this, there are some.</description>
		<content:encoded><![CDATA[<p>I have another tip for refining the thumbnail creator further:  use ghostscript&#8217;s -dUseCropBox option.  This will create a proper thumbnail image for pdfs whose cropbox is set differently than the mediabox.  I&#8217;ve converted about 20,000 pdfs so far - and while there aren&#8217;t many that do this, there are some.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andypro</title>
		<link>http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/#comment-9404</link>
		<dc:creator>Andypro</dc:creator>
		<pubDate>Wed, 29 Apr 2009 21:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattephraim.com/?p=47#comment-9404</guid>
		<description>Thanks for the terrific script Matthew.  I have it working on an ASP.NET page, Framework version 2.0.

A couple of notes on changes I made to get it working:
- I needed to put gsdll32.dll in my system32, or alternatively, load it with LoadLibrary.
- I needed to change the line return new[] to actually declare a temp string[] and return it explicitly at the bottom of the function.
- I added a call to Cleanup() at the bottom of your CallAPI(), because you must have called it somewhere outside of your code snippets.
- I replaced your instances of "var" to appropriate type names.  "var" must have represented something specific in your system that's not native to .NET I guess.

Thanks again for showing us how to implement something that should be truly simple but is, in fact, disgustingly difficult and frustrating!</description>
		<content:encoded><![CDATA[<p>Thanks for the terrific script Matthew.  I have it working on an ASP.NET page, Framework version 2.0.</p>
<p>A couple of notes on changes I made to get it working:<br />
- I needed to put gsdll32.dll in my system32, or alternatively, load it with LoadLibrary.<br />
- I needed to change the line return new[] to actually declare a temp string[] and return it explicitly at the bottom of the function.<br />
- I added a call to Cleanup() at the bottom of your CallAPI(), because you must have called it somewhere outside of your code snippets.<br />
- I replaced your instances of &#8220;var&#8221; to appropriate type names.  &#8220;var&#8221; must have represented something specific in your system that&#8217;s not native to .NET I guess.</p>
<p>Thanks again for showing us how to implement something that should be truly simple but is, in fact, disgustingly difficult and frustrating!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
