Converting PDF to Dark Mode on macOS While Preserving Search Functionality

I’m looking for a way to convert PDF documents to dark mode on macOS while preserving the search functionality and text. Ideally, I would like to achieve this using AppleScript, a macOS Quick Action, or any other utility.

Are there any CLI packages that can help with this task? Additionally, if you have any recommendations for existing projects or best practices, please share them.

Thank you!

Dark mode is an app feature not a property or attribute of a PDF. Try the options in this thread.

I’m trying to use Dark Reader to enable dark mode for PDFs in Safari, but it’s not working. While Dark Reader successfully alters other websites, it doesn’t seem to affect PDFs. Do you know how to grant Dark Reader the necessary permissions to modify PDFs in Safari?

PDFs are not web pages. Dark Reader is for web pages as far as I’m aware as it is manipulating the underlying CSS to restyle the page. PDFS are self contained so there’s no DOM styling for it to access. It isn’t that it could not be done, only that it would be a different feature set because it is an entirely different type of asset it is manipulating and it would need to be done in a different way.

I don’t know how to do this. The best dark mode PDFs I’ve seen are with Sioyek, but I’m not sure how to make that into a quick action so you can open a dark mode PDF in another PDF reader.

I want to keep using the native preview of macOS