I am writing a PS driver, and i want to generate the ps file as the output of
the print command. I have hooked out the DrvSendPage function, but I am not
able to trap the output ps data stream. I also tried to write the surface's
pixels in an output file, but the pvBits pointer is always null.

FILE *fp = fopen("c:\\printjob.ps", "wb");
if (fp)
{
fwrite(pso->pvBits, pso->cjBits, 1, fp);
fclose(fp);
}

Please suggest me some way to go about it.

Thanks
asb