summaryrefslogtreecommitdiff
path: root/src/pdf.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf.rs')
-rw-r--r--src/pdf.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pdf.rs b/src/pdf.rs
index d5d3b081..e5a2cf6b 100644
--- a/src/pdf.rs
+++ b/src/pdf.rs
@@ -122,11 +122,11 @@ impl<'a, W: Write> PdfCreator<'a, W> {
// The page objects
let mut id = self.offsets.pages.0;
for page in &self.doc.pages {
- let width = page.size[0].to_points();
- let height = page.size[1].to_points();
-
self.writer.write_obj(id, Page::new(self.offsets.page_tree)
- .media_box(Rect::new(0.0, 0.0, width, height))
+ .media_box(Rect::new(
+ 0.0, 0.0,
+ page.width.to_points(), page.height.to_points())
+ )
.contents(self.offsets.contents.0 ..= self.offsets.contents.1)
)?;