christopherdro / react-native-html-to-pdf

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

Allow local html file to create PDF - New Request #278

Closed bhavinatharva closed 1 year ago

bhavinatharva commented 2 years ago

Please allow the user to create a pdf from a local HTML file.

let options: Options = {
      html: require('../htmls/TECH-2223-069 original.html'),
      fileName: 'test',
      directory: 'Documents',
    };

    let file = await RNHTMLtoPDF.convert(options);
    if (file) {
      console.log(file.filePath);
      setPDFFile(file.filePath || '');
    }
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.