Objective c 如何通过pspdfkit打开powerpoint?

Objective c 如何通过pspdfkit打开powerpoint?,objective-c,pdf,powerpoint,pspdfkit,Objective C,Pdf,Powerpoint,Pspdfkit,我使用上述代码打开一个空内容:(PSPDF处理器的功能是实验性的。如果你用Safari打开它,请尝试一下PPT文件是否有效。它主要使用苹果的库,某些文件可能会失败。这里的代码看起来像是从我在PSPDFCatalog中的示例复制的,因此很好。PSPDF工具包是一个演示版本。你如何集成它?你不能提交到APPLE STORE时,请不要在应用程序中使用演示版本。我只是测试如何使用PSPDFKIT打开doc、xls、ppt,如果它适合我的项目,我会购买:)。您是否可以正常工作?是否尝试转换另一个ppt文档

我使用上述代码打开一个空内容:(

PSPDF处理器的功能是实验性的。如果你用Safari打开它,请尝试一下PPT文件是否有效。它主要使用苹果的库,某些文件可能会失败。这里的代码看起来像是从我在PSPDFCatalog中的示例复制的,因此很好。

PSPDF工具包是一个演示版本。你如何集成它?你不能提交到APPLE STORE时,请不要在应用程序中使用演示版本。我只是测试如何使用PSPDFKIT打开doc、xls、ppt,如果它适合我的项目,我会购买:)。您是否可以正常工作?是否尝试转换另一个ppt文档?该ppt文件在safari上运行良好
NSURL *documentURL = [[[NSBundle mainBundle] resourceURL] URLByAppendingPathComponent:@"item_70_1_3.ppt"];
PSPDFDocument *document = [PSPDFDocument documentWithURL:documentURL];
NSURL *tempURL = PSPDFTempFileURLWithPathExtension(@"flattened_signaturetest", @"pdf");

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
        [[PSPDFProcessor defaultProcessor] generatePDFFromDocument:document pageRange:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, document.pageCount)] outputFileURL:tempURL options:@{kPSPDFProcessorAnnotationTypes : @(PSPDFAnnotationTypeAll)} progressBlock:^(NSUInteger currentPage, NSUInteger numberOfProcessedPages, NSUInteger totalPages) {
            // Access UI only from main thread.
            dispatch_async(dispatch_get_main_queue(), ^{
                [PSPDFProgressHUD showProgress:(numberOfProcessedPages+1)/(float)totalPages status:PSPDFLocalize(@"Preparing...")];
            });
        } error:NULL];

        // completion
        dispatch_async(dispatch_get_main_queue(), ^{
            [PSPDFProgressHUD dismiss];
            PSPDFDocument *flattenedDocument = [PSPDFDocument documentWithURL:tempURL];
            PSPDFViewController *pdfController = [[PSPDFViewController alloc] initWithDocument:flattenedDocument];
            UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pdfController];
            [self presentViewController:navController animated:YES completion:NULL];
        });
    });