wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.59k stars 547 forks source link

Pdf field values are blank on android only #864

Open evan-best opened 1 month ago

evan-best commented 1 month ago

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>
  );
};
Neiso commented 2 weeks ago

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