Giter VIP home page Giter VIP logo

Comments (10)

lucdetellis avatar lucdetellis commented on May 20, 2024 100

Thanks! <br><div style="page-break-after:always;"></div> worked perfectly for me.

from node-html-pdf.

 avatar commented on May 20, 2024 84

Sorry, I don't know that this css style exists. Solved page break with:

style="page-break-after:always;"

from node-html-pdf.

zurcacielos avatar zurcacielos commented on May 20, 2024 12

you can use media queries too:

@media print {
p {page-break-inside: avoid;}
h1 {page-break-before: always;}
footer {page-break-after: always;}
}

that may give anybody reading this an idea #2018 :)

from node-html-pdf.

somasekharn avatar somasekharn commented on May 20, 2024 3

Hi Techies,
I am facing problem of page-break not working for table row (tr),
I have tried all above methods but no luck,
FYI ., i am using Nodejs, serverless framework having html-pdf as dependancy

from node-html-pdf.

aleem-ahmed avatar aleem-ahmed commented on May 20, 2024 2

if you are running into problems where "page-break-after: always;" does NOT work, then a cheap way to get around it is to install something like "merge-pdf-buffer" to merge multiple pdf buffers. It's how I solved my problem. instead of creating 1 pdf-buffer create multiple and merge them using the "merge-pdf-buffer" package.

from node-html-pdf.

selven avatar selven commented on May 20, 2024 1

Sorry to revive an old thread, but have any of you had any luck doing the same with css grid? page-break-after doesn't seem to work within a grid.

from node-html-pdf.

vrunoa avatar vrunoa commented on May 20, 2024

style="page-break-after:always;" Works perfect!

from node-html-pdf.

vieiralucas avatar vieiralucas commented on May 20, 2024

@lucdetellis you are a god!

from node-html-pdf.

AhsanNissar avatar AhsanNissar commented on May 20, 2024

guys can I get some help with this? https://stackoverflow.com/questions/69858192/add-page-break-to-ejs-template

from node-html-pdf.

PriyankMotivaras avatar PriyankMotivaras commented on May 20, 2024

style="page-break-after:always;" worked for me. Thanks

from node-html-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.