diff --git a/src/pdf.rs b/src/pdf.rs index b4d0c41a6..7cef65c58 100644 --- a/src/pdf.rs +++ b/src/pdf.rs @@ -6,14 +6,13 @@ use pdf::{PdfWriter, Id, Rect, Version, DocumentCatalog, PageTree, Page, PageData, Resource, font::Type1Font, Text, Trailer}; -/// A type that is a sink for types that can be written conforming -/// to the _PDF_ format. -pub trait WritePdf { - /// Write self into a byte sink, returning how many bytes were written. - fn write_pdf(&mut self, object: &T) -> io::Result; +/// A type that is a sink for documents that can be written in the _PDF_ format. +pub trait WritePdf { + /// Write a document into self, returning how many bytes were written. + fn write_pdf(&mut self, doc: &Document) -> io::Result; } -impl WritePdf for W { +impl WritePdf for W { fn write_pdf(&mut self, doc: &Document) -> io::Result { let mut writer = PdfWriter::new(self);