- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DocumentPreviewCache.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_CPPPDFDocumentPreviewCache
6 #define PDFTRON_H_CPPPDFDocumentPreviewCache
7
8 #include <C/PDF/TRN_DocumentPreviewCache.h>
9 #include <Common/UString.h>
10 #include <Common/Common.h>
11
12 namespace pdftron {
13 namespace PDF {
14
44 class DocumentPreviewCache
45 {
46 public:
50 enum preview_result{
51 e_failure,
52 e_success,
53 e_security_error,
54 e_cancel,
55 e_package_error
56 };
57
65 typedef void(*PreviewHandler) (preview_result result, const char* utf8_filepath, void* custom_data);
66
67
75 static void Initialize(UInt64 max_cache_bytes, double max_disk_percentage);
76
77
91 static void GetBitmapWithPath(const UString& filepath, UInt32 min_x_size, UInt32 min_y_size, PreviewHandler proc, void* custom_data);
92
93
98 static void CancelAllRequests();
99
100
108 static void CancelRequest(const UString& filepath);
109
110
118 static void IrrelevantChangeMade(const UString& filepath);
119
120
125 static void ClearCache();
126 };
127
128 #include <Impl/DocumentPreviewCache.inl>
129
130 } // PDF
131 } // pdftron
132
133 #endif // PDFTRON_H_CPPPDFDocumentPreviewCache
pdftron::PDF::DocumentPreviewCache::ClearCache
static void ClearCache()
pdftron::PDF::DocumentPreviewCache::GetBitmapWithPath
static void GetBitmapWithPath(const UString &filepath, UInt32 min_x_size, UInt32 min_y_size, PreviewHandler proc, void *custom_data)
UString.h
pdftron::PDF::DocumentPreviewCache::preview_result
preview_result
Definition: DocumentPreviewCache.h:50
pdftron::UInt64
TRN_UInt64 UInt64
Definition: BasicTypes.h:21
pdftron::PDF::DocumentPreviewCache::PreviewHandler
void(* PreviewHandler)(preview_result result, const char *utf8_filepath, void *custom_data)
Definition: DocumentPreviewCache.h:65
pdftron::PDF::DocumentPreviewCache
Definition: DocumentPreviewCache.h:44
pdftron::UInt32
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
pdftron::PDF::DocumentPreviewCache::e_failure
The thumbnail could not be retrieved.
Definition: DocumentPreviewCache.h:51
pdftron::PDF::DocumentPreviewCache::CancelRequest
static void CancelRequest(const UString &filepath)
pdftron::PDF::DocumentPreviewCache::CancelAllRequests
static void CancelAllRequests()
pdftron::PDF::DocumentPreviewCache::e_success
Successful retrieval of the thumbnail.
Definition: DocumentPreviewCache.h:52
Common.h
pdftron::PDF::DocumentPreviewCache::e_cancel
The request was cancelled before it was processed.
Definition: DocumentPreviewCache.h:54
pdftron::PDF::DocumentPreviewCache::IrrelevantChangeMade
static void IrrelevantChangeMade(const UString &filepath)
pdftron::PDF::DocumentPreviewCache::e_security_error
Failure due to password restriction.
Definition: DocumentPreviewCache.h:53
pdftron::PDF::DocumentPreviewCache::Initialize
static void Initialize(UInt64 max_cache_bytes, double max_disk_percentage)
pdftron::UString
Definition: UString.h:27
pdftron::PDF::DocumentPreviewCache::e_package_error
Failure due to encountering a PDF package.
Definition: DocumentPreviewCache.h:55