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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:35:43+00:00 2026-06-01T06:35:43+00:00

I want to open pdf file in webview but the scenario is different here,

  • 0

I want to open pdf file in webview but the scenario is different here, I have saved pdf content as NSData into sqlite table (blob data type), I got success when I was inserting data into sqlite table but once I fetch the blob content into NSData and trying to open that data into WebView it gives me error – failed to find PDF header: `%PDF’ not found.
I am using webview’s loadData method to load data

[webView loadData:data MIMEType:@"application/pdf" textEncodingName:@"utf-8" baseURL:nil];

I did lots of search and also gone thru with other stack overflow questions but haven’t found sufficient answer.

thanks,
Mayur

  • 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-01T06:35:45+00:00Added an answer on June 1, 2026 at 6:35 am

    The first four bytes of any PDF file are %PDF. This is telling you that, by the time you are trying to display the data, it is not a PDF file (or if it is, the beginning has been chopped off).

    Either you are putting corrupt data into the SQLite database, or you are corrupting it when you get it out. It should be easy to confirm one way or the other by looking at the data in the database using the command line tools.

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

Sidebar

Related Questions

I have a iframe that i want to open pdf's into from a list
Im want to open pdf file in web browser, but i got following error,
i want to open the pdf file in my app from pdf page, but
want to open pdf file when a user clicks on hyperlink shown in gridview
So I have these buttons in my app that I want to open .PDF
I want to embed a javascript function into a pdf file generated by jasper.
I want to open PDF file with PHP. Don't want to use Flash. Like
I want to open a PDF file in a new browser window when user
I want to open a PDF file from a jsp. The jsp and the
I want to open a pdf file, then save it as a text and

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.