Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cpdf_pageorganizer.h
Go to the documentation of this file.
1
// Copyright 2024 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_FPDFAPI_EDIT_CPDF_PAGEORGANIZER_H_
8
#
define
CORE_FPDFAPI_EDIT_CPDF_PAGEORGANIZER_H_
9
10
#
include
<
stdint
.
h
>
11
12
#
include
<
map
>
13
14
#
include
"core/fxcrt/bytestring.h"
15
#
include
"core/fxcrt/retain_ptr.h"
16
#
include
"core/fxcrt/unowned_ptr.h"
17
18
class
CPDF_Dictionary
;
19
class
CPDF_Document
;
20
class
CPDF_Object
;
21
class
CPDF_Reference;
22
23
class
CPDF_PageOrganizer
{
24
protected
:
25
CPDF_PageOrganizer
(
CPDF_Document
* dest_doc,
CPDF_Document
* src_doc);
26
~
CPDF_PageOrganizer
();
27
28
// Must be called after construction before doing anything else.
29
bool
Init
();
30
31
bool
UpdateReference
(
RetainPtr
<
CPDF_Object
> obj);
32
33
CPDF_Document
*
dest
() {
return
dest_doc_; }
34
const
CPDF_Document
*
dest
()
const
{
return
dest_doc_; }
35
36
CPDF_Document
*
src
() {
return
src_doc_; }
37
const
CPDF_Document
*
src
()
const
{
return
src_doc_; }
38
39
void
AddObjectMapping
(uint32_t old_page_obj_num, uint32_t new_page_obj_num) {
40
object_number_map_[old_page_obj_num] = new_page_obj_num;
41
}
42
43
void
ClearObjectNumberMap
() { object_number_map_.clear(); }
44
45
static
bool
CopyInheritable
(
RetainPtr
<
CPDF_Dictionary
> dest_page_dict,
46
RetainPtr
<
const
CPDF_Dictionary
> src_page_dict,
47
const
ByteString
& key);
48
49
static
RetainPtr
<
const
CPDF_Object
>
PageDictGetInheritableTag
(
50
RetainPtr
<
const
CPDF_Dictionary
> dict,
51
const
ByteString
& src_tag);
52
53
private
:
54
bool
InitDestDoc();
55
56
uint32_t GetNewObjId(CPDF_Reference* ref);
57
58
UnownedPtr
<
CPDF_Document
>
const
dest_doc_;
59
UnownedPtr
<
CPDF_Document
>
const
src_doc_;
60
61
// Mapping of source object number to destination object number.
62
std::map<uint32_t, uint32_t> object_number_map_;
63
};
64
65
#
endif
// CORE_FPDFAPI_EDIT_CPDF_PAGEORGANIZER_H_
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
DCHECK
#define DCHECK
Definition
check.h:33
CFX_FloatRect
Definition
fx_coordinates.h:185
CFX_Matrix
Definition
fx_coordinates.h:440
CFX_Matrix::Scale
void Scale(float sx, float sy)
Definition
fx_coordinates.cpp:406
CPDF_Array::const_iterator
std::vector< RetainPtr< CPDF_Object > >::const_iterator const_iterator
Definition
cpdf_array.h:29
CPDF_Dictionary::DictMap
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
Definition
cpdf_dictionary.h:31
CPDF_Document
Definition
cpdf_document.h:29
CPDF_NPageToOneExporter::ExportNPagesToOne
bool ExportNPagesToOne(pdfium::span< const uint32_t > page_indices, const CFX_SizeF &dest_page_size, size_t pages_on_x_axis, size_t pages_on_y_axis)
Definition
cpdf_npagetooneexporter.cpp:155
CPDF_NPageToOneExporter::GenerateSubPageContentStreamForTesting
static ByteString GenerateSubPageContentStreamForTesting(const ByteString &xobject_name, const NupPageSettings &settings)
Definition
cpdf_npagetooneexporter.cpp:214
CPDF_NPageToOneExporter::CPDF_NPageToOneExporter
CPDF_NPageToOneExporter(CPDF_Document *dest_doc, CPDF_Document *src_doc)
Definition
cpdf_npagetooneexporter.cpp:149
CPDF_NPageToOneExporter::~CPDF_NPageToOneExporter
~CPDF_NPageToOneExporter()
CPDF_NPageToOneExporter::CreateXObjectContextFromPage
std::unique_ptr< XObjectContext > CreateXObjectContextFromPage(int src_page_index)
Definition
cpdf_npagetooneexporter.cpp:290
CPDF_Object
Definition
cpdf_object.h:50
CPDF_PageOrganizer
Definition
cpdf_pageorganizer.h:23
CPDF_PageOrganizer::ClearObjectNumberMap
void ClearObjectNumberMap()
Definition
cpdf_pageorganizer.h:43
CPDF_PageOrganizer::CopyInheritable
static bool CopyInheritable(RetainPtr< CPDF_Dictionary > dest_page_dict, RetainPtr< const CPDF_Dictionary > src_page_dict, const ByteString &key)
Definition
cpdf_pageorganizer.cpp:165
CPDF_PageOrganizer::dest
CPDF_Document * dest()
Definition
cpdf_pageorganizer.h:33
CPDF_PageOrganizer::dest
const CPDF_Document * dest() const
Definition
cpdf_pageorganizer.h:34
CPDF_PageOrganizer::PageDictGetInheritableTag
static RetainPtr< const CPDF_Object > PageDictGetInheritableTag(RetainPtr< const CPDF_Dictionary > dict, const ByteString &src_tag)
Definition
cpdf_pageorganizer.cpp:184
CPDF_PageOrganizer::CPDF_PageOrganizer
CPDF_PageOrganizer(CPDF_Document *dest_doc, CPDF_Document *src_doc)
Definition
cpdf_pageorganizer.cpp:25
CPDF_PageOrganizer::src
const CPDF_Document * src() const
Definition
cpdf_pageorganizer.h:37
CPDF_PageOrganizer::~CPDF_PageOrganizer
~CPDF_PageOrganizer()
CPDF_PageOrganizer::src
CPDF_Document * src()
Definition
cpdf_pageorganizer.h:36
CPDF_PageOrganizer::UpdateReference
bool UpdateReference(RetainPtr< CPDF_Object > obj)
Definition
cpdf_pageorganizer.cpp:74
CPDF_PageOrganizer::AddObjectMapping
void AddObjectMapping(uint32_t old_page_obj_num, uint32_t new_page_obj_num)
Definition
cpdf_pageorganizer.h:39
CPDF_PageOrganizer::Init
bool Init()
Definition
cpdf_pageorganizer.cpp:31
fxcrt::ByteString::Format
static ByteString Format(const char *pFormat,...)
Definition
bytestring.cpp:79
fxcrt::ByteString::operator+=
ByteString & operator+=(const char *str)
Definition
bytestring.cpp:182
fxcrt::RetainPtr
Definition
retain_ptr.h:28
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
CFX_PointF
CFX_PTemplate< float > CFX_PointF
Definition
fx_coordinates.h:51
CFX_SizeF
CFX_STemplate< float > CFX_SizeF
Definition
fx_coordinates.h:115
FX_SAFE_INT32
pdfium::CheckedNumeric< int32_t > FX_SAFE_INT32
Definition
fx_safe_types.h:15
pdfium::page_object
Definition
page_object.cpp:7
pdfium::page_object::kMediaBox
const char kMediaBox[]
Definition
page_object.cpp:14
pdfium::page_object::kContents
const char kContents[]
Definition
page_object.cpp:19
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
ByteStringView
fxcrt::ByteStringView ByteStringView
Definition
string_view_template.h:325
CPDF_NPageToOneExporter::NupPageSettings
Definition
cpdf_npagetooneexporter.h:43
CPDF_NPageToOneExporter::NupPageSettings::sub_page_start_point
CFX_PointF sub_page_start_point
Definition
cpdf_npagetooneexporter.h:44
CPDF_NPageToOneExporter::NupPageSettings::scale
float scale
Definition
cpdf_npagetooneexporter.h:45
XObjectContext
Definition
cpdf_npagetooneexporter.h:27
XObjectContext::~XObjectContext
~XObjectContext()
XObjectContext::dest_doc
UnownedPtr< CPDF_Document > dest_doc
Definition
cpdf_npagetooneexporter.h:31
XObjectContext::xobject
RetainPtr< CPDF_Stream > xobject
Definition
cpdf_npagetooneexporter.h:32
XObjectContext::XObjectContext
XObjectContext()
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
edit
cpdf_pageorganizer.h
Generated on
for Qt by
1.18.0