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 6684053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:53:39+00:00 2026-05-26T04:53:39+00:00

I want to display a pdf file in a UIWebView . My PDF is

  • 0

I want to display a pdf file in a UIWebView. My PDF is coming from a web service and I am able to store it in a documents directory successfully. But when I try to load the PDF url into my UIWebView, it displays a blank webview. No errors are reported.

Does anyone have an idea as to what might be going wrong here or how I can better debug this problem?

  • 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-05-26T04:53:40+00:00Added an answer on May 26, 2026 at 4:53 am
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    //Considering your pdf is stored in documents directory with name as "pdfFileName"
    
    NSString *pdfPath = [[paths objectAtIndex:0]stringByAppendingPathComponent:@"mynewDocument.pdf"];
    NSURL *url = [NSURL fileURLWithPath:pdfPath];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [webView loadRequest:requestObj];
    

    Use debugger to check the contents of url. It should point to the exact pdf location.
    Also, You can use UIWebView‘s delegate methods:-

    -(void)webViewDidFinishLoad:(UIWebView *)webView;
    -(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to parse the tabular information from a .pdf file,and want to display
We want to display a pdf-file on a webpage. From what i can think
I have a strange issue in phonegap framework. I want to display PDF file
I want to read a pdf file and display it in the UI in
I want to display pdf file in webview. I try using this code it
I want to create a pdf file from Binary data. I looked around and
what i want to do is to read PDF file store on memory card
I want to read the pdf documents and display the content to the browser,
I have a PDF file stored in server and I want to display it
I can display a PDF file from byte[] in asp.net. The problem is that

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.