Christiaan, I wanted to say thank you for implementing this feature. It is exactly what I was looking for! I really appreciate you taking the time and effort to implement this! Thanks, Lane
What about modifying the strokeColor and fillColor of the CGContextRef before calling drawPage: toContext? Edit: updated links to strokeColor and fillColor
What about modifying the strokeColor and fillColor of the CGContextRef before calling drawPage: toContext?
Right. I'll let you know if I find anything about interfacing the SwiftUI APIs from Objective-C. That might or might not be possible. Sorry about the broken links. I have now fixed them.
This documentation might be useful.
Possibly also relevant
What about modifying the strokeColor and fillColor of the CGContextRef before calling drawPage: toContext?
OK. That's unfortunate. If there were a way of setting white text on black background (at least for simple text-heavy PDFs) using PDFKit, is that something that you would be willing to implement (again, assuming it could be done within PDFKit)?