I am using react-native Expo, and using react-native-pdf
for viewing the pdf.
However, in android device, users cannot view the pdf, but they can view the pdf in IOS device.
The url I am using: http://content-dev.s3-website.ap-east-1.amazonaws.com/dev/CCCC.pdf
I am not sure if it's because the url is not encrypted.
Does anyone know the reason?
function showPdf() {
const Pdf = require('react-native-pdf').default;
return (
<Pdf
scale={1}
trustAllCerts={false}
cache={true}
source={{
uri: data.url,
}}
/>
);
}
That's what Android device shows
Update
I've tried to replace the url to `https://www.africau.edu/images/default/sample.pdf'.
It shows successfully, so I think it's because my application doesn't allow HTTP connection.