Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter being cut #6

Open
WarLock03 opened this issue Sep 11, 2024 · 0 comments
Open

Chapter being cut #6

WarLock03 opened this issue Sep 11, 2024 · 0 comments

Comments

@WarLock03
Copy link

WarLock03 commented Sep 11, 2024

Hello sir/ma'am... Is the library can't get all chapter data? because when I get chapter data/content using

TOCReference selectedChapter = tocReferences.get(0);
String chapterHref = selectedChapter.getCompleteHref();
loadChapterData(chapterHref);

then load it using

private void loadChapterData(String href){
Resource resource = book.getResources().getByHref(href);

if(resource != null){
String mimeType = resource.getMediaType().getName();
if("application/xhtml+xml".equals(mimeType) || "text/html".equals(mimeType)){
String content = new String(resource.getData(), StandardCharsets.UTF_8);
}
}
}

When i get the data from content, it does not load all chapter data. It got cut off specially when there's an image that supposed to display next to text and chapter like illustration display only single image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant