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 separating divs into separate pages #15

Open
osimuka opened this issue Jun 16, 2021 · 1 comment
Open

not separating divs into separate pages #15

osimuka opened this issue Jun 16, 2021 · 1 comment

Comments

@osimuka
Copy link

osimuka commented Jun 16, 2021

Using React 17

const pdfRef = createRef();

<div id="page" ref={pdfRef}>
    <div className="page page-1">
      {reportHeader()}
    </div>
    <div className="page page-2">
      {reportContent()}
    </div>
    <div className="page page-3">
      {reportSummary()}
    </div>
    <div className="page page-4">
      {reportMain()}
    </div>
    <div className="page page-5">
      {reportConclusion()}
    </div>
</div>

I can't get it to separate using the custom separation protocol

Any help?

@johnnywang1994
Copy link
Owner

hi, need to confirm how and where did you call the html2pdf function?

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

2 participants