1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PDF_DOCUMENT_METADATA_H_
6 #define PDF_DOCUMENT_METADATA_H_
10 namespace chrome_pdf {
12 // These values are persisted to logs. Entries should not be renumbered and
13 // numeric values should never be reused.
14 enum class PdfVersion {
24 k1_8 = 9, // Not an actual version. Kept for metrics purposes.
29 // Document properties, including those specified in the document information
30 // dictionary (see section 14.3.3 "Document Information Dictionary" of the ISO
31 // 32000-1 standard), as well as other properties about the file.
32 // TODO(crbug.com/93619): Finish adding information dictionary fields like
33 // |keywords|, |creation_date|, and |mod_date|. Also add fields like
34 // |size_bytes|, |is_encrypted|, and |is_linearized|.
35 struct DocumentMetadata {
37 DocumentMetadata(const DocumentMetadata&) = delete;
38 DocumentMetadata& operator=(const DocumentMetadata&) = delete;
41 // Version of the document
42 PdfVersion version = PdfVersion::kUnknown;
44 // The document's title.
47 // The name of the document's creator.
50 // The document's subject.
53 // The name of the application that created the original document.
56 // If the document's format was not originally PDF, the name of the
57 // application that converted the document to PDF.
61 } // namespace chrome_pdf
63 #endif // PDF_DOCUMENT_METADATA_H_