🌐
Wondershare PDF
pdf.wondershare.com › mobile-app › download-pdf-to-android.html
How To Download PDF To Android: The Right Tools for You!
January 6, 2026 - Step 1 Download and install Microsoft Office on your Android device and open the app. Step 2 Navigate to the file you wish to save as PDF, tap on the three dots icon, and select Convert to PDF.
🌐
Reddit
reddit.com › r/pdf › how to download pdf file via link on android phone?
r/pdf on Reddit: How to download pdf file via link on Android phone?
October 24, 2024 -

Hello, I have a reoccuring problem. Every time someone sends me a file in pdf format on for example Meta Messenger, my phone can't just download the file, it asks me to convert it to Google Docs pdf. But when in does, the file ends up being messed up to say gently.

When I receive same pdf via e-mail, there's no problem, I just click the attachment and phone downloads it without converting. Minor issue, but I'm tired of asking friends to re-send every file via e-mail, do you know any fix?

My phone is Google Pixel 6a with the newest Android I believe

Easy way to Transfer PDFs to phone? Feb 9, 2024
r/GalaxyTab
2y ago
PDF as a Online Link Aug 29, 2024
r/pdf
last yr.
Generate PDF on mobile front or backend? Nov 25, 2022
r/androiddev
3y ago
Download PDF from url Oct 9, 2022
r/commandline
3y ago
More results from reddit.com
Discussions

How to download and open PDF files? - Android Enthusiasts Stack Exchange
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... I am a university student that has most of the lectures online as pdf files. How can I get them on my Android phone and read them through Adobe Reader? This is the first time that I have used Android. The version that I have is 2.2 "Froyo". ... Download ... More on android.stackexchange.com
🌐 android.stackexchange.com
How to download a PDF displaying inside an Android APP ?
Presumably the school wants you to have those notes... Get someone with some authority to have the developers make them downloadable Or ask the teacher to share the document with you In the meantime, probably all you can do is screenshots Maybe if you run an Android emulator on a computer and download / run the app inside the emulator, your computer might have an easier time downloading the whole file More on reddit.com
🌐 r/AndroidQuestions
6
5
July 4, 2022
How to download and save sheets as PDF file on android device. - Google Docs Editors Community
Skip to main content · Google Docs Editors Help · Sign in · Google Help · Help Center · Community · Google Docs Editors · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience · More on support.google.com
🌐 support.google.com
July 7, 2022
Android download PDF from URL then open it with a PDF reader - Stack Overflow
My understanding is when downloading PDF from desktop application you need to specify GET / POST, however in Android decides how to download based on the response code. Hence that line is not required. Also the doOutput is not required as we are streaming and writing to the pdf file. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Payhip
help.payhip.com › help center › sellers › download a pdf on ios or android
Download a PDF on iOS or Android - Help Center
March 18, 2026 - To successfully save the PDF file ... to choose where to save the file (e.g., Files or Drive) ... PDFs will usually download automatically to your Android device and can be found in your My Files or File Manager app....
🌐
UPDF
updf.com › home › best ways to save pdfs on android in 2026
Top Ways To Save PDFs on Android in 2026 | UPDF
January 3, 2026 - First, open Google Chrome on an Android device. After that open the webpage or website that has the PDF you want to download. Then find the PDF link or button on the webpage. It is usually shown as an icon or a text link.
🌐
The Longest Way Home
thelongestwayhome.com › resources › how-to-download-view-pdf-iphone-android-pc-mac.html
How to Download and View a PDF on Android, iPhone, and More - The Longest Way Home
Download the File: Tap the PDF to open it—most Android devices auto-save it to your Downloads folder. ... Default Viewer: Tap the file to open it in your device’s built-in PDF viewer.
🌐
Adobe
adobe.com › acrobat › hub › where-to-find-pdfs-on-android.html
Where are PDF files stored on Android phones? | Adobe Acrobat
Even with hundreds of documents saved to an Android device, you can still easily find what you need within seconds. Our smartphones are now considered fully functional tools equipped with all kinds of PDF possibilities. For example, you can download PDFs directly to your mobile device in just a ...
Find elsewhere
🌐
DocHub
dochub.com › en › functionalities › download-pdf-from-link-in-android
Download PDF from link in Android easily | DocHub
Tap File on your Android, then select Print. Select the dropdown menu and tap Save as PDF. Pick your preferred location for your PDF and press Save. Go to the site where you want to download a file. Touch and hold what you want to download, then tap Download link or Download image.
🌐
Eatweeds
eatweeds.co.uk › home › how to download pdf files to your mobile device
How to Download PDF Files to Your Mobile Device - Eat Weeds
October 16, 2021 - It is best to use a PDF reader when downloading PDFs. Adobe Reader is free and one of the best. Link: https://play.google.com/store/apps/details?id=com.adobe.reader · You might want to use a file manager on your android phone.
🌐
Google Support
support.google.com › docs › thread › 170297870 › how-to-download-and-save-sheets-as-pdf-file-on-android-device
How to download and save sheets as PDF file on android device. - Google Docs Editors Community
July 7, 2022 - Skip to main content · Google Docs Editors Help · Sign in · Google Help · Help Center · Community · Google Docs Editors · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience ·
🌐
Showit Blog
milenaciciotti.com › home › blog › how to download your pdfs (apple, android, and pc)
How To Download Your PDFs (Apple, Android, and PC) - Showit Blog
July 6, 2023 - Once that is done, you can delete the Instructions canvas view folder. ... Thank you for being here. You are loved with an everlasting love. ... *The preferred method to view your PDF file is through the Books App on iPhone. It is free to download from the App Store.
🌐
Google Support
support.google.com › drive › answer › 2423534
Download a file - Android - Google Drive Help
On your Android phone or tablet, open the Google Drive app. Next to the file's name, tap More Download. Learn how to convert Office and other file types into Docs, Sheets, or Slides.
Top answer
1 of 4
88

