From Tracker Software PDF SDK
Change colors to grayscale in the specified rectangle area.
HRESULT ToGrayScale([in] RECT* stRect);
- [in] Pointer to a RECT structure which defines the rectangular area where colors should be grayscaled. If this parameter is NULL, the entire page will be grayscaled.
Note:Please note that processing of part of the page is not supported for some internal formats. For example, it is not supported for indexed images, because the pixels in such images do not contain a color, but an index into a color table (or palette) which is common for the entire page
Returns S_OK if operation was successful or error code in other cases.