Skip to content

Can I display only arbitrary partial content? #356

Answered by mickael-menu
itok asked this question in Q&A
Discussion options

You must be logged in to vote

You could do this by transforming the HTML content of the publication resources to keep only the content that you need. See this other discussion for an example: #72 (comment)

If you also need to display only this particular chapter, you need to change the readingOrder when opening the publication with the Streamer. The readingOrder is the list of resources displayed in the navigator when reading the publication.

streamer.open(
    ...,
    onCreatePublication: { _, manifest, _, _ in
        manifest = manifest.copy(
            readingOrder: manifest.readingOrder.filter { link in
                link.href == "p-001.xhtml"
            }
        )
    }
) { result in

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@itok
Comment options

Answer selected by itok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants