ghostscriptsharp icon indicating copy to clipboard operation
ghostscriptsharp copied to clipboard

GhostscriptSharp

Open kegluneq opened this issue 13 years ago • 2 comments

mephraim,

I used your code extensively in a project I was working on and made some feature additions along the way. I thought I'd let you know in case you wanted to include some or all of them in the main.

Bear with me here - I'm new to github and am having a bit of trouble with navigating (i.e. the three extra commits trying to clean up my README markdown syntax)

Best,

kegluneq avatar Mar 15 '11 19:03 kegluneq

kegluneq,

Wow, this is a ton of work! Thanks for all of your changes! I've only had a chance to quickly look over the changes, and it looks like good stuff. You even updated the tests! That doesn't always happen :)

I haven't had a chance to check everything out, because I'm on my Mac right now and I don't have Windows installed on it. It looks like the existing API stuff works the way it always did. Is this the case? If it is, I'd love to pull the changes in, because it looks like you've added a ton extra functionality that would come in handy.

Let me know, and if the old API still works, and it won't break people's existing usage of the code, I'll definitely pull in your changes.

Thanks,

Matt

mephraim avatar Mar 16 '11 06:03 mephraim

mephraim,

Thanks! I'm glad you're interested in incorporating the changes! As far as the API goes, I changed the GhostscriptWrapper as little as possible - all the methods are the same except CallAPI which now uses the static methods from the API class instead of the hooks defined directly within the class. So this shouldn't cause any errors, but I've said that enough that I know it's a dumb thing to say :)

The only other changes were:

  • API
    • Moved the gsdll32 hooks into the API class
    • Added additional API hooks
  • Settings
    • Moved the Settings objects into their own folders
    • Provided a DefaultDevice and DefaultPageSize within GhostscriptSettings
    • Allowed specifying the # of rendering threads, defaulted to # of logical processors (or 1 if this throws an Exception)

Let me know if you would like any additional information.

Last, thanks for putting this code out there in the first place! I had been looking for a way to deal with converting Postscript to PDF cleanly for a while, and stumbling onto your code was a huge help in getting me where I needed to go.

Best, -Tim

kegluneq avatar Mar 16 '11 15:03 kegluneq