Marx
Markdown to PDF using WebKit. Replacement for markdown2pdf.
Install / Use
/learn @rmondello/MarxREADME
Marx: Markdown & CSS => PDF using WebKit
A convenient way of publishing Markdown and CSS to a PDF using WebKit as the printer. Huge shout-out to Jakob Truelsen and the fine people at wkhtmltopdf for making this possible.
Install
- Add Markdown.pl to your PATH.
- Add wkhtmltopdf to your PATH.
- Add Mark.rb to your PATH.
Use
-
Markdown => html
Marx.rb in.mdown out.html
-
Markdown => pdf
Marx.rb in.mdown out.pdf
-
Markdown + CSS => pdf
Marx.rb in.mdown out.pdf -s style.css
-
Override file extension inference
Marx.rb in.mdown out -f html
PDF Options
Any arguments that Marx.rb doesn't recognize are passed to wkhtmltopdf. To see all of the options wkhtmltopdf supports, run:
wkhtmltopdf -H
For convenience, here are some useful ones:
-g, --grayscale PDF will be generated in grayscale
-l, --lowquality Generates lower quality pdf/ps. Useful to
shrink the result document space
-O, --orientation <orientation> Set orientation to Landscape or Portrait
(default Portrait)
-s, --page-size <Size> Set paper size to: A4, Letter, etc.
--title <text> The title of the generated pdf file (The
title of the first document is used if not
specified)
-B, --margin-bottom <unitreal> Set the page bottom margin (default 10mm)
-L, --margin-left <unitreal> Set the page left margin (default 10mm)
-R, --margin-right <unitreal> Set the page right margin (default 10mm)
-T, --margin-top <unitreal> Set the page top margin (default 10mm)
--background Do print background (default)
--no-background Do not print background
--images Do load or print images (default)
--no-images Do not load or print images
--zoom <float> Use this zoom factor (default 1)
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
