Skip to content

Commit

Permalink
Merge pull request fschutt#74 from robinkrahl/creation-date
Browse files Browse the repository at this point in the history
Add PdfDocumentReference::with_creation_date
  • Loading branch information
fschutt authored Oct 20, 2020
2 parents b7669db + a009e42 commit d1ec029
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/types/pdf_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ impl PdfDocumentReference {
self
}

/// Sets the creation date on the document.
///
/// Per default, the creation date is set to the current time.
#[inline]
pub fn with_creation_date(self, creation_date: OffsetDateTime)
-> Self
{
self.document.borrow_mut().metadata.creation_date = creation_date;
self
}

/// Sets the modification date on the document. Intended to be used when
/// reading documents that already have a modification date.
#[inline]
Expand Down

0 comments on commit d1ec029

Please sign in to comment.