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-2018 by PDFTron Systems 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 
107  void SetThreshold(enum Threshold threshold);
108 
110  {
124  };
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 
156  #ifndef SWIGHIDDEN
157  TRN_Flattener mp_impl;
158  #endif
159 
160 private:
161  // ElementBuilder should not be copied
162  Flattener(const Flattener&);
163  Flattener& operator= (const Flattener&);
165 };
166 
167 #include <Impl/Flattener.inl>
168 
169  }; // namespace PDF
170 }; // namespace pdftron
171 
172 #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)

© 2002-2014 PDFTron Systems Inc.