Git Product home page Git Product logo

Comments (5)

steveYeah avatar steveYeah commented on June 14, 2024

OK, this might not be possible, or at least not simple, judging by the wkhtmltopdf documentation:

===============================> Page Breaking <================================
The current page breaking algorithm of WebKit leaves much to be desired.
Basically webkit will render everything into one long page, and then cut it up
into pages. This means that if you have two columns of text where one is
vertically shifted by half a line. Then webkit will cut a line into to pieces
display the top half on one page. And the bottom half on another page. It will
also break image in two and so on.  If you are using the patched version of QT
you can use the CSS page-break-inside property to remedy this somewhat. There is
no easy solution to this problem, until this is solved try organizing your HTML
documents such that it contains many lines on which pages can be cut cleanly.

But would still like to hear your views.

from knpsnappybundle.

pilot avatar pilot commented on June 14, 2024

@steveYeah KnpLabs/snappy#74

from knpsnappybundle.

steveYeah avatar steveYeah commented on June 14, 2024

@pilot I was thinking more like KnpLabs/snappy#96

from knpsnappybundle.

mois3sk9 avatar mois3sk9 commented on June 14, 2024

if you want break a page just put this style="page-break-after:always" inside a div tag where you want to break the page, that's it, it works for me!

from knpsnappybundle.

akerouanton avatar akerouanton commented on June 14, 2024

Actually, this is totally supported by Snappy. You can pass an array of file paths or HTML content to generate/getOutput methods, and wkhtmltopdf will render at least as much pages as provided sources.

from knpsnappybundle.

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.