PTDocumentConversionService


@interface PTDocumentConversionService : NSObject

The PTDocumentConversionService class is used to perform and manage conversion of PDF documents to other formats via a REST API service. A separate license key for the service is required.

  • The document conversion service’s delegate object.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTDocumentConversionServiceDelegate> delegate;

    Swift

    weak var delegate: PTDocumentConversionServiceDelegate? { get set }
  • The client ID for the conversion service REST API.

    Declaration

    Objective-C

    @property (class, nonatomic, copy) NSString *_Nonnull clientID;

    Swift

    class var clientID: String { get set }
  • The client secret for the conversion service REST API.

    Declaration

    Objective-C

    @property (class, nonatomic, copy) NSString *_Nonnull clientSecret;

    Swift

    class var clientSecret: String { get set }
  • Starts a conversion job of a given input document and specified filename.

    Declaration

    Objective-C

    - (void)startConversionJobOfType:(nonnull PTConversionTaskType)taskType
                             withDoc:(nonnull PTPDFDoc *)doc
                            filename:(nonnull NSString *)filename;

    Swift

    func startConversionJob(ofType taskType: PTConversionTaskType, with doc: PTPDFDoc, filename: String)

    Parameters

    taskType

    the type of the conversion job to be started.

    doc

    the input document to be converted.

    filename

    the name of the document to be converted including the .pdf extension. The converted output file will use the root filename and append the appropriate file extension.

  • Cancels the service’s active conversion job if one exists.

    Declaration

    Objective-C

    - (void)cancelActiveConversionJob;

    Swift

    func cancelActiveConversionJob()