00001
00002
00003
00004
00005
00006 #ifndef H_CPPPDFNet
00007 #define H_CPPPDFNet
00008
00009 #include <C/PDF/TRN_PDFNet.h>
00010 #include <Common/UString.h>
00011 #include <Common/Iterator.h>
00012
00013 namespace pdftron {
00014
00022 class PDFNet
00023 {
00024 public:
00025
00039 static void Initialize(const char* license_key = 0);
00040
00048 static void Terminate();
00049
00063 static bool SetResourcesPath(const UString& path);
00064
00069 static UString GetResourcesPath();
00070
00074 static double GetVersion();
00075
00076 enum CMSType
00077 {
00078 e_lcms,
00079 e_icm,
00080 e_no_cms
00081 };
00082
00089 static void SetColorManagement(CMSType t = e_lcms);
00090
00101 static void SetDefaultDeviceCMYKProfile(const UString& icc_filename);
00102
00113 static void SetDefaultDeviceRGBProfile(const UString& icc_filename);
00114
00120 enum CharacterOrdering {
00121 e_Identity = 0,
00122 e_Japan1 = 1,
00123 e_Japan2 = 2,
00124 e_GB1 = 3,
00125 e_CNS1 = 4,
00126 e_Korea1 = 5
00127 };
00128
00169 static bool AddFontSubst(const char* fontname, const UString& fontpath);
00170 static bool AddFontSubst(CharacterOrdering ordering, const UString& fontpath);
00171
00178 static bool SetTempPath(const UString& temp_path);
00179
00185 typedef TRN_PDFNetCreateSecurityHandler CreateSecurityHandler;
00186
00195 static void RegisterSecurityHandler(const char* handler_name, const char* gui_name, CreateSecurityHandler factory_method);
00196
00200 class SecurityDescriptor : public TRN_SecHdlrInfo {
00201 public:
00202 const char* GetName() { return m_name; }
00203 const char* GetGuiName() { return m_gui_name; }
00204 CreateSecurityHandler GetCreateFunct() { return m_factory_method; }
00205 };
00206
00207 typedef Common::Iterator<SecurityDescriptor> SecurityDescriptorIterator;
00208
00213 static SecurityDescriptorIterator GetSecHdlrInfoIterator();
00214
00227 static void SetNumberWriteProc(char* (*WriteProc) (double num, char *in_buf, int in_buf_size));
00228
00237 static void SetNumberReadProc(TRN_Bool (*ReadProc) (const TRN_UChar *buf, double *output));
00238 };
00239
00240
00241 #include <Impl/PDFNet.inl>
00242
00243
00244 };
00245
00246 #endif
00247