Open vignesh511989 opened 2 years ago
Is this an issue on both iOS and Android? Is the paper size selected the same dimensions as what you have set?
Thanks for looking into this. I've only tried this on IOS so far. Below is my options.
const createPDF = async (ID, newResumeFields) => { let options = { html: returnResumeHTML(newResumeFields), fileName: 'filename', directory: 'Documents', padding: 40, bgColor: '#ffffff', height: 792, width: 612, }; return await RNHTMLtoPDF.convert(options); };
how did you able to create PDf ? this code does not work for me .. it shows RNHTMLtoPDF undefined async createPDF() { let options = { html: '
let file = await RNHTMLtoPDF.convert(options)
// console.log(file.filePath);
alert(file.filePath);
}
how did you able to create PDf ? this code does not work for me .. it shows RNHTMLtoPDF undefined async createPDF() { let options = { html: '
PDF TEST
', fileName: 'test', directory: 'Documents', };
let file = await RNHTMLtoPDF.convert(options) // console.log(file.filePath); alert(file.filePath);
}
First you should verify react-native-html-to-pdf is installed properly and you are importing correctly.
If everything is okay, you can try the following way.
let options = {
html: htmlString,
fileName: 'Pdf file name',
base64: true,
};
let file = await RNHTMLtoPDF.convert(options);
And if you are generating PDF, you might want to save it or open it. In this RNFetchBlob
can help you.
If you need further any help, you can mail me ans2sqb@gmail.com
This is happening for me on Android
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.
i also got the same problem
same issue
Same issue
This will help https://www.youtube.com/watch?v=4CBUXv8d0I0
same issue :My html page data is generated in a loop
.pageBody { // display: flex; // flex-direction: column; border-radius: 10px; border: 1px solid #ccc; } When I comment out the elastic box in my style
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.
Same issue
Same issue
Hi,
I'm creating multi page pdf from html. Last line from the first page is cutting off and flowing into the next page.
Is there any way to fix this please.
thanks Vignesh