Convert Markdown files to PDF inside VS Code.
- Command:
Markdown to PDF: Convert File - Right-click
.mdin Explorer and convert directly from the context menu - Select a
.mdfile and generate a.pdffile - Optional auto-open of the generated PDF file
- Configurable output folder and overwrite behavior
mdtopdfext.outputFolder: Target folder for generated PDF files.- Empty: save next to source
.md - Relative: resolved from the first workspace folder
- Absolute: used directly
- Empty: save next to source
mdtopdfext.overwriteExisting: Overwrite existing.pdffile if present.mdtopdfext.openAfterConvert: Open generated PDF file after conversion.mdtopdfext.chromeExecutablePath: Optional path to Chrome/Chromium executable used by the converter.
npm run compile: Compile TypeScriptnpm run watch: Watch and compile on changesnpm run lint: Run ESLintnpm test: Run extension tests
- Install dependencies:
npm install - Press
F5in VS Code to launch Extension Development Host - Convert using either:
- Explorer right-click on a
.mdfile ->Markdown to PDF: Convert File - Command Palette ->
Markdown to PDF: Convert File
- Explorer right-click on a
- Install VSCE globally:
npm i -g @vscode/vsce - Login once:
vsce login michaelsam94 - Publish:
vsce publish
