Skip to main content
Known Participant
December 1, 2023
Question

Page number in HTML

  • December 1, 2023
  • 4 replies
  • 1203 views

Is there a way to preserve page number(or convert page number to body text at the bottom) after exporting file to HTML.?

 

This is required as validation of HTML file , failes in some validators because of missing Page numbers.

This topic has been closed for replies.

4 replies

Kasyan Servetsky
Legend
December 6, 2023
Peter Kahrel
Community Expert
Community Expert
December 2, 2023

One of the purposes of those folio markers in Epubs and HTML is that it's possible in the Epub (or HTML) to determine the print-page equivalent of a given range of text in the Epub. And some organisations require them.

James Gifford—NitroPress
Legend
December 2, 2023

Okay. I haven't run into that. It sounds — to my fussy ear — like something of a committee hack to make print and e-book "match up" in ways they really shouldn't have to. I've done a few dual-format projects for things under demanding FAA requirements, and there are simply different rules for print and e-doc, not requiring that each be just like the other.

Peter Kahrel
Community Expert
Community Expert
December 2, 2023

I share your sentiment, James, but if that's what a customer wants, that's what they'll get.

Peter Kahrel
Community Expert
Community Expert
December 1, 2023

It's required in some HTML and/or Epub workflows to link/bookmark print folios.

You'll need a script to insert the page number at the foot of every page. That page number should be in a character style to enable further processing.

James Gifford—NitroPress
Legend
December 1, 2023

This is probably the technically correct answer; if you need an HTML version of a document with page numbers, you have to manually insert the page separator with any header/footer/[static] page number desired. It's a hack, really, used only, as Peter notes, to maintain page-content links.

 

But HTML — and reflowable EPUB — are inherently "one page" documents. Any pagination is a virtual effect of the browser or reader. These separators will have no effect on 'page' display, at all.

Known Participant
December 2, 2023

Hi Thanks for understanding. We do understand HTML and its one page flow. However when we need to validate epub for HTML, there are validators which reject these HTML files because of missing Page numbers. Hence plan is to add page number differently and after HTML generation convert those tags to anchor tags.

 

As i am a beginner, can i get a script to add pagenumbers under different tag.

Frans v.d. Geest
Community Expert
Community Expert
December 1, 2023

Page numbers in HTML? That makes little sense to me...

BobLevine
Community Expert
Community Expert
December 1, 2023

Makes zero sense to me.