hayro_syntax/
metadata.rs

1//! Reading document metadata.
2
3use crate::object::DateTime;
4
5#[derive(Clone, Default, Debug, PartialEq, Eq)]
6/// The metadata of a PDF document.
7pub struct Metadata {
8    /// The creation date of the document.
9    pub creation_date: Option<DateTime>,
10    /// The modification date of the document.
11    pub modification_date: Option<DateTime>,
12    /// The title of the document.
13    ///
14    /// In the vast majority of cases, this is going to be an ASCII string, but it doesn't have to
15    /// be.
16    pub title: Option<Vec<u8>>,
17    /// The author of the document.
18    ///
19    /// In the vast majority of cases, this is going to be an ASCII string, but it doesn't have to
20    /// be.
21    pub author: Option<Vec<u8>>,
22    /// The subject of the document.
23    ///
24    /// In the vast majority of cases, this is going to be an ASCII string, but it doesn't have to
25    /// be.
26    pub subject: Option<Vec<u8>>,
27    /// The keywords of the document.
28    ///
29    /// In the vast majority of cases, this is going to be an ASCII string, but it doesn't have to
30    /// be.
31    pub keywords: Option<Vec<u8>>,
32    /// The creator of the document.
33    ///
34    /// In the vast majority of cases, this is going to be an ASCII string, but it doesn't have to
35    /// be.
36    pub creator: Option<Vec<u8>>,
37    /// The producer of the document.
38    ///
39    /// In the vast majority of cases, this is going to be an ASCII string, but it doesn't have to
40    /// be.
41    pub producer: Option<Vec<u8>>,
42}