我在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];
那该怎么办? 有帮助吗?感谢....