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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:38:54+00:00 2026-06-09T23:38:54+00:00

My project in android use html file to navigate pages, and there is a

  • 0

My project in android use html file to navigate pages, and there is a link that will open a pdf file.

here is the html code for the html :

<a href="#" onClick="window.jsinterface.pdf1Click();" style="font-size: 0.9em; padding: 3px 7px 2px 7px; font-family:serif; color:white; text-decoration: none;">My PDF</a>

and this is the code for in my src.

public void pdf1Click() {
                    handler.post(new Runnable() {
                        public void run() {

                        ReadWriteDisplayPDFFile(getResources().openRawResource(R.raw.pdf1),"pdf1.pdf");
                        }
                    });
                }

but when I run my project and click to the link to open the pdf file,
it can’t open the pdf file and i got this error:

Error Writting on /sdcard/myproj/pdf1.pdf
Please Inserd SD Card

and

No Application available to view pdf

does anyone have an Idea about my case?
thanks in advance

logcat:

Error writing /sdcard/myproj/pdf1.pdf 
java.io.FileNotFoundException: /sdcard/myproj/pdf1.pdf : open failed: EACCES (Permission denied)
    at libcore.io.IoBridge.open(IoBridge.java:416)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
    at com.sample.AppActivity$JSInterface.ReadWriteDisplayPDFFile(AppActivity.java:146)

    START {act=android.intent.action.VIEW dat=file:///sdcard/myproj/pdf1.pdf typ=application/pdf flg=0x4000000 u=0} from pid 626
  • 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-09T23:38:55+00:00Added an answer on June 9, 2026 at 11:38 pm

    Please see below Stack overflow’s answer for read pdf using pdfviewer library, it may help you and if you have any query regarding that then tell me.

    Example of code to implement a PDF reader

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

Sidebar

Related Questions

I use in my project a piece of code as described here http://lexandera.com/2009/01/extracting-html-from-a-webview/ I
I am trying to use the zip4j jar file in my android project to
I want to use this project: http://developer.android.com/resources/samples/ActionBarCompat/index.html How can I download all files at
I have a working Android tuner project app that I want to use as
Android 3.2. Attempting to use Switch (http://developer.android.com/reference/android/widget/Switch.html) in my project. Switch.class is not found
I have a barebones index.html, Anddroid Phonegap project in Eclipse that will not execute
i know how to proguard android project,but at present i use android do a
I try to run my project in windows. Project use android ndk. I install
I would use Jmagick into an Android Project. Is it possible? I have to
I'm trying to use sbt to compile an Android Project made in Java, which

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.