PTDocumentConversionServiceDelegate

@protocol PTDocumentConversionServiceDelegate <NSObject>

The PTDocumentConversionServiceDelegate protocol allows the adopting class to respond to messages from the PTDocumentConversionService class.

  • This method is called when a conversion job is started on the server.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
          didStartConversionJobWithID:(nonnull NSString *)jobID;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, didStartConversionJobWithID jobID: String)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    jobID

    The ID of the job on the server.

  • This method is called when a conversion job is stopped on the server.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
           didStopConversionJobWithID:(nonnull NSString *)jobID;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, didStopConversionJobWithID jobID: String)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    jobID

    The ID of the job on the server.

  • This method is called when a conversion job is finished on the server.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
        didFinishConversionJobWithStatus:
            (nonnull PTDocumentConversionJobStatus)status
                                forJobID:(nonnull NSString *)jobID;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, didFinishConversionJobWithStatus status: PTDocumentConversionJobStatus, forJobID jobID: String)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    status

    The status of the finished job.

    jobID

    The ID of the job on the server.

  • This method is called when a converted file has been downloaded from the server.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
        didDownloadConvertedFileToPath:(nonnull NSString *)filePath
                              forJobID:(nonnull NSString *)jobID;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, didDownloadConvertedFileToPath filePath: String, forJobID jobID: String)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    filePath

    The path to the downloaded file.

    jobID

    The ID of the job on the server.

  • This method is called when a conversion job fails for any reason.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
            conversionFailedWithError:(nonnull NSError *)error;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, conversionFailedWithError error: Error)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    error

    The ID of the job on the server.

  • This method is called when a conversion job receives a progress update during file upload.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
        didReceiveFileUploadProgressUpdate:(float)progress
                                  forJobID:(nonnull NSString *)jobID;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, didReceiveFileUploadProgressUpdate progress: Float, forJobID jobID: String)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    progress

    The progress of the upload as a value between 0.0 and 1.0.

    jobID

    The ID of the job on the server.

  • This method is called when a conversion job receives a progress update during file download.

    Declaration

    Objective-C

    - (void)documentConversionService:
                (nonnull PTDocumentConversionService *)documentConversionService
        didReceiveFileDownloadProgressUpdate:(float)progress
                                    forJobID:(nonnull NSString *)jobID;

    Swift

    optional func documentConversionService(_ documentConversionService: PTDocumentConversionService, didReceiveFileDownloadProgressUpdate progress: Float, forJobID jobID: String)

    Parameters

    documentConversionService

    The document conversion service which manages the job.

    progress

    The progress of the download as a value between 0.0 and 1.0.

    jobID

    The ID of the job on the server.