0

I have one pdf in my application and I want to open that pdf but not in my applicaton. When ever i'll click or open that pdf it will ask me to open that pdf in another application of pdf viewer availbale on my device i wnt to know that is it possible & if possible how can i do that?

-Thanx in advance

Aakil Ladhani
  • 984
  • 9
  • 32
  • possible duplicate of [Open Local PDF in Safari in iOS](http://stackoverflow.com/questions/6707337/open-local-pdf-in-safari-in-ios) – Abizern Mar 05 '12 at 05:36

1 Answers1

0

You need to use only apple PDF viewer afaik. I dont know if I am wrong here. (Please correct me in this case)

To open PDF in iBook app, use this code

NSString *stringURL = @"itms-books:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
NSString *stringURL = @"itms-bookss:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
DivineDesert
  • 6,924
  • 1
  • 29
  • 61
  • This opens ebooks in iBooks not PDFs in Safari. – Abizern Mar 05 '12 at 05:38
  • @Abizern He is asking for PDFViewer.. Dont u think iBooks is a PDFViewer.. not Safari??? Please READ PROPERLY BEFORE DOWN-VOTING.. I HAVE WROTE THERE THIS OPENS IN iBook app..!!! – DivineDesert Mar 05 '12 at 05:40
  • thanx a lot to every one i have got the solution with help of UIDocumentation interaction as below: http://andycodes.tumblr.com/post/738375724/ios4-sdk-opening-pdfs-in-ibooks – Aakil Ladhani Mar 05 '12 at 05:49
  • If you've found a different solution, why did you accept this as the correct answer? – Abizern Mar 05 '12 at 05:51
  • @Abizern this also true if we have implemented documentationintreraction in our app – Aakil Ladhani Mar 05 '12 at 05:52