#include "src/pdf/SkPDFMetadata.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/docs/SkPDFDocument.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkTemplates.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkTime.h"
#include "src/base/SkUtils.h"
#include "src/core/SkMD5.h"
#include "src/pdf/SkPDFTypes.h"
#include "src/pdf/SkPDFUtils.h"
#include <cstdint>
#include <cstring>
#include <utility>
class SkPDFDocument;
static constexpr SkPDF::DateTime kZeroTime = …;
static bool operator!=(const SkPDF::DateTime& u, const SkPDF::DateTime& v) { … }
static SkString pdf_date(const SkPDF::DateTime& dt) { … }
namespace {
static const struct { … } gMetadataKeys[] = …;
}
std::unique_ptr<SkPDFObject> SkPDFMetadata::MakeDocumentInformationDict(
const SkPDF::Metadata& metadata) { … }
SkUUID SkPDFMetadata::CreateUUID(const SkPDF::Metadata& metadata) { … }
std::unique_ptr<SkPDFObject> SkPDFMetadata::MakePdfId(const SkUUID& doc, const SkUUID& instance) { … }
static void hexify(const uint8_t** inputPtr, char** outputPtr, int count) { … }
static SkString uuid_to_string(const SkUUID& uuid) { … }
namespace {
class PDFXMLObject final : public SkPDFObject { … };
}
static int count_xml_escape_size(const SkString& input) { … }
SkString escape_xml(const SkString& input,
const char* before = nullptr,
const char* after = nullptr) { … }
SkPDFIndirectReference SkPDFMetadata::MakeXMPObject(
const SkPDF::Metadata& metadata,
const SkUUID& doc,
const SkUUID& instance,
SkPDFDocument* docPtr) { … }
#undef SKPDF_CUSTOM_PRODUCER_KEY
#undef SKPDF_PRODUCER
#undef SKPDF_STRING
#undef SKPDF_STRING_IMPL