The above do not preserve text, but produce images. Converting the resulting images into a PDF is done with a very simple Automator action, shown below:
The first ffmpeg command inverts the colors of the screen recording and the second ffmpeg command places images from the screen recording into a sub folder at the rate of 2 per second. jpg's in the sub folder, right click and choose the Automator action shown below to make a new PDF Use QuickTime to make a screen recording (m.mov) of the white background pdf while clicking from page to page at, say 2 pages every second.Here's a workaround for a large number of pages, but it involves using ffmpeg and Automator repeat for each page then File>Export>PDF.In the Adjust Color Tool, switch the outer handles as shown in the animated.
Here is a work around for those who want to use Preview: