0

I am trying to embed remote pdf in my application,,,,

this is what i have tried after searching google-

public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.pdf);

    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(Uri.parse("http://mydomain.com/downloads/abc.pdf"), "application/pdf");
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

        try {
            startActivity(intent);
        } 
        catch (ActivityNotFoundException e) {
            Toast.makeText(TestPdf.this, 
                "No Application Available to View PDF", 
                Toast.LENGTH_SHORT).show();
        }
}

Always entering into catch block,,

I have also got the solution for using "https://docs.google.com/viewer/....",,Its working but google gives option to Download the pdf,,,

I am looking for a solution to have an Activity(containing my header and footer) that will embed remote pdf(Not allowing Download),,,,

Thanks

sumit gandhi
  • 33
  • 1
  • 6
  • Maybe this link would help you out: http://stackoverflow.com/questions/2456344/display-pdf-within-app-on-android – Muhammad Maqsoodur Rehman Sep 28 '12 at 16:54
  • @Maxood this link is saying to use http://andpdf.sourceforge.net/ or vudroid or APV PDF-Viewer.But all these are allowing to show only local pdf not from the web. As I am new to Android can you give me an example link or code to be used... – sumit gandhi Sep 29 '12 at 08:30

0 Answers0