Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

css-print-framework

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-print-framework

Simply include the right stylesheet(s) in your html and load it only for a printer.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Css Print Framework

Simply include the right stylesheet(s) in your html and load it only for a printer.

$ npm install css-print-framework

Basic Usage

Load css into <head> like this:

<!-- Load print.css for happy printing -->
<link rel="stylesheet" href="print.css">

<!-- Set page size here: A5, A4 or A3 -->
<!-- Set also "landscape" if you need -->
<style>@page { size: A5 }</style>

Set the class of <body> and also set "sheet" for each sheet.

<!-- Set "A5", "A4" or "A3" for class name -->
<!-- Set also "landscape" if you need -->
<body class="A5">

  <!-- Each sheet element should have the class "sheet" -->
  <!-- "padding-**mm" is optional: you can set 10, 15, 20 or 25 -->
  <section class="sheet padding-10mm">

    <!-- Write HTML just like a web page -->
    <article>This is an A5 document.</article>

  </section>

  <!-- The title will be on a new page -->
  <h1 class="break-before">My title</h1>

  <p class="break-after">I will break after this paragraph</p>
  <!-- Break here, the next paragraph will be on a new page -->
  <p>I am on a new page</p>

  <!-- Avoid break inside -->
  <div class="avoid-break-inside">
    <img src="image.png" />
    <p>I really don't want this part to be cut</p>
  </div>

</body>

All available page sizes is listed below:

  • A5, A5 landscape
  • A4, A4 landscape
  • A3, A3 landscape
  • letter, letter landscape
  • legal, legal landscape

Comparisons

typeexpressionlearning costeditablein-browsermultipage
HTMLEnoughalready knownNoOK~100 pages *
SVGEnoughnot so difficultNoOK
PDFPerfectdifficultNoNGno limit **
ExcelNot coolsighYesNGuncontrollable

Keywords

FAQs

Package last updated on 09 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc