PrtFilterJobData

The PrtFilterJobData function is called to give the user DLL the opportunity to manipulate the printer data before it is printed. This allows the DLL to provide custom processing for print data sent to the print server.

void WINAPI PrtFilterJobData(
  void *UniqueID, 
  char **pBufPtr, 
  DWORD *pBufLen  
);
 

Parameters

UniqueID
Supplied parameter. The UniqueID value returned by the PrtFilterJobStart function to identify a print job.
pBufPtr
The print server passes the print data received from the host to the user DLL for processing in this buffer. The user DLL returns to the print server a pointer to a buffer of data to be printed. This outgoing pointer can be different from the received buffer pointer because the print data filter DLL can modify the data.
pBufLen
Indicates the length of the data passed in the buffer to the print server and the length of the buffer returned to the print server by the user-provided DLL.

Remarks

The data in the buffer is printable ASCII and/or printer control sequences if these are being sent in the print jobs. The buffer returned by the user DLL does not have to be the same as the buffer passed in. The returned buffer will always be freed by calling PrtFilterFree after the data has been spooled. The unique identifier parameter UniqueID is the identifier returned from a previous call to the PrtFilterJobStart function.

See Also

PrtFilterFree, PrtFilterJobStart