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

Not able add the top margin at the 2nd page onwards #40

Open
tabish9936 opened this issue Feb 6, 2024 · 3 comments
Open

Not able add the top margin at the 2nd page onwards #40

tabish9936 opened this issue Feb 6, 2024 · 3 comments

Comments

@tabish9936
Copy link

As I am converting html to pdf if the html content is of the one page then it is fine if the content goes beyond that then the text in the in the 1st page get break down so need add the margin top at the 2nd page onwards but there is no such functionality for it.

image
Onlinedoc_1705929661378803cb (9).pdf

@johnnywang1994
Copy link
Owner

johnnywang1994 commented Feb 27, 2024

Hi, thanks for reporting issue, did you add the config "margin" when calling the plugin function?

html2PDF([
  document.getElementById('first'),
  document.getElementById('second'),
], {
  // => margin config is here
  margin: {
    top: 10,
    right: 10,
    bottom: 30,
    left: 10,
  },
  html2canvas: {
    scrollY: 0,
    scrollX: 0,
  },
  autoResize: false,
})

@tabish9936
Copy link
Author

it is not working

@oknixus
Copy link

oknixus commented Sep 26, 2024

it is not working

Me too.

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

3 participants