Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_viewerpreferences.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_
8#define CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_
9
10#include <stdint.h>
11
12#include "core/fxcrt/bytestring.h"
13#include "core/fxcrt/retain_ptr.h"
14#include "core/fxcrt/unowned_ptr.h"
15#include "third_party/abseil-cpp/absl/types/optional.h"
16
17class CPDF_Array;
18class CPDF_Dictionary;
19class CPDF_Document;
20
22 public:
23 explicit CPDF_ViewerPreferences(const CPDF_Document* pDoc);
25
26 bool IsDirectionR2L() const;
27 bool PrintScaling() const;
28 int32_t NumCopies() const;
29 RetainPtr<const CPDF_Array> PrintPageRange() const;
30 ByteString Duplex() const;
31
32 // Gets the entry for |bsKey|.
33 absl::optional<ByteString> GenericName(const ByteString& bsKey) const;
34
35 private:
36 RetainPtr<const CPDF_Dictionary> GetViewerPreferences() const;
37
38 UnownedPtr<const CPDF_Document> const m_pDoc;
39};
40
41#endif // CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_
RetainPtr< const CPDF_Dictionary > GetDictFor(const ByteString &key) const
RetainPtr< const CPDF_Array > PrintPageRange() const
CPDF_ViewerPreferences(const CPDF_Document *pDoc)
absl::optional< ByteString > GenericName(const ByteString &bsKey) const
ByteString(const char *ptr)