diff --git a/pdf/src/build.rs b/pdf/src/build.rs index 7f71f3f..c404a84 100644 --- a/pdf/src/build.rs +++ b/pdf/src/build.rs @@ -23,9 +23,9 @@ use crate::primitive::Primitive; #[derive(Default)] pub struct PageBuilder { pub ops: Vec, - pub media_box: Option, - pub crop_box: Option, - pub trim_box: Option, + pub media_box: Option, + pub crop_box: Option, + pub trim_box: Option, pub resources: Resources, pub rotate: i32, pub metadata: Option, @@ -82,7 +82,7 @@ impl PageBuilder { }) } pub fn size(&mut self, width: f32, height: f32) { - self.media_box = Some(Rect { + self.media_box = Some(ViewRect { top: 0., left: 0., bottom: height, diff --git a/pdf/src/object/types.rs b/pdf/src/object/types.rs index 26e01bd..9cfb300 100644 --- a/pdf/src/object/types.rs +++ b/pdf/src/object/types.rs @@ -1550,7 +1550,7 @@ pub struct Rectangle { pub top: f32, } #[deprecated] -pub type Rect = Rectangle; +pub type ViewRect = Rectangle; impl Object for Rectangle { fn from_primitive(p: Primitive, r: &impl Resolve) -> Result {