christopherdro / react-native-html-to-pdf

Convert html strings to PDF documents using React Native
MIT License
434 stars 264 forks source link

Empty file.filepath and not generating on the set directory #282

Closed ginxx009 closed 2 years ago

ginxx009 commented 2 years ago
if(granted === PermissionsAndroid.RESULTS.GRANTED) {
          let data = {
            html: '<h1>PDF TEST</h1>',
            fileName: 'test',
            directory: 'Documents',
          };

          let file = await RNHTMLtoPDF.convert(data)
          alert('Has been downloaded to : ', file.filePath);
        }

"react-native-html-to-pdf": "^0.12.0", "react": "17.0.2", "react-native": "^0.67.4",

multiDexEnabled true buildToolsVersion = "30.0.2" minSdkVersion = 21 compileSdkVersion = 30 targetSdkVersion = 30

What I tried so far is this link: https://github.com/christopherdro/react-native-html-to-pdf/issues/261#issuecomment-1099696713 but still no luck

Though I am using react-native 67 still used react-native link react-native-html-to-pdf

Can someone point out why it is not generating any pdf file on the document directory ?