From 1b4b51225d97e51151738371e48d9ca439163ff3 Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 22 Oct 2026 02:47:32 +0000 Subject: [PATCH] Integration: #1912 restore the end of add_page lost in the merge resolution --- crates/pdf/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/pdf/src/lib.rs b/crates/pdf/src/lib.rs index d1e7d2d06..e00b4fcc3 100644 --- a/crates/pdf/src/lib.rs +++ b/crates/pdf/src/lib.rs @@ -678,6 +678,8 @@ impl PdfDoc { let width = if width_pt.is_finite() { width_pt.clamp(3.0, 14_400.0) } else { 612.0 }; let height = if height_pt.is_finite() { height_pt.clamp(3.0, 14_400.0) } else { 792.0 }; self.pages.push(Page { width, height, content: String::new(), fonts: [false; FONT_SLOTS], images: Vec::new(), links: Vec::new(), depth: 0 }); + let i = self.pages.len() - 1; + &mut self.pages[i] } pub fn page_count(&self) -> usize {