im has a problem, I have too many PDF files, so one by one I upload pdf files,
so I put the timestamp in the document folder, so mypath looks like this:
/Users/zee/Library/Application Support/iPhone Simulator/6.0/Applications/10EF6B94-0ECD-484A- AF5A-D300D8EF55DB/Documents/myPDF.pdf1382698338.78128
but I donβt understand why it does not open in UIWebView with timestamp, my code is below
works when I do not put a timestamp.
since I can open the pdf file attached with the timestamp below, this is my code, please
help me solve how to solve this problem.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"myPDF.pdf"]; NSURL *targetURL = [NSURL fileURLWithPath:filePath]; NSURLRequest *request = [NSURLRequest requestWithURL:targetURL]; [self.webView loadRequest:request];
my file path is:
/Users/zee/Library/Application Support/iPhone Simulator/6.0/Applications/10EF6B94-0ECD-484A- AF5A-D300D8EF55DB/Documents/myPDF.pdf1382698338.78128
Please tell me how can I open a pdf file
source share