chromium/pdf/pdfium/pdfium_document_metadata.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "pdf/pdfium/pdfium_document_metadata.h"

#include <stddef.h>

#include <string>

#include "base/check.h"
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "pdf/document_metadata.h"
#include "pdf/pdf_utils/dates.h"
#include "pdf/pdfium/pdfium_api_string_buffer_adapter.h"
#include "third_party/pdfium/public/fpdf_doc.h"
#include "third_party/pdfium/public/fpdf_formfill.h"
#include "third_party/pdfium/public/fpdfview.h"

namespace chrome_pdf {

namespace {

// Retrieves the value of `field` in the document information dictionary.
// Trims whitespace characters from the retrieved value.
std::string GetTrimmedMetadataByField(FPDF_DOCUMENT doc,
                                      FPDF_BYTESTRING field) {}

// Retrieves the version of the PDF (e.g. 1.4 or 2.0) as an enum.
PdfVersion GetDocumentVersion(FPDF_DOCUMENT doc) {}

}  // namespace

DocumentMetadata GetPDFiumDocumentMetadata(FPDF_DOCUMENT doc,
                                           size_t size_bytes,
                                           size_t page_count,
                                           bool linearized,
                                           bool has_attachments) {}

}  // namespace chrome_pdf