Exporting To PDF With Dark Mode Snippet Creates Thick White Borders

What I’m trying to do

I want to export my PDFs in dark mode as I find people who read them generally prefer that + it’s easier on the eyes. I was using this snippet I found online to save myself some time of making one myself and it works basically perfectly:

It adapts to my theme(royal velvet) and everything is fabulous: embeds, links, photos, etc all work fine … except it has these odd very thick white borders on each page of the document on all 4 sides

I don’t want these borders to be there, I want the entire background to be dark because as is it just looks strange and is still very bright on the eyes.

Things I have tried

I went through the forums and read a bunch of “export to PDF with dark mode/dark theme” posts and nobody mentions this problem. I also looked at the “issues” tab for that CSS-snippet and nobody else seems to have this problem either. It also doesn’t seem to be the “Royal Velvet” theme causing this problem either because the “default” dark theme does this too:

And I’ve been looking at the snippet going through it myself and I don’t see anything that adds margins or borders on the overall document. If anyone sees anything please let me know because it’s so close to perfection

You could contact Zamsyt on their GitHub page. As they made it, they may know a way around the issue (if possible).