![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jun 2023
Device: none
|
Exporting Epubs -> PDF with page #'s and TOC intact?
Hello!
I've a EPUB file that I know has a intact TOC and page numbers that match the physical copy (If I open the file up in Vitalsource's bookshelf, the page numbers are listed and the TOC works). How do I go converting this epub to a PDF that other people can browse? The issue I'm having is I'd like to share this book as a PDF with other people who may not have a physical version but they can still reference the correct page number as what's listed in the physical book. |
![]() |
![]() |
![]() |
#2 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,930
Karma: 153006036
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Is the book out of copyright or otherwise public domain. If not, you are going to have to look elsewhere for help.
Are the page numbers from a page-map.xml or embedded in the epub navigation document? |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jun 2023
Device: none
|
Quote:
<span role="doc-pagebreak" epub:type="pagebreak" aria-label="**" id="pagebreak_**"/> where ** is the page number. |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jun 2023
Device: none
|
I'm able to split the epub in to a file that has a separate XHTML file per page, my question now is how do I convert each XHTML file to fit on one "page" in a pdf?
|
![]() |
![]() |
![]() |
#5 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,930
Karma: 153006036
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
You might want to try converting the epub to docx in calibre, then editing the .docx in Word or LO Writer and printing to PDF from there. Unless you are trying to convert a fixed layout ePub3 which is about the only epub format that does 1 page per file. In that case you are pretty much out of luck with any automated conversion process.
Edit: if you see a line like <meta property="rendition:layout">pre-paginated</meta> in the .opf, you are dealing with a fixed layout epub. May I ask the title and author of the book? Last edited by DNSB; 06-18-2023 at 11:46 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,238
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Or simply Export As PDF in later LO Writer and Word versions, or even Word 2002 with PDF plugin, after Calibre docx or RTF conversion.
|
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Both apps will display page numbers. |
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jun 2023
Device: none
|
|
![]() |
![]() |
![]() |
#9 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,930
Karma: 153006036
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The xhtml files in a reflowable epub are often a chapter not a page.
|
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jun 2023
Device: none
|
I can split the xhtml files in to pages by using calibre to convert from an epub to an epub and setting the "Chapter mark" to none and "Insert page breaks before" to "//h:span[@role="doc-pagebreak"]"
|
![]() |
![]() |
![]() |
#11 | |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,238
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
Note also different fonts at same "size" are different sizes on the page and even at same line-height may be different width per word. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC without page numbers for pdf | discdiver | 0 | 11-08-2019 02:30 PM | |
HTML to PDF Conversion TOC position and page number | olimpoweb | Conversion | 4 | 03-14-2018 05:13 PM |
html to pdf, TOC Page# trouble from CSS... | MrBen | Conversion | 5 | 11-19-2014 07:29 AM |
calibre EPUB->PDF: page numbers in printed TOC? | dancal | Conversion | 13 | 06-13-2013 08:32 PM |
Converting to PDF help? Bad page breaks and no TOC produced. | Jokerfwb | Conversion | 6 | 07-24-2012 10:36 PM |