Git Product home page Git Product logo

Comments (9)

JulienMelissas avatar JulienMelissas commented on August 30, 2024 31

Hi @bionets... I know this is old, but I was able to do this pretty easily by just adding a style:

.sheet {
  overflow: visible;
  height: auto !important;
}

I was also able to avoid the browser printing half an element on one page and the other half on the next by adding page-break-inside: avoid; to the repeating items I had, in my case it was a simple div.

from paper-css.

cognitom avatar cognitom commented on August 30, 2024 2

Hi @bionets.
paper-css is just a set of CSS, so we need to do pagination manually.

from paper-css.

danilockthar avatar danilockthar commented on August 30, 2024 1

page-break-inside: avoid;

Hi, how you avoid the next page enters with no padding on top ? i try your solution but when content is too big, the next page is close to the border top of the page.

from paper-css.

lpwm avatar lpwm commented on August 30, 2024 1

@lpwm @danilockthar try adding:

@page {
   size: A4;
   margin: 15mm 15mm 15mm 15mm;
}

Finally found the issue was caused by a div with growing height and ignored the paddings.

from paper-css.

lpwm avatar lpwm commented on August 30, 2024

page-break-inside: avoid;

Hi, how you avoid the next page enters with no padding on top ? i try your solution but when content is too big, the next page is close to the border top of the page.

Same issue +1

from paper-css.

TriPSs avatar TriPSs commented on August 30, 2024

@lpwm @danilockthar try adding:

@page {
   size: A4;
   margin: 15mm 15mm 15mm 15mm;
}

from paper-css.

franky1017 avatar franky1017 commented on August 30, 2024

page-break-inside: avoid;

Hi, how you avoid the next page enters with no padding on top ? i try your solution but when content is too big, the next page is close to the border top of the page.

Same issue +1

@lpwm @danilockthar try adding:

@page {
   size: A4;
   margin: 15mm 15mm 15mm 15mm;
}

I tried this and didn't work. Is there a sample code that contains the full CSS and page content that goes across multiple pages? Thanks!

from paper-css.

fgonga avatar fgonga commented on August 30, 2024

I solved it

@page {
            size: A4;
            margin: 5mm 0mm ;
        }
.sheet {
            overflow: visible;
            height: auto !important;
        }

from paper-css.

zerdotre avatar zerdotre commented on August 30, 2024

@cognitom When looping through data, is there any way we can know when a page is full? and then start/open a new sheet.

from paper-css.

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.