2011-06-30 55 views

回答

1
NSData *yourPDFFileData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:yourPDFURL]]; 

//Store the Data locally as PDF File 

NSString *docPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"PDFFiles"]]; 

NSString *yourFilePath = [docPath stringByAppendingPathComponent:@"yourPDFName.pdf"]; 

[yourPDFFileData writeToFile:yourFilePath atomically:YES]; 

這將節省從網址到本地的iPhone/iPad上的文件。希望能幫助到你。

+0

謝謝你有很多.. –

+0

@穆罕默德這是否解決了你的問題?如果是,請將此標記爲已接受,以便在存在同樣問題的情況下對其他人有所幫助。 –

相關問題