View Single Post
Old 04-17-2025, 02:07 AM   #1
corban123
Junior Member
corban123 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2025
Device: Kobo B&W
Unable to get page break to apply properly on an EPUB

Hey everybody,

I'm currently attempting to go from PDF -> EPUB -> EPUB, where I'm able to capture the large titles within the PDF and convert those into page breaks.
Despite my best attempts, I am consistently unable to get the page breaks to to be generated, and I'm curious if somebody may know whether or not I'm making an obvious mistake.

So the current idea was to convert the PDF -> EPUB with no page break settings, and then converting that new EPUB into a second EPUB with the page break adds since the formatting would be more consistent.

The area looks like

Code:
<p class="calibre1"><i class="calibre4">Blah blah blah ^ ^;</i></p>
<p class="calibre1"><span class="calibre2">557. Episode 2. Rewrite (2)</span></p>
<p class="calibre1">Blah blah blah blah</p>
with the XPath being
Code:
//p[re:test(span[@class='calibre2'], '.*episode.*', 'i')]
.
such that it'll page break before the `episode 557`.
Even attempting to manually put in 557 instead of `.*episode.*` doesn't seem to cause the page break to be created.

Thanks for any help you may be able to provide!
corban123 is offline   Reply With Quote