Hi Brett — running into a few distinct issues with PDF export when using a custom Marked Style. I saw there are a few versions of this, but I asked Claude to give me some more specifics:
Environment: Marked 3 (direct download version), macOS Tahoe 26.5.1. Custom CSS file in ~/Library/Application Support/Marked/Custom CSS/, used as the document's selected style.
Issue 1 — Export → Paginated PDF doesn't reflect CSS file edits
After editing and saving the active custom CSS file, subsequent Paginated PDF exports look the same as before the edit. The behaviour persists after:
⌘Q + relaunching Marked
removing the style from Preferences → Style and re-adding it
closing and reopening the document
Preview and HTML export do reflect the same CSS edits immediately. Only Paginated PDF appears unaffected.
Issue 2 — Export → Paginated PDF renders content at a larger scale than the CSS specifies
With the body font set to 10pt in CSS, Paginated PDF renders the body and the letterhead noticeably larger — the letterhead block blows out vertically, pushes the date and "Invoice" heading further down, and the whole document spans two pages. The same CSS rendered via Continuous PDF or File → Print → Save as PDF produces the expected scale and fits on a single page. "Override base font size" in the export dialog is unchecked.
Issue 3 — Export → Continuous PDF: certain CSS properties on #wrapper have no visible effect
On #wrapper, the following CSS produces no visible change in the resulting Continuous PDF: shorthand margin, individual margin-top/right/bottom/left, padding, and transform: translateX(...). max-width combined with margin: 0 auto does affect layout (the wrapper centres on the page). Marked's Export → Margins dialog values also appear to have no effect on the Continuous PDF output.
The net effect for a DIN 5008 letter (which needs asymmetric 25mm/20mm margins for window-envelope alignment) is that the wrapper renders centred and close to the top-left of the page, with no obvious way to position it.
What does work: File → Print → Save as PDF (macOS system print dialog). Live CSS edits show up, the document renders at the size the CSS specifies, and the page margins behave as expected.
Happy to share the CSS, test Markdown, and the resulting PDFs if you'd like to reproduce. Since it's my invoice template with personal details on it, I'd prefer not to post it here, but in case something in there is causing the issue, it seems sensible not to alter it much.
Cheers,
Andy