Customized Data Stream Compression
Unidrv allows you to perform data compression operations using customized code. To perform customized compression operations, perform the following steps:
Provide a rendering plug-in that implements the IPrintOemUni::Compression method.
Include a CmdEnableOEMComp command entry in the printer's GPD file.
The IPrintOemUni::Compression method receives scan line data as input. The method must compress the data and then return the result to Unidrv. The CmdEnableOEMComp command entry specifies the command that must be sent to the printer so that the printer can accept the compressed data. For each scan line that is to be sent to the printer, Unidrv calls IPrintOemUni::Compression to compress the scan line data. Then, if this is the only compression method available, Unidrv sends to the printer the command specified by the CmdEnableOEMComp command entry, followed by the compressed data.
If the printer minidriver contains GPD entries that also enable Unidrv-supported compression methods, Unidrv tries each compression algorithm for each scan line and chooses the algorithm that produces the best result. For more information about Unidrv's compression capabilities, see Compressing Raster Data.
Only one customized compression method can be enabled at one time.