Loading...
Searching...
No Matches
Flattener.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFFlattener
6#define PDFTRON_H_CPPPDFFlattener
7
8#include <Common/Common.h>
9#include <PDF/PDFDoc.h>
10#include <C/PDF/TRN_Flattener.h>
11
12 namespace pdftron {
13 namespace PDF {
14
40 class Flattener
41{
42 public:
46 Flattener();
47 ~Flattener();
48
55 void SetDPI(UInt32 dpi);
56
61 void SetMaximumImagePixels(UInt32 max_pixels);
62
67 void SetPreferJPG(bool jpg);
68
73 void SetJPGQuality(UInt32 quality);
74
75 enum Threshold
76 {
77#ifndef SWIG
79 e_very_strict,
81 e_strict,
83 e_default,
85 e_keep_most,
87 e_keep_all
88#else // SWIG
90 e_threshold_very_strict,
92 e_threshold_strict,
94 e_threshold_default,
96 e_threshold_keep_most,
98 e_threshold_keep_all
99#endif // SWIG
100 };
101
102 enum FlattenMode
103 {
108 e_simple,
116 e_fast
117 };
118
124 void SetThreshold(enum Threshold threshold);
125
134 void SetPathHinting(bool enable_hinting);
135
141 void Process(pdftron::PDF::PDFDoc& doc, enum FlattenMode mode );
142
148 void Process(PDF::Page& page, enum FlattenMode mode );
149
153 void Destroy();
154
155 // @cond PRIVATE_DOC
156
157 #ifndef SWIGHIDDEN
158 TRN_Flattener mp_impl;
159 #endif
160
161 private:
162 // ElementBuilder should not be copied
163 Flattener(const Flattener&);
164 Flattener& operator= (const Flattener&);
165 // @endcond
166
167};
168
169#include <Impl/Flattener.inl>
170
171 }; // namespace PDF
172}; // namespace pdftron
173
174#endif // PDFTRON_H_CPPPDFFlattener
Common.h
PDFDoc.h
pdftron::PDF::Flattener::SetPathHinting
void SetPathHinting(bool enable_hinting)
pdftron::PDF::Flattener::SetPreferJPG
void SetPreferJPG(bool jpg)
pdftron::PDF::Flattener::SetThreshold
void SetThreshold(enum Threshold threshold)
pdftron::PDF::Flattener::SetJPGQuality
void SetJPGQuality(UInt32 quality)
pdftron::PDF::Flattener::Flattener
Flattener()
pdftron::PDF::Flattener::~Flattener
~Flattener()
pdftron::PDF::Flattener::SetMaximumImagePixels
void SetMaximumImagePixels(UInt32 max_pixels)
pdftron::PDF::Flattener::Threshold
Threshold
Definition Flattener.h:76
pdftron::PDF::Flattener::e_keep_most
@ e_keep_most
Definition Flattener.h:85
pdftron::PDF::Flattener::e_keep_all
@ e_keep_all
Definition Flattener.h:87
pdftron::PDF::Flattener::e_default
@ e_default
Definition Flattener.h:83
pdftron::PDF::Flattener::e_strict
@ e_strict
Definition Flattener.h:81
pdftron::PDF::Flattener::e_very_strict
@ e_very_strict
Definition Flattener.h:79
pdftron::PDF::Flattener::FlattenMode
FlattenMode
Definition Flattener.h:103
pdftron::PDF::Flattener::e_fast
@ e_fast
Definition Flattener.h:116
pdftron::PDF::Flattener::e_simple
@ e_simple
Definition Flattener.h:108
pdftron::PDF::Flattener::Process
void Process(PDF::Page &page, enum FlattenMode mode)
pdftron::PDF::Flattener::Process
void Process(pdftron::PDF::PDFDoc &doc, enum FlattenMode mode)
pdftron::PDF::Flattener::Destroy
void Destroy()
pdftron::PDF::Flattener::SetDPI
void SetDPI(UInt32 dpi)
pdftron::PDF::PDFDoc
Definition PDFDoc.h:72
pdftron::PDF::Page
Definition Page.h:32
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10
pdftron::UInt32
TRN_UInt32 UInt32
Definition BasicTypes.h:13