Install
openclaw skills install @hellobigbean/epub-to-pdf-skillConvert EPUB e-books to PDF using ebooklib + WeasyPrint with proper CJK font support.
openclaw skills install @hellobigbean/epub-to-pdf-skillConvert .epub files to PDF. Works for Chinese/Japanese/Korean text.
apt-get install -y weasyprint
pip3 install --break-system-packages ebooklib beautifulsoup4 lxml
CJK fonts required:
/root/.openclaw/workspace/skills/pdf-maker/NotoSansCJKsc.ttf/root/.openclaw/workspace/skills/pdf-maker/NotoSansCJKscB.ttfpython3 scripts/epub2pdf.py <input.epub> <output.pdf>
ebooklib reads all ITEM_DOCUMENT entries from the EPUBBeautifulSoup + lxml strips <script>, <style>, <link>, <meta> tags@font-face CSSWeasyPrint renders combined HTML to A4 PDF (2cm margins, justified)| Symptom | Fix |
|---|---|
| WeasyPrint import fails | apt-get install weasyprint |
| CJK characters garbled | Ensure font TTF path is correct (TTC collections won't work) |
| Empty / tiny PDF | EPUB has no readable document entries — check TNC count |
| calibre root sandbox error | Don't use calibre; use this script instead |