Hi the problem is in FileDownloader class

 urlConnection.setRequestMethod("GET");
    urlConnection.setDoOutput(true);

You need to remove the above two lines and everything will work fine. Please mark the question as answered if it is working as expected.

Latest solution for the same problem is updated Android PDF Write / Read using Android 9 (API level 28)

Attaching the working code with screenshots.

MainActivity.java

package com.example.downloadread;

import java.io.File;
import java.io.IOException;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    public void download(View v)
    {
        new DownloadFile().execute("http://maven.apache.org/maven-1.x/maven.pdf", "maven.pdf"); 
    }

    public void view(View v)
    {
        File pdfFile = new File(Environment.getExternalStorageDirectory() + "/testthreepdf/" + "maven.pdf");  // -> filename = maven.pdf
        Uri path = Uri.fromFile(pdfFile);
        Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
        pdfIntent.setDataAndType(path, "application/pdf");
        pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

        try{
            startActivity(pdfIntent);
        }catch(ActivityNotFoundException e){
            Toast.makeText(MainActivity.this, "No Application available to view PDF", Toast.LENGTH_SHORT).show();
        }
    }

    private class DownloadFile extends AsyncTask<String, Void, Void>{

        @Override
        protected Void doInBackground(String... strings) {
            String fileUrl = strings[0];   // -> http://maven.apache.org/maven-1.x/maven.pdf
            String fileName = strings[1];  // -> maven.pdf
            String extStorageDirectory = Environment.getExternalStorageDirectory().toString();
            File folder = new File(extStorageDirectory, "testthreepdf");
            folder.mkdir();

            File pdfFile = new File(folder, fileName);

            try{
                pdfFile.createNewFile();
            }catch (IOException e){
                e.printStackTrace();
            }
            FileDownloader.downloadFile(fileUrl, pdfFile);
            return null;
        }
    }


}

FileDownloader.java

package com.example.downloadread;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

public class FileDownloader {
    private static final int  MEGABYTE = 1024 * 1024;

