PTPDFDocumentManager
@interface PTPDFDocumentManager : NSObject <PTOverridable>
Instances of the PTPDFDocumentManager
class control how documents are accessed, usually by a
viewer component.
-
Initializes a new
PTPDFDocumentManager
instance.Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
Return Value
an initialized
PTPDFDocumentManager
instance
-
The URL of the directory where documents are cached.
The document cache is used for remote (HTTP) file downloads, documents converted from other formats, and any other document-related operation that needs a safe location on-disk.
The default value of this property is the return value of the class method
+[PTPDFDocumentManager defaultDocumentCacheDirectoryURLWithError:]
.Declaration
Objective-C
@property (nonatomic, strong) NSURL *_Nonnull documentCacheDirectoryURL;
Swift
var documentCacheDirectoryURL: URL { get set }
-
Returns the URL of the default directory used for caching documents.
Note
In Swift, this method returns
Void
and is marked with thethrows
keyword to indicate that it throws an error in cases of failure.Declaration
Objective-C
+ (nullable NSURL *)defaultDocumentCacheDirectoryURLWithError: (out NSError *_Nullable *_Nullable)outError;
Swift
class func defaultDocumentCacheDirectoryURL() throws -> URL
Parameters
outError
On input, a pointer to an error object. If an error occurs , this pointer is set to an actual error object containing the error information. You may specify
nil
for this parameter if you do not want the error information.Return Value
the default document cache directory URL, or
nil
if an error occurred