by digvijay
4. September 2008 20:18
Sometime last year in a blog post I wrote about using GhostScript in a .NET application. Recently I had to work on something similar and I thought that why not extend the wrapper I did that time. I am now adding the stdio callbacks, a parameter builder and encapsulating other options as enumerations. At the same time I am also writing some NUnit tests for the same, just as a way to debug the code I am writing :)
Anyhow, I shall complete this in September only working in my spare time over weekends and release it as a commercial or donation-ware and we will see how many people actually use it. It really does not make sense making something commercial unless you have the time to actually support it!
Anyway, this was just a thought and I hope to post the finished wrapper here soon!
by Digvijay
3. September 2007 23:27
I was just getting bored today so watched a few movies and then decided to try something that i couldn't because of heavy workload. I wanted to try out using the GhostScript DLL in C# and if i could write a wrapper for the same.
So after 30 minutes of hit and trial, I believe i have got the P/Invoke signatures working fine except for when calling gsapi_exit and gsapi_delete_instance which give some "corrupt memory" messages. i have just omitted them for now but yes, i got it to work.
But the output was bulky, convering a 250KB PDF to 300x300 tiff24 took almost 220 MB!!!
Anyway, here is the code for anyone to take a look at and try it out.
GhostConvert.NET.rar (1.09 mb) (link removed because of a user comment)
I shall also put the full wrapper that I intend to write sometime this week in some other post. Drop in any comments if you like.