    public static void downloadFile(String fileUrl, File directory){
        try {

            URL url = new URL(fileUrl);
            HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
            //urlConnection.setRequestMethod("GET");
            //urlConnection.setDoOutput(true);
            urlConnection.connect();

            InputStream inputStream = urlConnection.getInputStream();
            FileOutputStream fileOutputStream = new FileOutputStream(directory);
            int totalSize = urlConnection.getContentLength();

            byte[] buffer = new byte[MEGABYTE];
            int bufferLength = 0;
            while((bufferLength = inputStream.read(buffer))>0 ){
                fileOutputStream.write(buffer, 0, bufferLength);
            }
            fileOutputStream.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.downloadread"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="18" />
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.downloadread.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/button1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="15dp"
        android:text="download"
        android:onClick="download" />

    <Button
        android:id="@+id/button2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/button1"
        android:layout_marginTop="38dp"
        android:text="view"
        android:onClick="view" />

</RelativeLayout>
2 of 4
10

This is the best method to download and view PDF file.You can just call it from anywhere as like

PDFTools.showPDFUrl(context, url);

here below put the code. It will works fine

 public class PDFTools {
    private static final String TAG = "PDFTools";
    private static final String GOOGLE_DRIVE_PDF_READER_PREFIX = "http://drive.google.com/viewer?url=";
    private static final String PDF_MIME_TYPE = "application/pdf";
    private static final String HTML_MIME_TYPE = "text/html";

   
    public static void showPDFUrl(final Context context, final String pdfUrl ) {
        if ( isPDFSupported( context ) ) {
            downloadAndOpenPDF(context, pdfUrl);
        } else {
            askToOpenPDFThroughGoogleDrive( context, pdfUrl );
        }
    }

   
    @TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static void downloadAndOpenPDF(final Context context, final String pdfUrl) {
        // Get filename
        //final String filename = pdfUrl.substring( pdfUrl.lastIndexOf( "/" ) + 1 );
        String filename = "";
        try {
            filename = new GetFileInfo().execute(pdfUrl).get();
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
        // The place where the downloaded PDF file will be put
        final File tempFile = new File( context.getExternalFilesDir( Environment.DIRECTORY_DOWNLOADS ), filename );
        Log.e(TAG,"File Path:"+tempFile);
        if ( tempFile.exists() ) {
            // If we have downloaded the file before, just go ahead and show it.
            openPDF( context, Uri.fromFile( tempFile ) );
            return;
        }

        // Show progress dialog while downloading
        final ProgressDialog progress = ProgressDialog.show( context, context.getString( R.string.pdf_show_local_progress_title ), context.getString( R.string.pdf_show_local_progress_content ), true );

        // Create the download request
        DownloadManager.Request r = new DownloadManager.Request( Uri.parse( pdfUrl ) );
        r.setDestinationInExternalFilesDir( context, Environment.DIRECTORY_DOWNLOADS, filename );
        final DownloadManager dm = (DownloadManager) context.getSystemService( Context.DOWNLOAD_SERVICE );
        BroadcastReceiver onComplete = new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                if ( !progress.isShowing() ) {
                    return;
                }
                context.unregisterReceiver( this );

                progress.dismiss();
                long downloadId = intent.getLongExtra( DownloadManager.EXTRA_DOWNLOAD_ID, -1 );
                Cursor c = dm.query( new DownloadManager.Query().setFilterById( downloadId ) );

                if ( c.moveToFirst() ) {
                    int status = c.getInt( c.getColumnIndex( DownloadManager.COLUMN_STATUS ) );
                    if ( status == DownloadManager.STATUS_SUCCESSFUL ) {
                        openPDF( context, Uri.fromFile( tempFile ) );
                    }
                }
                c.close();
            }
        };
        context.registerReceiver( onComplete, new IntentFilter( DownloadManager.ACTION_DOWNLOAD_COMPLETE ) );

        // Enqueue the request
        dm.enqueue( r );
    }

    
    public static void askToOpenPDFThroughGoogleDrive( final Context context, final String pdfUrl ) {
        new AlertDialog.Builder( context )
                .setTitle( R.string.pdf_show_online_dialog_title )
                .setMessage( R.string.pdf_show_online_dialog_question )
                .setNegativeButton( R.string.pdf_show_online_dialog_button_no, null )
                .setPositiveButton( R.string.pdf_show_online_dialog_button_yes, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        openPDFThroughGoogleDrive(context, pdfUrl);
                    }
                })
                .show();
    }

