Personal info for andyyy

Name: Andy Stutzman

Homepage: http://www.eringers.com

Notes: I like to work mainly with Delphi.

Recent diary entries for andyyy:
RSS

7 Jul 2004  »

I am currently working on a PDF Printer Distiller using Delphi and trying to make direct API calls to gsdll32.dll. It uses redmon to redirect the PostScript output to my Delphi program that then uses settings specified by the user to run gswin32c.exe to distill the PDF. I would like to be able to make direct API calls to gsdll32.dll so that I don't have to use gswin32c.exe and have GhostScript installed. I have found the Delphi GhostScript.pas interface, but I am having problems invoking the gs.gsRunString commands (RunStringBegin, RunStringContinue, RunStringEnd). I'm not sure exactly how it's supposed to be called. I saw some sample code for C++ that showed running the ps2pdf command but I have tried that and it didn't work...

var
code: Integer;
begin
Cmd := 'ps2pdf -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=c:\testing.pdf -c .setpdfwrite -f c:\test.ps';
gs.gsRunString(Cmd,0,code);

But this fails. I've tried breaking it apart and sometimes the integer that gets assigned to code comes back as 0 (which means no errors) but other times it comes back with -21, -17 and -8 mostly. I can't find anywhere that tells what these error codes mean so it's hard to figure out what I'm doing wrong. If anyone can help, feel free to email: andy@eringers.com

Thank you.

Others have certified this person as follows:

[ Certification disabled because you're not logged in. ]

[ Home | Articles | Account | People | Projects ]