As Arthur said, what you are looking for is called a film recorder. Unfortunately, you may be dissappointed with the results. The Polaroid Pallette line was popular and on the cheap end, but that was both in terms of price and quality. Some models only had 2k pixels accross if I remember right. Just because you get 4k addressable pixels accross, doesn't mean that is the resolvable features size. It was usually substantially less than that for under $5k film recorders. Essentially, the dots bled into each other.
There were high end film recorders that had crisp pixels at 4k accross, like the Management graphics Solitaire, but those were multiple $10k units. I don't know what's out there now on the used market, but perhaps you can find a bargain. As long as you don't expect the result to be much better in resolution than a good video projector, you'll probably be OK.
Another thing to consider is that most of these units were designed in the 1980s and 1990s so may be difficult to interface to a computer today. Some interfaced via SCSI and others via the parallel port, neither of which are around much anymore. Then they also will require a custom driver. Make sure that works on whatever OS you have unless you can dedicated some old machine to it.
By the way, in case anyone is wondering how these things work, most used a high res black and white CRT with a rotating filter wheel. The red filter would be rotated in place and the red component slowly scanned over the CRT, then the green, then the blue. The image was built up as a composite on the film. If you were to look inside during the process, you'd see little more than a dot or horizontal line on the CRT at any one time. It would take around a minute to a few minutes per frame. Some worked on video signals so would expose a whole color component at a time, but the exposure was still a few seconds per component. Since this all relied on analogy electronics, it would drift and regularly need to be calibrated. Some film recorders (Dunn camera is one I remember in particular) came with a light sensor probe and meter built in for this reason.