Can not download pdf from remote URI
See original GitHub issueMy snippet:
pdfView = findViewById(R.id.pdfView);
pdfView.fromUri(Uri.parse("http://dl.dropboxusercontent.com/s/2v42h36tdcd6ii8/portrait.pdf"))
.defaultPage(currentPage)
.swipeHorizontal(true).load();
But I get error:
E/PDFView ( 8973): load pdf error
E/PDFView ( 8973): java.io.FileNotFoundException: No content provider: http://dl.dropboxusercontent.com/s/2v42h36tdcd6ii8/portrait.pdf
E/PDFView ( 8973): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:758)
E/PDFView ( 8973): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:662)
E/PDFView ( 8973): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:575)
E/PDFView ( 8973): at com.github.barteksc.pdfviewer.source.UriSource.createDocument(UriSource.java:37)
E/PDFView ( 8973): at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:53)
E/PDFView ( 8973): at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:25)
E/PDFView ( 8973): at android.os.AsyncTask$2.call(AsyncTask.java:287)
E/PDFView ( 8973): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
E/PDFView ( 8973): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
E/PDFView ( 8973): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
E/PDFView ( 8973): at java.lang.Thread.run(Thread.java:841)
Is method pdfView.fromUri
not work with remote url?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Download pdf document from remote url - php - Stack Overflow
I am trying to get through an API, a live pdf file, and then download that file to my users. To demonstrate the...
Read more >How to return a file that open in browser embed not download?
You can use FileStreamResult to show pdf file, it will not start download. ... You can change your code like below, and create...
Read more >How to download a PDF via WKWebVie… - Apple Developer
I managed to download the documents to local storage (temp folder) and to open it in QuickLookPreviewController with a little trick: The response...
Read more >Instantiate a Download from a Remote URL - PSPDFKit
If you want to annotate a remote document or make changes to it, you can use URLSession to download the PDF. Then move...
Read more >FileSystem - Expo Documentation
The remote URI to download from. fileUri, string. The local URI of the file to download to. If there is no file at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
use like this:-
So I need to download pdf from remote URI by another tool, e.g. Retrofit and view locally by PDFViewer?