Install
openclaw skills install epub-to-pdfConvert EPUB ↔ PDF bidirectionally. EPUB→PDF preserves layout for analysis; PDF→EPUB compresses and reflows for distribution and ereaders.
openclaw skills install epub-to-pdfbrew install calibre)ebook-convert with formatting optionsebook-convert with reflowable settingsresearch/sources/ for distribution or ereader useebook-convert input.epub output.pdf
ebook-convert input.epub output.pdf \
--pdf-standard-font "sans" \
--paper-size "a4" \
--margin-left 20 \
--margin-right 20 \
--margin-top 20 \
--margin-bottom 20 \
--pdf-mono-family "mono"
Note: Valid font families are: serif, sans, mono (not Helvetica, etc.)
ebook-convert input.pdf output.epub
ebook-convert input.pdf output.epub \
--output-profile "tablet" \
--paper-size "a4"
Note: ebook-convert auto-detects chapters from PDFs. Inspect the output EPUB to verify structure.
# Convert EPUB to PDF for analysis
ebook-convert "/path/to/input.epub" "/path/to/research/sources/output.pdf"
# Verify and check size
ls -lh "/path/to/research/sources/output.pdf"
# Render pages for visual inspection
pdftoppm -png "/path/to/research/sources/output.pdf" "/tmp/preview/page"
# Convert PDF to EPUB for distribution
ebook-convert "/path/to/input.pdf" "/path/to/research/sources/output.epub"
# Verify compression
ls -lh "/path/to/input.pdf" "/path/to/research/sources/output.epub"
# (EPUB will typically be 30-50% of PDF size)
System package:
# macOS (Homebrew)
brew install calibre
# Ubuntu/Debian
sudo apt-get install -y calibre
# Fedora/RHEL
sudo dnf install calibre
calibre includes ebook-convert and supports many formats:
research/sources/ with descriptive namesAuthor-Title.pdf, title-yyyy-mm-dd.epubfile output.pdf confirms it's a valid PDFcontent.opf for auto-detected chaptersunzip -t input.epubebook-convert input.epub output.pdfunzip -p input.epub | grep -r "html") and convert to markdown--verbose to see what calibre detected: ebook-convert input.pdf output.epub --verbose--output-profile "tablet" for better compressionebook-convert maintains structure, typography, imagesunzip -t input.epub (EPUBs are ZIP files)ebook-convert input.epub output.pdf --verbose for error details✅ SHELLFISH.epub → SHELLFISH.pdf (73 KB → 639 KB, layout preserved, 89 pages)
✅ SHELLFISH.pdf → SHELLFISH-test.epub (639 KB → 262 KB, chapters auto-detected, 24 parts)
EPUB ↔ PDF bidirectional conversion pipeline ready. Last tested: 2026-04-29 | Calibre v5.x