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

Error: pdf uri not working on Android #188

Open
aleffarias opened this issue Mar 27, 2023 · 4 comments
Open

Error: pdf uri not working on Android #188

aleffarias opened this issue Mar 27, 2023 · 4 comments

Comments

@aleffarias
Copy link

Issue Description

I'm trying to render the pdf through the uri but I get the following error. This happens for any valid uri

Steps to Reproduce / Code Snippets

My code:

        <PdfReader
          source={{
            uri: 'https://www.thecampusqdl.com/uploads/files/pdf_sample_2.pdf',
          }}
          withPinchZoom
          webviewStyle={[
            {
              marginTop: 80,
            },
            Platform.OS === 'android' && {
              backgroundColor: theme.colors.primary,
            },
          ]}
          style={Platform.OS === 'ios' && { marginTop: 30 }}
          withScroll
        />

error:
Captura de Tela 2023-03-27 às 13 52 01

Expected Results

render pdf

Additional Information

  • Nodejs version: [16.16]
  • React version: [18.0.0]
  • React Native version: [0.69.6]
  • rn-pdf-reader-js version: [4.1.1]
  • Platform(s) (iOS, Android, or both?): [Android]
  • TypeScript version: [4.3.5]
@SBRKH
Copy link

SBRKH commented Aug 24, 2023

Try :
source={{uri: ${encodeURIComponent('https://www.thecampusqdl.com/uploads/files/pdf_sample_2.pdf'l)}`} `

@zohaibasgharIGS
Copy link

i am getting error
[TypeError: Cannot convert null value to object]

@rss14
Copy link

rss14 commented Sep 2, 2023

Também recebo o mesmo erro... me parece que este pacote foi abandonado :(

@delonzhou
Copy link

i am getting error
[TypeError: Cannot convert null value to object]

Got the same issue. After some debugging, found it can't be fixed by a very small change. You can refer to the pull request #198 and find the details.

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

5 participants