Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I display a PDF in URL remote? #4

Open
moisesvs opened this issue Jun 18, 2018 · 2 comments
Open

Can I display a PDF in URL remote? #4

moisesvs opened this issue Jun 18, 2018 · 2 comments

Comments

@moisesvs
Copy link

Hi,
I am trying out to show a PDF from remote URL but I don't able to show it. I don't know why. Any ideas?. I have the following code:

    val uri = Uri.parse(url)
    pdfView.fromUri(uri)

Regards

@ashish-bahl
Copy link

Its not allowed yet.

@ahmed-a-elfattah
Copy link

 GlobalScope.launch {
                val input: InputStream = URL(args.contentUrl).openStream()
                pdfContent.fromStream(input)
                    .enableSwipe(true) // allows to block changing pages using swipe
                    .enableDoubletap(true).defaultPage(0)
                    .enableAnnotationRendering(false) // render annotations (such as comments, colors or forms)
                    .password(null).scrollHandle(null).enableAntialiasing(true).spacing(0)
                    .pageFitPolicy(FitPolicy.WIDTH).onLoad(object : OnLoadCompleteListener {
                        override fun loadComplete(p0: Int) {
                            pbLoading.isVisible = false
                        }
                    }).load()
            }

try this worked for my @moisesvs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants