how to set -sDEVICE param ?
I am using this sample code,
/* Example of using GS DLL as a ps2pdf converter. */
#ifdef _Windows
/* Compile with:
* cl -D_Windows -Isrc -Febin\ps2pdf.exe ps2pdf.c bin\gsdll32.lib
*/
#include <windows.h>
#define GSDLLEXPORT __declspec(dllimport)
#endif
#include "errors.h"
#include "iapi.h"
gs_main_instance *minst;
int main(int argc, char *argv[])
{
int code;
int exit_code;
const char * gsargv[10];
int gsargc;
gsargv[0] = "ps2pdf"; /* actual value doesn't matter */
gsargv[1] = "-dNOPAUSE";
gsargv[2] = "-dBATCH";
gsargv[3] = "-dSAFER";
file://gsargv[4] = "-sDEVICE=pdfwrite";
gsargv[4] = "-sDEVICE=Xerox Phaser 8200DX";
gsargv[5] = "-sOutputFile=out.pdf";
gsargv[6] = "-c";
gsargv[7] = ".setpdfwrite";
gsargv[8] = "-f";
gsargv[9] = "input.ps";//this is the default testing PS file
gsargc=10;
code = gsapi_new_instance(&minst, NULL);
if (code < 0)
return 1;
code = gsapi_init_with_args(minst, gsargc, gsargv);
gsapi_exit(minst);
gsapi_delete_instance(minst);
// if ((code == 0) || (code == e_Quit))
// return 0;
return 1;
}
with "-sDEVICE=pdfwrite setting, it can convert ps to pdf,
I want to send that ps file to my printer, don't how to set all the argv,
my printer is Xerox Phaser 8200DX on a LAN,
when I run the code, it says "unknown device Xerox Phaser 8200DX", don't
know what name should be set here, and all the argv settings.
|