Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:14:53+00:00 2026-06-06T01:14:53+00:00

I have saved a pdf file in the apps documents folder on the iPad.

  • 0

I have saved a pdf file in the apps documents folder on the iPad. I want the user to open that PDF file on iPad using iBooks. Is there any way to open the PDF in iBooks which is saved in documents folder of the application?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:14:55+00:00Added an answer on June 6, 2026 at 1:14 am

    EDIT : Best option : Use UIActivityViewController

    //create file path here
    NSString *strFileURL = [NSTemporaryDirectory() stringByAppendingPathComponent:@"data.pdf"];
    
    //Check if file path exists or not
    BOOL checkExist = [[NSFileManager defaultManager] fileExistsAtPath:strFileURL isDirectory:nil];
    if (checkExist)
    {
        //create NSURL object from string path
        NSURL *urlFilePath = [NSURL fileURLWithPath:strFileURL];
    
        UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[urlFilePath] applicationActivities:nil];
    
        //for iOS8 check
        if ( [activityViewController respondsToSelector:@selector(popoverPresentationController)] )
        {
           //use triggering UI element like say here its button
           activityViewController.popoverPresentationController.sourceView = yourBtnSender;
        }
    
        //now present activityViewController
        [self presentViewController:activityViewController animated:YES completion:NULL];
    
    }
    

    Another option use UIDocumentInteractionController for this:

    //create file path here
    NSArray  *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
    NSString *documentsDir = [paths objectAtIndex:0];
    NSString *pdfFilePath [documentsDir stringByAppendingPathComponent:yourPdfFile.pdf];// your yourPdfFile file here
    NSURL *url = [NSURL fileURLWithPath:pdfPath];
    
    //create documentInteractionController here
    UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:url];
    //set delegate
    docController.delegate = self;
    
    //provide button's frame from where popover will be lauched
    BOOL isValid = [docController presentOpenInMenuFromRect:yourReadPdfButton.frame inView:self.view  animated:YES]; // Provide where u want to read pdf from yourReadPdfButton 
    
    //check if its ready show popover
    if (!isValid) 
    {
      NSString * messageString = [NSString stringWithFormat:@"No PDF reader was found on your device. In order to consult the %@, please download a PDF reader (eg. iBooks).", yourPDFFileTitle];
    
      UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:messageString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [alertView show];
    }
    

    Use UIDocumentInteractionControllerDelegate method

    // UIDocumentInteractionController delegate method
    - (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller {
       NSLog(@"dissmissed");
    }
    

    Credit goes to @Mutix ‘s answer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have saved the pdf file to the database using file upload . now
In my site, user want to upload a pdf file and I have to
I have a method that generates a PDF file using Reportlab library: def obtenerPDFNuevoPedido(self,
I have a site that saves user documents and I want to use Paperclip
I have this code that saves a pdf file. FileStream fs = new FileStream(SaveLocation,
We have a bunch of documents in our organization that were inadvertently saved as
I have a pdf file attachment saved in the cloud. The file is attached
I have a report that is going to be saved as .doc or .pdf,
I have an app that can optionally open PDF's after it creates them. If
i need to open a pdf file from my android app. I have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.