mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Fix excluded PDF pages being written (#5133)
This commit is contained in:
parent
af1de13942
commit
695d24baed
@ -106,10 +106,12 @@ pub fn write_page_tree(ctx: &WithRefs) -> SourceResult<(PdfChunk, Ref)> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let page_kids = ctx.globals.pages.iter().filter_map(Option::as_ref).copied();
|
||||||
|
|
||||||
chunk
|
chunk
|
||||||
.pages(page_tree_ref)
|
.pages(page_tree_ref)
|
||||||
.count(ctx.pages.len() as i32)
|
.count(page_kids.clone().count() as i32)
|
||||||
.kids(ctx.globals.pages.iter().filter_map(Option::as_ref).copied());
|
.kids(page_kids);
|
||||||
|
|
||||||
Ok((chunk, page_tree_ref))
|
Ok((chunk, page_tree_ref))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user