| // Copyright 2026 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // https://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // |
| |
| #ifndef THIRD_PARTY_CREDENTIO_FORMATS_PDF_CONSTANTS_H_ |
| #define THIRD_PARTY_CREDENTIO_FORMATS_PDF_CONSTANTS_H_ |
| |
| #include "absl/strings/string_view.h" |
| |
| namespace credentio { |
| |
| // PDF format, see ISO 32000-2 Section 7.5.2 File header. |
| constexpr absl::string_view kPdfFileHeader = "%PDF-"; |
| |
| // File trailer dictionary constants. |
| constexpr absl::string_view kPdfRootKey = "Root"; |
| constexpr absl::string_view kPdfSizeKey = "Size"; |
| |
| // Document catalog dictionary constants. |
| constexpr absl::string_view kPdfAfKey = "AF"; |
| constexpr absl::string_view kPdfNamesKey = "Names"; |
| constexpr absl::string_view kPdfEmbeddedFilesKey = "EmbeddedFiles"; |
| |
| // File specification dictionary constants. |
| constexpr absl::string_view kPdfTypeKey = "Type"; |
| constexpr absl::string_view kPdfFileSpecType = "Filespec"; |
| constexpr absl::string_view kPdfSubtypeKey = "Subtype"; |
| constexpr absl::string_view kPdfAfRelationshipKey = "AFRelationship"; |
| constexpr absl::string_view kPdfFKey = "F"; |
| constexpr absl::string_view kPdfUfKey = "UF"; |
| constexpr absl::string_view kPdfEfKey = "EF"; |
| constexpr absl::string_view kPdfParamsKey = "Params"; |
| constexpr absl::string_view kPdfModDateKey = "ModDate"; |
| |
| // C2PA Manifest file spec constants. See |
| // https://spec.c2pa.org/specifications/specifications/2.4/specs/C2PA_Specification.html#_adding_the_manifest_to_a_pdf. |
| constexpr absl::string_view kPdfC2paManifestMimeType = "application/c2pa"; |
| constexpr absl::string_view kPdfC2paManifestAfRelationship = "C2PA_Manifest"; |
| constexpr absl::string_view kPdfC2paEmbeddedFileName = |
| "content_credential.c2pa"; |
| } // namespace credentio |
| |
| #endif // THIRD_PARTY_CREDENTIO_FORMATS_PDF_CONSTANTS_H_ |