将PDF图像转换为Parse.com的NSData

我在我的应用程序中使用vectorgraphics,并希望在Parse.com上存储一些graphics。 我需要先上传之前将这些转换为NSData。 是否有可能将PDF文件转换为NSData?

UIImage *image = [UIImage imageNamed:@"coolImage.pdf"]; NSData *data = UIImageJPEGRepresentation(image); 

我知道NSData允许一个PNG代表的JPG,但什么关于PDF? 任何提示,将不胜感激!

 //to convert pdf to NSData NSString *pdfPath = [documentsDirectory stringByAppendingPathComponent:@"test.pdf"]; NSData *myData = [NSData dataWithContentsOfFile:pdfPath];