如何从pdf生成字节数组? (iOS)

时间:2013-08-23 06:12:51

标签: ios cocoa-touch pdf bytearray

我在iPhone的文档目录中生成了一个pdf。现在我想从这个pdf生成字节数组。这是我的代码:

NSString *resourceDocPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]];        
    NSString *filePath = [resourceDocPath stringByAppendingPathComponent:@"myPDF.pdf"];

NSData* pdfData =[NSData dataWithContentsOfFile:filePath];

那该怎么办? 有帮助吗?感谢....

0 个答案:

没有答案