react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

Pdf field values are blank on android only

Open evan-best opened this issue 1 year ago • 2 comments

What react-native version are you using? 0.74.5 What react-native-pdf version are you using? 6.7.5 What platform does your issue occur on? (android/ios/both) android only Describe your issue as precisely as possible : When loading the pdf, most of the form values do not appear. The text and checkboxes are all blank. It works perfectly on iOS, and it isn't an issue with the pdf link, when I download the same file on my pc, it is fully filled. However, there is a signature on the pdf and that loads perfectly.

Show us the code you are using?

  return (
    <View style={styles.container}>
      <View style={styles.header}>
        <TouchableOpacity style={styles.backButton} onPress={() => navigation.goBack()}>
          <Ionicons name="arrow-back" size={24} color={colorScheme === 'dark' ? 'white' : 'black'} />
        </TouchableOpacity>
        <Text style={styles.title}>PDF Preview</Text>
      </View>
      <Pdf
        enableAnnotationRendering={true}
        enableAntialiasing={false}
        trustAllCerts={false}
        cache={false}
        source={pdfSource}
        style={styles.pdf}
        onLoadComplete={(numberOfPages, filePath) => {
          console.log(`Number of pages: ${numberOfPages}`);
        }}
        onPageChanged={(page, numberOfPages) => {
          console.log(`Current page: ${page}`);
        }}
        onError={(error) => {
          console.log(error);
        }}
        onPressLink={(uri) => {
          console.log(`Link pressed: ${uri}`);
        }}
      />
      <TouchableOpacity style={styles.checkmarkButton} onPress={submitLease}>
        <Ionicons name="checkmark" size={24} color="white" />
      </TouchableOpacity>
    </View>
  );
};

evan-best avatar Aug 30 '24 14:08 evan-best

Same here, rolling back to 6.6.2 fixed it for me.

Neiso avatar Sep 23 '24 05:09 Neiso

I was using 6.7.1, and after updating to 6.7.5, I encountered this issue. Now, I have reverted to 6.7.4 (without the ^ symbol) and everything is working fine for me.

matgrd avatar Oct 10 '24 13:10 matgrd

I was using 6.7.1, and after updating to 6.7.5, I encountered this issue. Now, I have reverted to 6.7.4 (without the ^ symbol) and everything is working fine for me.

Yeah, maybe caused by upgrade to the AndroidPdfViewer library.

andho avatar Dec 08 '24 07:12 andho

I managed to fix the issue. Just need to upgrade the underlying library io.legere:pdfiumandroid:1.0.24.

andho avatar Dec 08 '24 09:12 andho

Still got same issue with version "^6.7.6" (and RN Version: 0.74.5).

steyer-mika avatar Jan 23 '25 16:01 steyer-mika

But now the color is incorrect

https://github.com/wonday/react-native-pdf/issues/975#issuecomment-3411971570

YOEL311 avatar Oct 16 '25 17:10 YOEL311