Skip to content

File > Print produces blank page in 1.5.2 on macOS 26.5.1 (preview renders correctly) #228

Description

@jonguttman

Summary

QLMarkdown version: 1.5.2
macOS version: 26.5.1 (Build 25F80)

File > Print opens the Print dialog and prints, but the resulting page is completely blank — no rendered content. The Quick Look / in-app preview panel renders the Markdown correctly (headings, tables, code blocks all look good).

Steps to reproduce

  1. Open any .md file in QLMarkdown 1.5.2
  2. Confirm the preview renders correctly (heading, table, etc.)
  3. File > Print (or ⌘P) → Print
  4. Resulting PDF or printed output is a blank white page

Expected behavior

The printed/PDF output should match the on-screen preview — rendered HTML with styled headings, tables, and code blocks.

Actual behavior

Blank white page. No content at all.

Root cause hypothesis

The app uses a WKWebView to render Markdown. On macOS 26.x, it appears the WKWebView print operation initiates before the webview has finished laying out the loaded content. The preview (display path) works because it can wait for layout; the print path does not.

This is not a user configuration issue — the same file previews correctly in the same app session.

Workaround

Render via qlmarkdown_cli (at /Applications/QLMarkdown.app/Contents/Resources/qlmarkdown_cli) and pipe through Chrome headless to produce a PDF:

qlmarkdown_cli input.md -o /tmp/out.html
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --headless=new --print-to-pdf=/tmp/out.pdf --print-to-pdf-no-header \
  --no-sandbox "file:///tmp/out.html"
open -a Preview /tmp/out.pdf

This workaround produces correctly-formatted output. I've packaged it as a macOS Quick Action (Automator Service) for convenience.

Additional context

  • The CLI (qlmarkdown_cli) works correctly — the issue is specific to the GUI print operation
  • Tested with multiple .md files; all show the same blank-print behavior
  • The print dialog itself opens normally; the issue is the rendered output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions