I'm trying to get table of content data of epub files with this code:
fn main() {
use mupdf::{Document, Outline};
let doc: Document = Document::open("C:\\Users\\LazyGeniusMan\\Downloads\\mupdf\\test.epub").unwrap();
let toc: Vec<Outline> = doc.outlines().unwrap();
for i in toc {
println!("{:#?}", i)
}
}
I'm trying to get table of content data of epub files with this code:
but the output of the page is always
0
like this:But when I try using
PyMuPDF
in python with this code:it can show the correct page number index with format
[level, title, page number]
like this: