How to set a first page to be displayed in ePUB format
Moderators: Alexander Halser, Tim Green
-
- Posts: 90
- Joined: Wed Mar 30, 2016 1:53 pm
- Location: Stockholm, Sweden
- Contact:
How to set a first page to be displayed in ePUB format
Hi,
When generating CHM or Web help I get my first page when opening the help file.
When I open the ePUB generated from the same project I get the table of content.
My default viewer (Calibre) displays the table of content in a separate section in the same way as the CHM does.
How can I set the ePUB output to do the same as CHM displaying the first page instead of the Table of Content?
When generating CHM or Web help I get my first page when opening the help file.
When I open the ePUB generated from the same project I get the table of content.
My default viewer (Calibre) displays the table of content in a separate section in the same way as the CHM does.
How can I set the ePUB output to do the same as CHM displaying the first page instead of the Table of Content?
Senior Test Engineer & Technical Writer
Flowbird group
Flowbird group
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: How to set a first page to be displayed in ePUB format
Short answer: you cannot. An ePUB ebook does not have a "default" page to start with. The default is in most cases the TOC or the cover page (if you add a cover page in the configuration). After opening an ePUB, most readers set an internal bookmark and remember the last page the reader was on.How can I set the ePUB output to do the same as CHM displaying the first page instead of the Table of Content?
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
-
- Posts: 90
- Joined: Wed Mar 30, 2016 1:53 pm
- Location: Stockholm, Sweden
- Contact:
Re: How to set a first page to be displayed in ePUB format
Hi alexander,
Was already afraid so.
Is there a way to generate the cover page in some way?
I do have a copyright page I like to include with some variables on it.
Including an image as cover page is strait forward but then I cannot display my variables.
This may an option for future development.
Was already afraid so.
Is there a way to generate the cover page in some way?
I do have a copyright page I like to include with some variables on it.
Including an image as cover page is strait forward but then I cannot display my variables.
This may an option for future development.
Senior Test Engineer & Technical Writer
Flowbird group
Flowbird group
Re: How to set a first page to be displayed in ePUB format
The ePub specification contains a file called content.opf, which is an XML file, and this file contains a <spine> element where you can configure the order in which all documents are displayed on the document, that is, the first <itemref> element inside the <spine> element is the one displayed when opening an ePub for the first time.
Of course I don't know how this specification is implemented in Help & Manual but it can be done 'manually' (no pun intended).
Of course I don't know how this specification is implemented in Help & Manual but it can be done 'manually' (no pun intended).
VincentBevort wrote:Hi alexander,
Was already afraid so.
Is there a way to generate the cover page in some way?
I do have a copyright page I like to include with some variables on it.
Including an image as cover page is strait forward but then I cannot display my variables.
This may an option for future development.
-
- Posts: 90
- Joined: Wed Mar 30, 2016 1:53 pm
- Location: Stockholm, Sweden
- Contact:
Re: How to set a first page to be displayed in ePUB format
Alexander & Tim,
Is this something for a future release?
Is this something for a future release?
julio wrote:The ePub specification contains a file called content.opf, which is an XML file, and this file contains a <spine> element where you can configure the order in which all documents are displayed on the document, that is, the first <itemref> element inside the <spine> element is the one displayed when opening an ePub for the first time.
Of course I don't know how this specification is implemented in Help & Manual but it can be done 'manually' (no pun intended).
Senior Test Engineer & Technical Writer
Flowbird group
Flowbird group
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: How to set a first page to be displayed in ePUB format
This is correct. Help+Manual creates the <spine> from the TOC, in the same order. So, the first topic in the TOC is always the default topic. Depending on the ePUB reader, however, the reader might decide to display the cover page first, or the table of contents.The ePub specification contains a file called content.opf, which is an XML file, and this file contains a <spine> element where you can configure the order in which all documents are displayed on the document, that is, the first <itemref> element inside the <spine> element is the one displayed when opening an ePub for the first time.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
-
- Posts: 90
- Joined: Wed Mar 30, 2016 1:53 pm
- Location: Stockholm, Sweden
- Contact:
Re: How to set a first page to be displayed in ePUB format
Hi,
Then I have an additional functionality request.
Make it possible to select the content of this spine
for me the following would work.
- TOC
- Default page
- topic selector
When I select the default page the ePUB opens with my Copyright page instead of the TOC
Then I have an additional functionality request.
Make it possible to select the content of this spine
for me the following would work.
- TOC
- Default page
- topic selector
When I select the default page the ePUB opens with my Copyright page instead of the TOC
Senior Test Engineer & Technical Writer
Flowbird group
Flowbird group
Re: How to set a first page to be displayed in ePUB format
Maybe things have changed over the years, but I solved the “first page to display” problem in my ePub file by replacing the one generated with the name of the xhtml page that I wanted to display. In the epub file I found OPS/contents.xhtml. Toward the bottom it had:
</ol>
</nav>
...............
<li>
<a epub:type="bodymatter" href="body16.xhtml">Start of Content</a>
</li>
...............
</ol>
</nav>
I replaced body16.xhtml with “ body9.xhtml” which is the page I want to appear first. As a test, I changed it to a different “body” file and it displayed that page first. I opened it on a Kindle and scrolling a few pages, closed it, and re-opened it. It resumed with the page I’d scrolled to, as I would expect. I’m not a techie so maybe there’s a “gotcha” waiting for me somewhere... I did not change OPS/content.opf or OPS/toc.ncx
</ol>
</nav>
...............
<li>
<a epub:type="bodymatter" href="body16.xhtml">Start of Content</a>
</li>
...............
</ol>
</nav>
I replaced body16.xhtml with “ body9.xhtml” which is the page I want to appear first. As a test, I changed it to a different “body” file and it displayed that page first. I opened it on a Kindle and scrolling a few pages, closed it, and re-opened it. It resumed with the page I’d scrolled to, as I would expect. I’m not a techie so maybe there’s a “gotcha” waiting for me somewhere... I did not change OPS/content.opf or OPS/toc.ncx