HTML to EPUB
AI-generatedSummary
Convert an HTML article to a valid EPUB e-book file, optionally embedding remote images for offline use, and return it as a binary output.
Inputs
- Input Source (required) — Choose whether to provide HTML directly as a string or from a binary property on the input item.
- HTML (required) — The HTML string to convert to EPUB, required if 'Input Source' is 'HTML String'.
- Input Binary Property (required) — Name of the binary property containing the HTML, used if 'Input Source' is 'Binary'.
- Title (required) — Title of the e-book, used as chapter heading and navigation label.
- Output Binary Property — Name of the binary property to output the generated EPUB file to; defaults to 'data'.
- Additional Fields (optional collection) — Additional metadata and options including Author, Description, Publisher, Language (BCP-47 tag), File Name override, Identifier (UUID), Inline Images toggle (whether to download and embed remote images), Fetch Image Timeout (milliseconds), and Max Image Bytes (max size for embedded images).
Output shape
a list of items where each item includes JSON metadata and a binary property with the EPUB file
The output contains JSON with fileName, size, title, and count of images bundled. The EPUB binary is stored under the specified output binary property name. If the input HTML is empty or the Title is missing, the node throws an error unless 'continue on fail' is enabled, in which case errors are returned in the JSON. The EPUB is generated entirely in-memory with no external dependencies.
Examples
Example 1: Convert HTML string with inline images
Input Source=HTML String, HTML provided, Title set, Inline Images enabled (default). Output is an EPUB with images embedded for offline reading.
Example 2: Convert HTML from binary with file name override
Input Source=Binary, inputBinaryProperty='htmlInput', Title set, File Name set to 'MyBook.epub', Inline Images disabled. Output EPUB is generated from input binary HTML, images not embedded, and saved with custom file name.