Code Monkey home page Code Monkey logo

Comments (9)

bompus avatar bompus commented on May 27, 2024 5

Chrome seemed to be fine, but was having issues in Safari. This is how I fixed it. It didn't seem to cause any regression in Chrome.

@media print {
   .sheet {
      /* firefox, safari extra page fix */
      width: 100% !important;
      height: 100% !important;
      page-break-after: auto !important;
   }
}

from paper-css.

NerdyBoyCool avatar NerdyBoyCool commented on May 27, 2024 1

I have same problem on safari (platform is Mac OS).
I fixed it like this. I think this solution is temporary fix.

.paper__sheet
  @extend .sheet
  @media print
    width: 100% !important
    height: 100% !important

I think we don't need width, height in printing mode.
スクリーンショット 2019-08-30 12 16 43

from paper-css.

amdev avatar amdev commented on May 27, 2024 1

Hi just found this issue in Chrome.
How to fix?

from paper-css.

cognitom avatar cognitom commented on May 27, 2024

Hi, @janvydra
Pls, forget everything about IE...
By the way, Firefox and Edge seems OK in my environment.

Check this example:
https://github.com/cognitom/paper-css/blob/master/examples/a4.html

You can check the same file from this URL directly:
https://raw.githack.com/cognitom/paper-css/master/examples/a4.html

Open the URL above on Firefox and Edge. You may also need to check the orientation of papers and stuff.

from paper-css.

jlannoy avatar jlannoy commented on May 27, 2024

I have the exact same problem with Safari (last version). Even with your direct example.

from paper-css.

screwt avatar screwt commented on May 27, 2024

Same problem only on widnows+firefox using 'Adobe PDF' or 'PDF Pro Virtual Printer' as output.
Run well on linux...
Chome is ok on all platforms.

from paper-css.

FlyveHest avatar FlyveHest commented on May 27, 2024

I am experiencing the same thing, a blank page is added after every page in FireFox, but only when printing, not when viewing in browser. (on Windows platform)

It seems to work in Chrome.

from paper-css.

Fujihita avatar Fujihita commented on May 27, 2024

I have found that reducing the paper size by 0.4mm (from 296mm to 295.6mm) will fix the issue in Firefox (Linux).
body.A4 .sheet { width: 210mm; height: 295.6mm }

@bompus fix also eliminates the extra pages but it also causes the content on the next sheet to flow over the unused space of the sheet before it.

from paper-css.

warmwhisky avatar warmwhisky commented on May 27, 2024

Try putting style="contain: size;" or style="contain: strict;" around the parent element

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.