    public static void openPDFThroughGoogleDrive(final Context context, final String pdfUrl) {
        Intent i = new Intent( Intent.ACTION_VIEW );
        i.setDataAndType(Uri.parse(GOOGLE_DRIVE_PDF_READER_PREFIX + pdfUrl ), HTML_MIME_TYPE );
        context.startActivity( i );
    }
    
    public static final void openPDF(Context context, Uri localUri ) {
        Intent i = new Intent( Intent.ACTION_VIEW );
        i.setDataAndType( localUri, PDF_MIME_TYPE );
        context.startActivity( i );
    }
    
    public static boolean isPDFSupported( Context context ) {
        Intent i = new Intent( Intent.ACTION_VIEW );
        final File tempFile = new File( context.getExternalFilesDir( Environment.DIRECTORY_DOWNLOADS ), "test.pdf" );
        i.setDataAndType( Uri.fromFile( tempFile ), PDF_MIME_TYPE );
        return context.getPackageManager().queryIntentActivities( i, PackageManager.MATCH_DEFAULT_ONLY ).size() > 0;
    }

    // get File name from url
    static class GetFileInfo extends AsyncTask<String, Integer, String>
    {
        protected String doInBackground(String... urls)
        {
            URL url;
            String filename = null;
            try {
                url = new URL(urls[0]);
                HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                conn.connect();
                conn.setInstanceFollowRedirects(false);
                if(conn.getHeaderField("Content-Disposition")!=null){
                    String depo = conn.getHeaderField("Content-Disposition");

                    String depoSplit[] = depo.split("filename=");
                    filename = depoSplit[1].replace("filename=", "").replace("\"", "").trim();
                }else{
                    filename = "download.pdf";
                }
            } catch (MalformedURLException e1) {
                e1.printStackTrace();
            } catch (IOException e) {
            }
            return filename;
        }

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }
        @Override
        protected void onPostExecute(String result) {
            super.onPostExecute(result);
            // use result as file name
        }
    }

}

try it. it will work, enjoy

🌐
Evernote
evernote.com › pdf-editor › save-pdf-on-android-smartphone
Save PDF on Android Smartphone
To save a PDF on Android, open the PDF file, choose the 'Share' or 'Download' option in your browser or PDF app, and select a location on your device.
🌐
Softonic
en.softonic.com › downloads › pdf-for-android
Download Pdf For Android - Best Software & Apps
PDF Pro: Edit, Sign & Fill PDF is a freemium productivity app that allows you to read and edit PDF files. Developed by PDF… ... Google PDF Viewer is a free application, released by Google, designed as part of its Android for Work initiative, and optimized for the Android… ... A PDF Reader is a free application that can be downloaded on Android devices.
🌐
Quora
quora.com › How-do-I-extract-a-PDF-from-an-Android-app-which-only-allows-you-to-view-a-PDF
How to extract a PDF from an Android app which only allows you to view a PDF - Quora
Answer: You can browse or search file manager for pdf. Just note the name of pdf and search in file manager and then the name will come out. Second way is to try to share the pdf to any temporary place and then where you shared the file download it. If none of the methods work then the app does...
🌐
Google Support
support.google.com › drive › thread › 262938612 › i-can-t-download-pdf-on-my-mobile
I can't download pdf on my mobile - Google Drive Community
March 8, 2024 - Skip to main content · Google Drive Help · Sign in · Google Help · Help Center · Community · Google Drive · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience ·
🌐
wikiHow
wikihow.tech › computers and electronics › telephones › smartphones › android › how to view pdf files on an android phone (with pictures)
How to View PDF Files on an Android Phone (with Pictures)
June 6, 2025 - You can still download the PDF by tapping the Download ... Tap Adobe Acrobat Reader when prompted. It should be in a pop-up menu asking which program you want to use for this link or attachment.