Foxit PDF SDK

fs_basictypes.h
Go to the documentation of this file.
1
16 #ifndef FS_BASIC_TYPES_H_
17 #define FS_BASIC_TYPES_H_
18
19 #include <cstddef>
20 #include <fstream>
21 #include <iostream>
22 #include <string>
23 #include <memory>
24 #include <vector>
25 #include <exception>
26 #include <cmath>
27 #include <cfloat>
28 #include <stdlib.h>
29 #include <string.h>
30
31 #include "common/fxcrt/fx_basic.h"
32 #include "common/fxcrt/fx_coordinates.h"
33 #include "common/fxcrt/fx_process.h"
34
35 #if defined(_WIN32) || defined(_WIN64)
36 #include <Windows.h>
37 #endif // defined(_WIN32) || defined(_WIN64)
38
39 #define FSDK_DEFINE_ARRAY(ArrayName, Type) \
40 class ArrayName : public Object { \
41 public: \
42 \
43 ArrayName(); \
44 \
45 ~ArrayName(); \
46 \
50 ArrayName(const ArrayName& other); \
51 \
56 ArrayName& operator = (const ArrayName& other); \
57 \
61 size_t GetSize() const; \
62 \
67 Type GetAt(size_t index) const; \
68 \
73 Type& operator[](size_t index) const; \
74 \
79 void Add(const Type& element); \
80 \
86 void RemoveAt(size_t index); \
87 \
94 void InsertAt(size_t index, const Type& element); \
95 \
99 void RemoveAll(); \
100 \
101 private: \
102 void* data_; \
103 };
104
105 namespace std {
106 class exception;
107 }
108
116 inline CFX_ByteString FX_UTF8Encode(const wchar_t* wstr) {
117 return ::FX_UTF8Encode((FX_LPCWSTR) wstr, (FX_STRSIZE)FXSYS_wcslen(wstr));
118 }
119
128 inline bool operator==(const char* str1, const CFX_ByteString& str2) {
129 return str2.Equal(str1);
130 }
131
140 inline bool operator!=(const char* str1, const CFX_ByteString& str2) {
141 return !str2.Equal(str1);
142 }
151 inline std::ostream& operator<<(std::ostream& os, const CFX_ByteString& str) {
152 return os << (const char*) str;
153 }
154
163 inline std::wostream& operator<<(std::wostream& os, const CFX_WideString& str) {
164 return os << (const wchar_t*) str;
165 }
166
167 #ifndef TRUE
168
169 #define TRUE true
170 #endif
171
172 #ifndef FALSE
173
174 #define FALSE false
175 #endif
176
177 #ifndef NULL
178
179 #define NULL ((void*)0)
180 #endif
181
187 namespace foxit {
189 typedef FX_INT64 int64;
191 typedef FX_UINT64 uint64;
193 typedef FX_INT32 int32;
195 typedef FX_UINT32 uint32;
197 typedef FX_INT16 int16;
199 typedef FX_UINT16 uint16;
201 typedef FX_INT8 int8;
203 typedef FX_UINT8 uint8;
205 typedef FX_POSITION POSITION;
207 typedef FX_FILESIZE FILESIZE;
209 typedef uint32 ARGB;
211 typedef uint32 RGB;
213 typedef void* FS_HANDLE;
214
215 #if defined(_WIN32) || defined(_WIN64) || defined(__EMSCRIPTEN__)
216
217 typedef void* FX_HWND;
218 #endif
219
220 typedef CFX_Object Object;
222 typedef CFX_WideString WString;
224 typedef CFX_ByteString String;
225
227 FSDK_DEFINE_ARRAY(WStringArray, WString)
229 FSDK_DEFINE_ARRAY(StringArray, String)
230
236 typedef enum _ErrorCode {
238 e_ErrSuccess = 0,
240 e_ErrFile = 1,
242 e_ErrFormat = 2,
247 e_ErrPassword = 3,
249 e_ErrHandle = 4,
254 e_ErrCertificate = 5,
256 e_ErrUnknown = 6,
258 e_ErrInvalidLicense = 7,
260 e_ErrParam = 8,
262 e_ErrUnsupported = 9,
264 e_ErrOutOfMemory = 10,
266 e_ErrSecurityHandler = 11,
268 e_ErrNotParsed = 12,
270 e_ErrNotFound = 13,
272 e_ErrInvalidType = 14,
274 e_ErrConflict = 15,
276 e_ErrUnknownState = 16,
281 e_ErrDataNotReady = 17,
283 e_ErrInvalidData = 18,
285 e_ErrXFALoadError = 19,
287 e_ErrNotLoaded = 20,
289 e_ErrInvalidState = 21,
291 e_ErrNotCDRM = 22,
293 e_ErrCanNotConnectToServer = 23,
295 e_ErrInvalidUserToken = 24,
297 e_ErrNoRights = 25,
299 e_ErrRightsExpired = 26,
301 e_ErrDeviceLimitation = 27,
303 e_ErrCanNotRemoveSecurityFromServer = 28,
305 e_ErrCanNotGetACL = 29,
307 e_ErrCanNotSetACL = 30,
309 e_ErrIsAlreadyCPDF = 31,
311 e_ErrIsAlreadyCDRM = 32,
313 e_ErrCanNotUploadDocInfo = 33,
315 e_ErrCanNotUploadCDRMInfo = 34,
317 e_ErrInvalidWrapper = 35,
319 e_ErrCanNotGetClientID = 36,
321 e_ErrCanNotGetUserToken = 37,
323 e_ErrInvalidACL = 38,
325 e_ErrInvalidClientID = 39,
327 e_ErrOCREngineNotInit = 40,
329 e_ErrDiskFull = 41,
331 e_ErrOCRTrialIsEnd = 42,
333 e_ErrFilePathNotExist = 43,
335 e_ErrComplianceEngineNotInit = 44,
337 e_ErrComplianceEngineInvalidUnlockCode = 45,
339 e_ErrComplianceEngineInitFailed = 46,
341 e_ErrTimeStampServerMgrNotInit = 47,
343 e_ErrLTVVerifyModeNotSet = 48,
345 e_ErrLTVRevocationCallbackNotSet = 49,
347 e_ErrLTVCannotSwitchVersion = 50,
349 e_ErrLTVCannotCheckDTS = 51,
351 e_ErrLTVCannotLoadDSS = 52,
353 e_ErrLTVCannotLoadDTS = 53,
355 e_ErrNeedSigned = 54,
360 e_ErrComplianceResourceFile = 55,
362 e_ErrTimeStampServerMgrNoDefaltServer = 56,
364 e_ErrDefaultTimeStampServer = 57,
366 e_ErrNoConnectedPDFModuleRight = 58,
368 e_ErrNoXFAModuleRight = 59,
370 e_ErrNoRedactionModuleRight = 60,
372 e_ErrNoRMSModuleRight = 61,
374 e_ErrNoOCRModuleRight = 62,
376 e_ErrNoComparisonModuleRight = 63,
378 e_ErrNoComplianceModuleRight = 64,
380 e_ErrNoOptimizerModuleRight = 65,
382 e_ErrNoConversionModuleRight = 66,
384 e_ErrOfficeComNotInit = 67,
386 e_ErrNoMicroOfficeInstalled = 68,
388 e_ErrExcelHasNoContent = 69,
390 e_ErrNoLayoutRecognitionModuleRight = 70,
392 e_ErrWPSEngineNotFound = 71,
394 e_ErrLibreofficeEngineNotFound = 72,
396 e_ErrNoAccessibilityModuleRight = 73,
398 e_ErrODAEngineNotFound = 74,
400 e_ErrNoTableMakerModuleRight = 75,
402 e_ErrNoDWG2PDFModuleRight = 76,
404 e_ErrNoAdvEditModuleRight = 77,
406 e_ErrNoPDF2OfficeModuleRight = 78,
408 e_ErrURLInBlackList = 79,
410 e_ErrOFDEngineNotInit = 80,
412 e_ErrNoOFDModuleRight = 81,
414 e_ErrNo3DModuleRight = 82,
416 e_ErrInvalidRegex = 83,
418 e_ErrNoDocumentPermission = 84,
420 e_ErrNoOffice2PDFModuleRight = 85,
422 e_ErrMIPUPEEngineInitFailed = 86,
424 e_ErrMIPProtectionEngineInitFailed = 87,
426 e_ErrMIPCreateProtectionHandlerFailed = 88,
428 e_ErrMIPGetExtendedLabelInfoByIdFailed = 89,
430 e_ErrNoPrint2PDFModuleRight = 90,
432 e_ErrResponseDataError = 91,
434 e_ErrTimeout = 92,
436 e_ErrNoImageObject = 93,
438 e_ErrFXOCREngineNotInit = 94
439 } ErrorCode;
440
441
443 typedef CFX_ArrayTemplate<float> FloatArray;
445 typedef CFX_ArrayTemplate<int32> Int32Array;
446
448 typedef CFX_ArrayTemplate<uint32> UInt32Array;
449
451 class Base : public Object {
452 public:
458 FS_HANDLE Handle() const {
459 return handle_;
460 }
461 virtual ~Base(){}
462
463 protected:
464 explicit Base(FS_HANDLE handle = NULL) : handle_(handle) {}
465 FS_HANDLE handle_;
466 };
467
469 typedef CFX_Matrix Matrix;
471 typedef CFX_PointF PointF;
473 typedef PointF Offset;
475 typedef CFX_FloatRect RectF;
477 typedef FX_RECT RectI;
479 typedef CFX_ArrayTemplate<RectF> RectFArray;
481 typedef CFX_ArrayTemplate<PointF> PointFArray;
482
484 class DateTime : public Object {
485 public:
491 static DateTime GetUTCTime();
497 static DateTime GetLocalTime();
498
516 DateTime(uint16 year, uint16 month, uint16 day,
517 uint16 hour, uint16 minute, uint16 second, uint16 milliseconds,
518 int16 utc_hour_offset, uint16 utc_minute_offset)
519 : year(year)
520 , month(month)
521 , day(day)
522 , hour(hour)
523 , minute(minute)
524 , second(second)
525 , milliseconds(milliseconds)
526 , utc_hour_offset(utc_hour_offset)
527 , utc_minute_offset(utc_minute_offset) {}
528
530 DateTime()
531 : year(0)
532 , month(0)
533 , day(0)
534 , hour(0)
535 , minute(0)
536 , second(0)
537 , milliseconds(0)
538 , utc_hour_offset(0)
539 , utc_minute_offset(0) {}
545 explicit DateTime(const FXCRT_DATETIMEZONE& time);
551 DateTime(const DateTime& dt)
552 : year(dt.year)
553 , month(dt.month)
554 , day(dt.day)
555 , hour(dt.hour)
556 , minute(dt.minute)
557 , second(dt.second)
558 , milliseconds(dt.milliseconds)
559 , utc_hour_offset(dt.utc_hour_offset)
560 , utc_minute_offset(dt.utc_minute_offset) {}
561
569 DateTime& operator = (const DateTime& dt) {
570 year = dt.year;
571 month = dt.month;
572 day = dt.day;
573 hour = dt.hour;
574 minute = dt.minute;
575 second = dt.second;
576 milliseconds = dt.milliseconds;
577 utc_hour_offset = dt.utc_hour_offset;
578 utc_minute_offset = dt.utc_minute_offset;
579 return *this;
580 }
582 operator FXCRT_DATETIMEZONE() const;
583
584 #if (defined(_WIN32) || defined(_WIN64)) && !defined(SWIG)
585
590 explicit DateTime(const SYSTEMTIME& systime)
591 : year(systime.wYear)
592 , month(systime.wMonth)
593 , day(systime.wDay)
594 , hour(systime.wHour)
595 , minute(systime.wMinute)
596 , second(systime.wSecond)
597 , milliseconds(systime.wMilliseconds)
598 , utc_hour_offset(0)
599 , utc_minute_offset(0) {}
600
602 operator SYSTEMTIME() const;
603 #endif // defined(_WIN32) || defined(_WIN64)
604
624 void Set(uint16 year, uint16 month, uint16 day,
625 uint16 hour, uint16 minute, uint16 second, uint16 milliseconds,
626 int16 utc_hour_offset, uint16 utc_minute_offset) {
627 this->year = year;
628 this->month = month;
629 this->day = day;
630 this->hour = hour;
631 this->minute = minute;
632 this->second = second;
633 this->milliseconds = milliseconds;
634 this->utc_hour_offset = utc_hour_offset;
635 this->utc_minute_offset = utc_minute_offset;
636 }
637
645 bool IsValid() const;
646
654 bool operator == (const DateTime& datetime) const;
662 bool operator != (const DateTime& datetime) const;
670 bool operator > (const DateTime& datetime) const;
680 bool operator >= (const DateTime& datetime) const;
688 bool operator < (const DateTime& datetime) const;
699 bool operator <= (const DateTime& datetime) const;
700
706 DateTime& ToLocalTime();
707
713 DateTime& ToUTCTime();
714
716 uint16 year;
718 uint16 month;
720 uint16 day;
722 uint16 hour;
724 uint16 minute;
726 uint16 second;
731 uint16 milliseconds;
737 int16 utc_hour_offset;
738
740 uint16 utc_minute_offset;
741 };
742
743 //#if !defined(_SWIG_ANDROID_) && !defined(_SWIG_IOS_)
744
746 class Exception : public std::exception , public Object {
747 public:
758 Exception(const char* file_name, int line_number, const char* function_name, ErrorCode error_code);
759
765 Exception(const Exception& exception)
766 : error_code_(exception.error_code_)
767 , error_message_(exception.error_message_)
768 , name_(exception.name_) {}
769
777 Exception& operator = (const Exception& exception) {
778 error_code_ = exception.error_code_;
779 error_message_ = exception.error_message_;
780 return *this;
781 }
782
784 ~Exception() throw() {}
785
791 ErrorCode GetErrCode() const {
792 return error_code_;
793 }
794
800 String GetMessage() const
801 {
802 return error_message_;
803 }
804
810 String GetName() const
811 { return name_; }
812
813 private:
814 ErrorCode error_code_;
815 String error_message_;
816 String name_;
817 };
818
819 #define throw(Exception)
820 //#endif // !defined(_SWIG_ANDROID_) && !defined(_SWIG_IOS_)
821
822 #if __cpluscplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700)
823 #define FS_FINAL final
824 #else
825 #define FS_FINAL
826 #endif
827
828 #if __cpluscplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
829 #define FS_OVERRIDE override
830 #else
831 #define FS_OVERRIDE
832 #endif
833
834 } // namespace foxit
835 #endif
foxit::DateTime::operator=
DateTime & operator=(const DateTime &dt)
Assign operator.
Definition: fs_basictypes.h:569
foxit::e_ErrInvalidState
Invalid or incorrect state.
Definition: fs_basictypes.h:289
foxit::Exception::GetErrCode
ErrorCode GetErrCode() const
Get the error code.
Definition: fs_basictypes.h:791
foxit::DateTime::utc_hour_offset
int16 utc_hour_offset
Hour of time zone. Valid range: from -12 to 12.
Definition: fs_basictypes.h:737
foxit::Exception::GetMessage
String GetMessage() const
Get the error message string.
Definition: fs_basictypes.h:800
foxit::e_ErrPassword
Invalid password. Usually, this error may occur when loading a PDF document with password....
Definition: fs_basictypes.h:247
foxit::e_ErrComplianceResourceFile
(For compliance only) Compliance resource file(s) cannot be found or opened. Please check if complian...
Definition: fs_basictypes.h:360
foxit::DateTime::ToLocalTime
DateTime & ToLocalTime()
Convert current object to local time.
foxit::e_ErrNoConversionModuleRight
No "Conversion" module right.
Definition: fs_basictypes.h:382
foxit::e_ErrCanNotSetACL
(For ConnectedPDF only) Cannot set the ACL to ConnectedPDF server.
Definition: fs_basictypes.h:307
foxit::e_ErrCanNotGetClientID
(For ConnectedPDF only) Cannot get client ID from ConnectedPDF server.
Definition: fs_basictypes.h:319
foxit::Offset
PointF Offset
Offset information, in float.
Definition: fs_basictypes.h:473
foxit::e_ErrFormat
Format is invalid. For files, this may also mean that file is corrupted.
Definition: fs_basictypes.h:242
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
foxit::e_ErrComplianceEngineInvalidUnlockCode
(For compliance only) Invalid unlock code is used to initialize compliance engine.
Definition: fs_basictypes.h:337
foxit::DateTime::DateTime
DateTime(const DateTime &dt)
Constructor, with another date and time object.
Definition: fs_basictypes.h:551
foxit::DateTime::minute
uint16 minute
Minute. Valid range: from 0 to 59.
Definition: fs_basictypes.h:724
foxit::e_ErrNoTableMakerModuleRight
No "TableMaker" module right.
Definition: fs_basictypes.h:400
foxit::e_ErrComplianceEngineInitFailed
(For compliance only) Fail to initialize compliance engine.
Definition: fs_basictypes.h:339
foxit::DateTime::Set
void Set(uint16 year, uint16 month, uint16 day, uint16 hour, uint16 minute, uint16 second, uint16 milliseconds, int16 utc_hour_offset, uint16 utc_minute_offset)
Set value.
Definition: fs_basictypes.h:624
foxit::e_ErrLTVCannotCheckDTS
(For LTV only) Fail to check DTS.
Definition: fs_basictypes.h:349
foxit::e_ErrNoRMSModuleRight
No "RMS" module right.
Definition: fs_basictypes.h:372
FX_UINT32
FX_DWORD FX_UINT32
unsigned 32bits integer.
Definition: fx_system.h:767
foxit::e_ErrInvalidData
Data of current object is invalid.
Definition: fs_basictypes.h:283
FX_LPCWSTR
wchar_t const * FX_LPCWSTR
Pointer to constant Unicode characters.
Definition: fx_system.h:736
foxit::e_ErrNoOffice2PDFModuleRight
No "Office2PDF" module right.
Definition: fs_basictypes.h:420
foxit::uint8
FX_UINT8 uint8
8-bit unsigned integer.
Definition: fs_basictypes.h:203
foxit::WStringArray
Definition: fs_basictypes.h:227
foxit::DateTime
Definition: fs_basictypes.h:484
foxit::e_ErrDiskFull
(For OCR only) Not enough disk space.
Definition: fs_basictypes.h:329
foxit::DateTime::operator<
bool operator<(const DateTime &datetime) const
Smaller operator.
foxit::e_ErrFilePathNotExist
File or folder path does not exist.
Definition: fs_basictypes.h:333
foxit::DateTime::hour
uint16 hour
Hour. Valid range: from 0 to 23.
Definition: fs_basictypes.h:722
foxit::e_ErrNoPDF2OfficeModuleRight
No "PDF2Office" module right.
Definition: fs_basictypes.h:406
foxit::DateTime::DateTime
DateTime(uint16 year, uint16 month, uint16 day, uint16 hour, uint16 minute, uint16 second, uint16 milliseconds, int16 utc_hour_offset, uint16 utc_minute_offset)
Constructor, with parameters.
Definition: fs_basictypes.h:516
foxit::RGB
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
foxit::DateTime::milliseconds
uint16 milliseconds
Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it...
Definition: fs_basictypes.h:731
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::e_ErrInvalidWrapper
(For ConnectedPDF only) The input ConnectedPDF DRM wrapper document is invalid.
Definition: fs_basictypes.h:317
foxit::DateTime::year
uint16 year
Year. It should be a four-digit number, such as 2014.
Definition: fs_basictypes.h:716
foxit::e_ErrTimeStampServerMgrNoDefaltServer
No default server has been set to time stamp server manager yet.
Definition: fs_basictypes.h:362
foxit::e_ErrNoXFAModuleRight
No "XFA" module right.
Definition: fs_basictypes.h:368
foxit::e_ErrMIPGetExtendedLabelInfoByIdFailed
MIP engine: get extended label information by id failed.
Definition: fs_basictypes.h:428
foxit::e_ErrFile
File cannot be found or could not be opened.
Definition: fs_basictypes.h:240
foxit::e_ErrCanNotConnectToServer
(For ConnectedPDF only) Cannot connect to ConnectedPDF server.
Definition: fs_basictypes.h:293
foxit::DateTime::month
uint16 month
Month. Valid range: from 1 to 12.
Definition: fs_basictypes.h:718
foxit::e_ErrLTVCannotLoadDSS
(For LTV only) Fail to load DSS.
Definition: fs_basictypes.h:351
foxit::e_ErrHandle
Error handle.
Definition: fs_basictypes.h:249
foxit::e_ErrSecurityHandler
PDF document is encrypted by some unsupported security handler.
Definition: fs_basictypes.h:266
foxit::e_ErrNoComplianceModuleRight
No "Compliance" module right.
Definition: fs_basictypes.h:378
foxit::Exception::operator=
Exception & operator=(const Exception &exception)
Assign operator.
Definition: fs_basictypes.h:777
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
operator<<
std::ostream & operator<<(std::ostream &os, const CFX_ByteString &str)
Output byte string to std::ostream.
Definition: fs_basictypes.h:151
foxit::WString
CFX_WideString WString
Wide string.
Definition: fs_basictypes.h:222
foxit::e_ErrMIPProtectionEngineInitFailed
MIP engine: add upe engine failed.
Definition: fs_basictypes.h:424
FX_POSITION
void * FX_POSITION
A value used to denote the position of an element in a collection.
Definition: fx_system.h:658
foxit::e_ErrNoAdvEditModuleRight
No "AdvEdit" module right.
Definition: fs_basictypes.h:404
foxit::e_ErrDefaultTimeStampServer
Cannot use current default time stamp server. Please check if default time stamp server can be used.
Definition: fs_basictypes.h:364
foxit::e_ErrNoRights
(For ConnectedPDF only) Current user has no right to open the ConnectedPDF DRM document.
Definition: fs_basictypes.h:297
foxit::e_ErrNo3DModuleRight
No "3D" module right.
Definition: fs_basictypes.h:414
foxit::uint64
FX_UINT64 uint64
Unsigned 64-bit integer.
Definition: fs_basictypes.h:191
foxit::e_ErrNotCDRM
(For ConnectedPDF only) The loaded document is not a ConnectedPDF DRM document.
Definition: fs_basictypes.h:291
foxit::e_ErrNoLayoutRecognitionModuleRight
No "LayoutRecognition" module right.
Definition: fs_basictypes.h:390
foxit::e_ErrCanNotGetUserToken
(For ConnectedPDF only) Cannot get user token from ConnectedPDF server.
Definition: fs_basictypes.h:321
foxit::DateTime::operator==
bool operator==(const DateTime &datetime) const
Equal operator.
foxit::e_ErrResponseDataError
(For ConnectedPDF only) There is some error in response data.
Definition: fs_basictypes.h:432
foxit::DateTime::day
uint16 day
Day of month. Valid range: from 1 to 31.
Definition: fs_basictypes.h:720
foxit::e_ErrOCREngineNotInit
(For OCR only) OCR engine has not been initialized successfully.
Definition: fs_basictypes.h:327
FXCRT_DATETIMEZONE
Structure for date and time.
Definition: fx_process.h:95
foxit::Exception
Definition: fs_basictypes.h:746
foxit::e_ErrNoMicroOfficeInstalled
(For Office-to-PDF conversion only) No Microsoft Office is installed in current system.
Definition: fs_basictypes.h:386
foxit::e_ErrNoOptimizerModuleRight
No "Optimizer" module right.
Definition: fs_basictypes.h:380
foxit::e_ErrParam
Parameter error: value of any input parameter for a function is invalid.
Definition: fs_basictypes.h:260
FX_INT64
__int64 FX_INT64
Signed 64-bit integer.
Definition: fx_system.h:740
foxit::DateTime::GetUTCTime
static DateTime GetUTCTime()
Get UTC time.
foxit::e_ErrNotLoaded
Current object has not been loaded yet.
Definition: fs_basictypes.h:287
foxit::e_ErrODAEngineNotFound
(For DWG-to-PDF conversion only) ODA engine is not found.
Definition: fs_basictypes.h:398
foxit::e_ErrNoConnectedPDFModuleRight
No "ConnectedPDF" module right.
Definition: fs_basictypes.h:366
foxit::e_ErrInvalidLicense
Invalid license is used to initialize Foxit PDF SDK library.
Definition: fs_basictypes.h:258
FX_INT32
int FX_INT32
32-bit signed integer.
Definition: fx_system.h:683
foxit::DateTime::operator >
bool operator >(const DateTime &datetime) const
Greater operator.
foxit::e_ErrCanNotRemoveSecurityFromServer
(For ConnectedPDF only) Cannot remove the security from ConnectedPDF server.
Definition: fs_basictypes.h:303
FX_STRSIZE
int FX_STRSIZE
String size is limited to 2^31-1.
Definition: fx_string.h:35
foxit::e_ErrOFDEngineNotInit
(For OFD only) OFD engine has not been initialized successfully.
Definition: fs_basictypes.h:410
foxit::Base::Handle
FS_HANDLE Handle() const
Get the handle of current object.
Definition: fs_basictypes.h:458
foxit::e_ErrInvalidACL
(For ConnectedPDF only) Input ACL is invalid.
Definition: fs_basictypes.h:323
operator==
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
foxit::e_ErrOfficeComNotInit
(For Office-to-PDF conversion only) Office COM has not been initialized successfully.
Definition: fs_basictypes.h:384
foxit::e_ErrInvalidType
The type of input object or current object is invalid.
Definition: fs_basictypes.h:272
foxit::e_ErrURLInBlackList
(For converting html to pdf only) The converted URL is on blacklist.
Definition: fs_basictypes.h:408
foxit::e_ErrNoDWG2PDFModuleRight
No "DWG2PDF" module right.
Definition: fs_basictypes.h:402
foxit::e_ErrFXOCREngineNotInit
(For FXOCR only) FXOCR Engine has not been initialized successfully.
Definition: fs_basictypes.h:438
foxit::e_ErrCanNotUploadCDRMInfo
(For ConnectedPDF only) Cannot upload ConnectedPDF DRM document info to ConnectedPDF server.
Definition: fs_basictypes.h:315
foxit::e_ErrDataNotReady
Data is not ready. Usually this is used as an exception error code when loading document in asynchron...
Definition: fs_basictypes.h:281
foxit::e_ErrNotParsed
Content has not been parsed yet. Usually, this represents PDF page has not been parsed yet.
Definition: fs_basictypes.h:268
foxit::e_ErrCertificate
Certificate error: PDF document is encrypted by digital certificate but current user does not have th...
Definition: fs_basictypes.h:254
foxit::RectF
CFX_FloatRect RectF
Rectangle, in float.
Definition: fs_basictypes.h:475
foxit::ARGB
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:209
FXSYS_wcslen
#define FXSYS_wcslen
Get the length of a wide-character string.
Definition: fx_system.h:1028
foxit::ErrorCode
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:236
FX_UTF8Encode
CFX_ByteString FX_UTF8Encode(const wchar_t *wstr)
Convert wide string to UTF-8 encoding byte string.
Definition: fs_basictypes.h:116
FX_INT8
signed char FX_INT8
Signed 8bits integer.
Definition: fx_system.h:661
foxit::PointF
CFX_PointF PointF
Point information, in float.
Definition: fs_basictypes.h:471
foxit::FX_HWND
void * FX_HWND
Window handle: HWND.
Definition: fs_basictypes.h:217
foxit::e_ErrIsAlreadyCPDF
(For ConnectedPDF only) Loaded document is already a ConnectedPDF document.
Definition: fs_basictypes.h:309
foxit::e_ErrWPSEngineNotFound
(For Office-to-PDF conversion only) WPS office engine is not found.
Definition: fs_basictypes.h:392
foxit::Int32Array
CFX_ArrayTemplate< int32 > Int32Array
An array of signed integer values.
Definition: fs_basictypes.h:445
foxit::e_ErrIsAlreadyCDRM
(For ConnectedPDF only) Loaded document is already a ConnectedPDF DRM document.
Definition: fs_basictypes.h:311
foxit::e_ErrUnknownState
Any unknown state occurs.
Definition: fs_basictypes.h:276
foxit::e_ErrDeviceLimitation
(For ConnectedPDF only) Current device is limited to open the ConnectedPDF DRM document.
Definition: fs_basictypes.h:301
foxit::DateTime::operator<=
bool operator<=(const DateTime &datetime) const
Smaller or equal operator.
foxit::e_ErrTimeStampServerMgrNotInit
Time stamp server manager has not been initialized successfully.
Definition: fs_basictypes.h:341
foxit::DateTime::operator >=
bool operator >=(const DateTime &datetime) const
Greater or equal operator.
foxit::e_ErrNoOCRModuleRight
No "OCR" module right.
Definition: fs_basictypes.h:374
foxit::POSITION
FX_POSITION POSITION
A value used to denote the position of an element in a collection.
Definition: fs_basictypes.h:205
foxit::Exception::Exception
Exception(const char *file_name, int line_number, const char *function_name, ErrorCode error_code)
Constructor, with parameters.
foxit::e_ErrMIPUPEEngineInitFailed
MIP engine: add upe engine failed.
Definition: fs_basictypes.h:422
CFX_ArrayTemplate< float >
foxit::int64
FX_INT64 int64
Signed 64-bit integer.
Definition: fs_basictypes.h:189
foxit::e_ErrNoImageObject
(For PDF Optimizer PDF) There are some objects not image type.
Definition: fs_basictypes.h:436
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::e_ErrComplianceEngineNotInit
(For compliance only) Compliance engine has not been initialized successfully.
Definition: fs_basictypes.h:335
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::String
CFX_ByteString String
Byte string.
Definition: fs_basictypes.h:224
foxit::e_ErrLTVVerifyModeNotSet
(For LTV only) LTV verify mode has not been set.
Definition: fs_basictypes.h:343
foxit::FILESIZE
FX_INT64 FILESIZE
File size. Support large file directly.
Definition: fs_basictypes.h:207
fx_process.h
Header file for Process & thread related definitions and classes.
foxit::e_ErrInvalidClientID
(For ConnectedPDF only) Input client ID is invalid.
Definition: fs_basictypes.h:325
foxit::e_ErrTimeout
(For HTML2PDF only)Occuring timeout during loading web page.
Definition: fs_basictypes.h:434
foxit::int8
FX_INT8 int8
8-bit signed integer.
Definition: fs_basictypes.h:201
FX_UINT16
unsigned short FX_UINT16
Unsigned 16bits integer.
Definition: fx_system.h:673
foxit::e_ErrOCRTrialIsEnd
(For OCR only) The trial for OCR module is end.
Definition: fs_basictypes.h:331
foxit::e_ErrNeedSigned
(For signature only) The signature being operated needs to be signed.
Definition: fs_basictypes.h:355
foxit::UInt32Array
CFX_ArrayTemplate< uint32 > UInt32Array
An array of unsigned integer values.
Definition: fs_basictypes.h:448
FX_RECT
Definition: fx_coordinates.h:596
foxit::Matrix
CFX_Matrix Matrix
Matrix information, in float.
Definition: fs_basictypes.h:469
foxit::DateTime::DateTime
DateTime()
Constructor.
Definition: fs_basictypes.h:530
FX_UINT8
unsigned char FX_UINT8
Unsigned 8bits integer.
Definition: fx_system.h:663
foxit::int32
FX_INT32 int32
32-bit signed integer.
Definition: fs_basictypes.h:193
foxit::e_ErrConflict
New data conflicts with existed data.
Definition: fs_basictypes.h:274
foxit::Base
Definition: fs_basictypes.h:451
foxit::e_ErrCanNotUploadDocInfo
(For ConnectedPDF only) Cannot upload ConnectedPDF document info to ConnectedPDF server.
Definition: fs_basictypes.h:313
foxit::StringArray
Definition: fs_basictypes.h:229
foxit::e_ErrNoAccessibilityModuleRight
No "Accessibility" module right.
Definition: fs_basictypes.h:396
foxit::Exception::GetName
String GetName() const
Get the string of error code.
Definition: fs_basictypes.h:810
foxit::DateTime::operator !=
bool operator !=(const DateTime &datetime) const
Not equal operator.
foxit::DateTime::second
uint16 second
Second. Valid range: from 0 to 60. 60 for leap second.
Definition: fs_basictypes.h:726
foxit::DateTime::utc_minute_offset
uint16 utc_minute_offset
Minute of time zone. Valid range: from 0 to 59.
Definition: fs_basictypes.h:740
foxit::int16
FX_INT16 int16
16-bit signed integer.
Definition: fs_basictypes.h:197
foxit
Foxit namespace.
Definition: fs_pdf3d.h:26
foxit::e_ErrXFALoadError
XFA loading error.
Definition: fs_basictypes.h:285
FX_UINT64
unsigned __int64 FX_UINT64
Unsigned 64-bit integer.
Definition: fx_system.h:742
FX_INT16
short FX_INT16
Signed 16bits integer.
Definition: fx_system.h:671
foxit::e_ErrCanNotGetACL
(For ConnectedPDF only) Cannot get the ACL from ConnectedPDF server.
Definition: fs_basictypes.h:305
foxit::e_ErrNoComparisonModuleRight
No "Comparison" module right.
Definition: fs_basictypes.h:376
foxit::Exception::Exception
Exception(const Exception &exception)
Constructor, with another exception object.
Definition: fs_basictypes.h:765
foxit::e_ErrNoOFDModuleRight
No "OFD" module right.
Definition: fs_basictypes.h:412
foxit::e_ErrInvalidRegex
Invalid regular expression.
Definition: fs_basictypes.h:416
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::uint16
FX_UINT16 uint16
16-bit unsigned integer.
Definition: fs_basictypes.h:199
foxit::e_ErrLibreofficeEngineNotFound
(For Office-to-PDF conversion only) Libre office engine is not found.
Definition: fs_basictypes.h:394
fx_basic.h
Header file for basic data class.
foxit::DateTime::GetLocalTime
static DateTime GetLocalTime()
Get local time.
foxit::e_ErrLTVCannotLoadDTS
(For LTV only) Fail to load DTS.
Definition: fs_basictypes.h:353
foxit::e_ErrNoPrint2PDFModuleRight
No "Print2PDF" module right.
Definition: fs_basictypes.h:430
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
operator!=
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
foxit::PointFArray
CFX_ArrayTemplate< PointF > PointFArray
An array of PointF objects.
Definition: fs_basictypes.h:481
CFX_Matrix
Definition: fx_coordinates.h:1076
foxit::e_ErrSuccess
Success, and no error occurs.
Definition: fs_basictypes.h:238
foxit::RectFArray
CFX_ArrayTemplate< RectF > RectFArray
An array of RectF objects.
Definition: fs_basictypes.h:479
CFX_ByteString::Equal
bool Equal(FX_BSTR str) const
Check if current string is equal to another one. Case-sensitive.
foxit::e_ErrUnknown
Any unknown error occurs.
Definition: fs_basictypes.h:256
foxit::e_ErrMIPCreateProtectionHandlerFailed
MIP engine: create protection handler failed.
Definition: fs_basictypes.h:426
FX_FILESIZE
#define FX_FILESIZE
Support large file directly.
Definition: fx_stream.h:155
foxit::e_ErrNotFound
Expected data or object is not found.
Definition: fs_basictypes.h:270
fx_coordinates.h
Header file for coordinate system.
foxit::e_ErrInvalidUserToken
(For ConnectedPDF only) Input user token is invalid.
Definition: fs_basictypes.h:295
foxit::e_ErrNoDocumentPermission
No document permission to operate.
Definition: fs_basictypes.h:418
foxit::e_ErrNoRedactionModuleRight
No "Redaction" module right.
Definition: fs_basictypes.h:370
foxit::e_ErrRightsExpired
(For ConnectedPDF only) The rights of Current user has expired.
Definition: fs_basictypes.h:299
foxit::e_ErrLTVRevocationCallbackNotSet
(For LTV only) Revocation callback for LTV has not been set.
Definition: fs_basictypes.h:345
foxit::Exception::~Exception
~Exception()
Destructor.
Definition: fs_basictypes.h:784
foxit::DateTime::DateTime
DateTime(const SYSTEMTIME &systime)
Constructor, with SYSTEMTIME in Windows.
Definition: fs_basictypes.h:590
foxit::DateTime::ToUTCTime
DateTime & ToUTCTime()
Convert current object to UTC time.
foxit::e_ErrLTVCannotSwitchVersion
(For LTV only) Fail to switch PDF verion.
Definition: fs_basictypes.h:347
foxit::e_ErrOutOfMemory
Out-of-memory error occurs.
Definition: fs_basictypes.h:264
foxit::DateTime::IsValid
bool IsValid() const
Check whether current object is valid or not.
foxit::FloatArray
CFX_ArrayTemplate< float > FloatArray
An array of float values.
Definition: fs_basictypes.h:443
foxit::e_ErrExcelHasNoContent
(For Excel-to-PDF conversion only) Excel document does not have any content so it cannot be converted...
Definition: fs_basictypes.h:388
foxit::RectI
FX_RECT RectI
Rectangle, in integer.
Definition: fs_basictypes.h:477
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::e_ErrUnsupported
Some types are not supported.
Definition: fs_basictypes.h:262