Browser
For people who want to choose which browser draws the PDF, or who see "No usable Chrome/Chromium browser found".
The PDF is drawn by a Chromium-based browser running in the background. Your default browser does not change, and nothing is downloaded unless you ask.
Which browser is used
Without any setting, the first one that starts is used:
- Google Chrome
- Microsoft Edge
- Chromium downloaded with
install-browser
Firefox and Safari cannot draw the PDF. If you use them, install Chrome or Edge alongside, or download Chromium once:
npx -y markdown-pdf-export install-browserThe download is about 200 MB and happens once.
Choose a browser
Set MARKDOWN_PDF_BROWSER to try one browser only:
| Value | Browser |
|---|---|
chrome | Google Chrome |
msedge | Microsoft Edge |
chrome-beta, chrome-dev, chrome-canary | a Chrome preview channel |
msedge-beta, msedge-dev, msedge-canary | an Edge preview channel |
chromium | the Chromium from install-browser |
| a file path | that browser program |
MARKDOWN_PDF_BROWSER=msedge npx -y markdown-pdf-export report.mdOther Chromium-based browsers (Brave, Vivaldi, a Chromium build) work with a path to the program, but are not tested by the project. On macOS:
MARKDOWN_PDF_BROWSER="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser" \
npx -y markdown-pdf-export report.mdIn an editor task or an assistant entry, set it in the env block (in VS Code tasks, inside options):
"env": { "MARKDOWN_PDF_BROWSER": "msedge" }Check which browser is used
npx -y markdown-pdf-export doctorThe "Browser" line shows whether a browser was found and its version. doctor --json also shows launch_options: {"channel":"chrome"} for Chrome, {"channel":"msedge"} for Edge, {"channel":"chromium"} for the downloaded Chromium, {"executablePath":"..."} for a path.
"No usable Chrome/Chromium browser found"
The message lists each browser tried and why it failed. Fix it with one of:
- Install Google Chrome or Microsoft Edge.
- Run
npx -y markdown-pdf-export install-browser. - Set
MARKDOWN_PDF_BROWSERto a Chromium-based browser.
If MARKDOWN_PDF_BROWSER is set, check it first: only that browser is tried, so a wrong path gives this error even when Chrome is installed.
