| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-12-30 | 1.5 kB | |
| v1.0.7 source code.tar.gz | 2025-12-30 | 14.7 MB | |
| v1.0.7 source code.zip | 2025-12-30 | 14.7 MB | |
| Totals: 3 Items | 29.4 MB | 0 | |
This release adds support for including cover images in both Markdown and EPUB conversions, enhancing the output format options.
What's Changed
Features
- Cover Image Support: Added
includes_coverparameter to bothtransform_markdownandtransform_epubfunctions, allowing you to include the PDF's cover page as an image in the output in https://github.com/oomol-lab/pdf-craft/pull/319 - For Markdown conversion: The cover image is saved to the images folder and can be referenced in your document
- For EPUB conversion: The cover image is properly embedded in the EPUB file structure
- Default value is
Falsefor Markdown (to maintain backward compatibility) andTruefor EPUB
Example Usage
Markdown with Cover
:::python
from pdf_craft import transform_markdown
transform_markdown(
pdf_path="input.pdf",
markdown_path="output.md",
markdown_assets_path="images",
includes_cover=True, # Include cover image
)
EPUB with Cover
:::python
from pdf_craft import transform_epub, BookMeta
transform_epub(
pdf_path="input.pdf",
epub_path="output.epub",
includes_cover=True, # Include cover image (default)
book_meta=BookMeta(
title="Book Title",
authors=["Author"],
),
)
Full Changelog: https://github.com/oomol-lab/pdf-craft/compare/v1.0.6...v1.0.7