The following information is provided as is, and the authors take no responsibility for the correctness.
When needing to create a new print driver, writing one from scratch is usually the last resort. Microsoft provides two pro-forma drivers - PostScript and Unidriver - which are able to handle the great bulk of printing requirements, and they have a mechanism to extend their drivers with customized plugins. This includes customizing the UI and customizing the rendering DLL.
There are a LOT of COM interfaces to make this work, and it’s really quite confusing. Microsoft’s documentation starts here: