christopherdro / react-native-html-to-pdf

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

[TypeError: Cannot read property 'convert' of null] #305

Open Abhiral opened 8 months ago

Abhiral commented 8 months ago

My code:

const createPDF = async () => { try { const options = { html: '

PDF TEST

', fileName: 'test', directory: 'Documents', };

  const file = await RNHTMLtoPDF.convert(options);
  console.log('File Path:', file.filePath);
  alert(file.filePath);
} catch (e) {
  console.log('Error Message:', e);
}

};

TamDang1646 commented 8 months ago

I have the same problem

Ali-Rzaa commented 7 months ago

Any solution?

driconmax commented 6 months ago

If you are using iOS, go to the ios folder and run pod install or bundle exec pod install to install all the dependencies in the iOS project