Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last line is cutting off to the next page #253

Open
vignesh511989 opened this issue Dec 4, 2021 · 15 comments
Open

last line is cutting off to the next page #253

vignesh511989 opened this issue Dec 4, 2021 · 15 comments

Comments

@vignesh511989
Copy link

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

Screen Shot 2021-12-05 at 9 22 02 AM

@christopherdro
Copy link
Owner

Is this an issue on both iOS and Android? Is the paper size selected the same dimensions as what you have set?

@Big-Vi
Copy link

Big-Vi commented Dec 13, 2021

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); };

@ZainabShakeel
Copy link

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);

}

@TechSaq
Copy link

TechSaq commented Dec 24, 2021

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 [email protected]

@sidorchukandrew
Copy link

This is happening for me on Android

@stale
Copy link

stale bot commented May 30, 2022

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 stale bot added the stale label May 30, 2022
@kapilavaiya
Copy link

i also got the same problem

@stale stale bot removed the stale label Jun 4, 2022
@vijeethLooperex
Copy link

same issue

@mansilaad
Copy link

Same issue

@BraveEvidence
Copy link

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

@yuanyixiaomei
Copy link

yuanyixiaomei commented Jul 11, 2023

same issue :My html page data is generated in a loop

@yuanyixiaomei
Copy link

.pageBody {
// display: flex;
// flex-direction: column;
border-radius: 10px;
border: 1px solid #ccc;
}
When I comment out the elastic box in my style

Copy link

stale bot commented Mar 13, 2024

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.

@lucsoftsl
Copy link

Same issue

1 similar comment
@Gavru4
Copy link

Gavru4 commented May 15, 2024

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests