https://github.com/null-none/css-print-framework
Simply include the right stylesheet(s) in your html and load it only for a printer.
https://github.com/null-none/css-print-framework
Last synced: about 1 year ago
JSON representation
Simply include the right stylesheet(s) in your html and load it only for a printer.
- Host: GitHub
- URL: https://github.com/null-none/css-print-framework
- Owner: null-none
- License: mit
- Created: 2021-06-09T09:15:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-09T09:16:36.000Z (about 5 years ago)
- Last Synced: 2025-01-26T09:28:39.377Z (over 1 year ago)
- Language: CSS
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Css Print Framework
Simply include the right stylesheet(s) in your html and load it only for a printer.
```bash
$ npm install css-print-framework
```
## Basic Usage
Load css into `` like this:
```html
@page { size: A5 }
```
Set the class of `` and also set "sheet" for each sheet.
```html
This is an A5 document.
My title
I will break after this paragraph
I am on a new page
I really don't want this part to be cut
```
All available page sizes is listed below:
- A5, A5 landscape
- A4, A4 landscape
- A3, A3 landscape
- letter, letter landscape
- legal, legal landscape
### Comparisons
type | expression | learning cost | editable | in-browser | multipage
:-- | :-- | :-- | :-- | :-- | :--
HTML | Enough | already known | No | OK | ~100 pages \*
SVG | Enough | not so difficult | No | OK |
PDF | Perfect | difficult | No | NG | no limit \*\*
Excel | Not cool | *sigh* | Yes | NG | uncontrollable