PTPrintPrepareDocumentHandler
@interface PTPrintPrepareDocumentHandler : NSObject
A utility class that handles preparing PDF documents for printing.
-
Initializes a new
PTPrintPrepareDocumentHandler
instance with a source document.Declaration
Objective-C
- (nonnull instancetype)initWithSourcePDFDoc:(nonnull PTPDFDoc *)sourcePDFDoc;
Swift
init(sourcePDFDoc: PTPDFDoc)
Parameters
sourcePDFDoc
The PDF document to be prepared.
Return Value
An initialized
PTPrintPrepareDocumentHandler
instance. -
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
+ (instancetype)new NS_UNAVAILABLE;
-
Starts a new preparation operation with the current settings.
Declaration
Objective-C
- (void)prepareWithCompletionHandler: (nonnull void (^)(PTPDFDoc *_Nullable, NSError *_Nullable))completionHandler;
Swift
func prepare() async throws -> PTPDFDoc
Parameters
completionHandler
The block to be called when the operation finishes. The
outputPDFDoc
parameter contains the prepared output PDF document, ornil
if an error occurred and theerror
parameter provides the detailed error information.
-
Cancels any ongoing preparation operations.
Declaration
Objective-C
- (void)cancel;
Swift
func cancel()