All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Flattener.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2024 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
78 
88 #else // SWIG
89 
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 
103  {
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
void SetPathHinting(bool enable_hinting)
void SetPreferJPG(bool jpg)
void SetJPGQuality(UInt32 quality)
void Process(pdftron::PDF::PDFDoc &doc, enum FlattenMode mode)
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
void SetDPI(UInt32 dpi)
void SetMaximumImagePixels(UInt32 max_pixels)
void SetThreshold(enum Threshold threshold)