Repository navigation
Long e-books to PDF: rhwp time limit follows the text, calibre PDF route - #131
Merged
Merged
Conversation
β¦ute (#127) rhwp's export-pdf had a fixed 2-minute limit, so a 400+ page EPUB β HWPX β PDF failed while rhwp was still working. rhwp renders about 1 s per KB of section XML (some 4 s per page of a novel on an i7-1185G7), so every rhwp run now gets 2 min + 30 min per MB of unpacked Contents/section*.xml (an HWP counts three times its size), at most 60 min. The progress estimate scales the same way. A time-out fails with its own message, which suggests ranking calibre above the HWPX writer for e-books when calibre is installed. calibre now makes PDFs of EPUB, MOBI, AZW3, AZW, PRC, FB2, HTMLZ, TXTZ and the formats only it reads (A4, page numbers). The edges cost 23: the built-in route stays the default, and calibre wins once it is ranked above the HWPX writer in Settings β Engines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #127.
Long e-books (400+ pages) to PDF went EPUB β HWPX (built in) β PDF (rhwp) and failed after rhwp's fixed 2-minute limit, while rhwp was still rendering. Ranking calibre first didn't help: calibre had no e-book β PDF edge.
rhwp time limit follows the document
export-hwpxandconverttake seconds.Contents/section*.xml, capped at 60 min, so a hung rhwp is still stopped. An HWP counts 3Γ its file size, since its text is deflated. Pictures don't raise the limit.error.rhwp_timeout. When calibre is installed,error.rhwp_timeout_calibresuggests moving Calibre above the HWPX writer in Settings β Engines for e-books. Filee never switches engines by itself.calibre as an e-book β PDF engine
--paper-size a4 --pdf-page-numbers.Tests
π€ Generated with Claude Code