View Single Post
Old 04-17-2025, 09:49 AM   #5
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,191
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
The easiest way to do what you want is to convert the PDF to an epub with one big html file,then use the editor split funtion at your chapter heading.

bernie

Quote:
Originally Posted by corban123 View Post
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!
gbm is offline   Reply With Quote