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

Preview PDF after creating

Open Shivani12345 opened this issue 3 years ago • 4 comments

can we preview PDF with this library with file path?

Shivani12345 avatar Dec 14 '22 04:12 Shivani12345

I have the same question

tarekhassan410 avatar Feb 05 '23 09:02 tarekhassan410

This will help https://www.youtube.com/watch?v=4CBUXv8d0I0

BraveEvidence avatar Mar 08 '23 07:03 BraveEvidence

cannot find the file in iOS

zoobibackups avatar Mar 17 '23 20:03 zoobibackups

You can use something like this:

import FileViewer from 'react-native-file-viewer';

let file = await RNHTMLtoPDF.convert({
    html: html,
    fileName: 'My PDF File',
    directory: 'Documents',
  });

if(file?.filePath) {
  FileViewer.open(filePath);

timothytripp avatar May 01 '23 16:05 timothytripp

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.

stale[bot] avatar Sep 16 '23 19:09 stale[bot]