I'm currently working on an app, that displays one pdf inside of a UIWebView. That's working fine. The pdf gets loaded like this:
NSString *path = [[NSBundle mainBundle] pathForResource:@"file_name" ofType:@"pdf"];
NSURL *url= [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webview loadRequest:request];
But the pdf also contains a link on each page to return to its first page (the table of contents). I have enabled user interaction and link detection inside the .xib file. When i tested it with the simulator or on device, it worked in some cases, depending on the iOS Version.
With iOS 4.3 (only simulator): Doesn't work. Links aren't recognized and are treated like normal text. (so i guess i won't support < iOS 5)
iOS 5.1 (Simulator and Device): Works fine. Each link returns me to the first page of the pdf. No problems so far.
iOS 6.0 (Simulator and Device): The first link i use works exactly once. When i try it again, nothing happens, no matter which link i use. After a completly restart of the app, it works again, but only once.
So, does somebody know a way to get it working with iOS 6 the same way as with iOS 5.1? I have read about a few similar problems where the solutions seems to be to draw the pdf per CGDPF* api and scan the pdf for links. (something like what is collected here: Fast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints? ) But i would like to avoid that, if possible, because i don't need all the functions a pdf viewer could provide.
Hope there is another way and thanks for reading :)