Someone asked in the Instantiation support forum how to wrap the ghostscript dll. I took a look at that library, did some work and published a small wrapper around that dll – just to produce a pdf document. Actually I do not like Ghostscript, because the license is so restrictive, that nobody seems to be able to use that library in any non-gpl software – and the commercial licenses are …
Please be aware of the GPL/commercial license questions. Though I published my wrapper under the MIT license, it does not mean, that the usage of GHostscript is free. This license is only available for the part of this wrapper. If your program is using Ghostscript as part – either your software should be published under GPL license or you have to buy the commercial license for Ghostscript (which is very expensive !).
Load the configuration map “MSKGhostscriptInterface” and execute the following example code. Please change the path strings according to your situation and make sure, that VA can find the dll (that means: change your PATH settings).
| anInstance anArray | anArray := Array new: 10. anArray at: 1 put: 'ps2pdf' ; at: 2 put: '-dNOPAUSE' ; at: 3 put: '-dBATCH' ; at: 4 put: '-dSAFER' ; at: 5 put: '-sDEVICE=pdfwrite' ; at: 6 put: '-sOutputFile=m:\out.pdf' ; at: 7 put: '-c' ; at: 8 put: '.setpdfwrite'; at: 9 put: '-f' ; at: 10 put: 'm:\escher.ps'. anInstance := MSKGSWrapper new initialize newInstance: nil. anInstance initWithArgs: anArray ; exit; deleteInstance.