User:Youjung/paged.js: Difference between revisions
(Created page with "Let's try paged.js! For 2026 Extraterrestrial Zine Fair, I'm going to make a zine using paged.js. Instead of weasyprint, I chose paged.js. First, The Internet Phone Book used paged.js. Second, paged.js supports nth-child. Simply these two reasons. Haha! Workflow 1. Setup 2. CSS writing 3. Editing the images 4. 검수 5. PDF making pdf imposition https://pzwiki.wdka.nl/mediadesign/Imposition") |
|||
| (34 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
For Extraterrestrial Zine Fair 2026, I'm using [https://pagedjs.org/ paged.js]. | |||
For | |||
There are 2 reason for using paged.js instead of [https://weasyprint.org/ weasyprint]. First, [https://internetphonebook.net/ The Internet Phone Book] used paged.js and I'm a big fan of [https://elliott.computer/ Elliott Cost]. Second, paged.js supports nth-child unlike weasyprint. This page is the documentation of making a zine using paged.js. | |||
== Title: Tangled Thoughts == | |||
During the winter break, I spent time drawing tangled threads. I've been weirdly obsessed with these shapes. I think it reflects my chaotic mind. But they are satisfying to draw. With the gathered drawings, I compiled them together into a zine. It is a good practice to move away from Adobe, although I'm still using Photoshop to edit the drawings. | |||
pdf | == Working Process == | ||
https:// | |||
==== Step 1. File Setup ==== | |||
I used Paged.js as a polyfill in web browsers as it is easy to design looking at the results live through the browser. | |||
[https://pagedjs.org/en/documentation/2-getting-started-with-paged.js/ Getting Started with Paged.js] | |||
1. Download <code>paged.polyfill.js</code> and <code>interface.css</code> link it from the head of your html file. Make a new <code>style.css</code>and also link it. | |||
<script src="js/paged.polyfill.js"></script> | |||
<link href="path/to/file/interface.css" rel="stylesheet" type="text/css" /> | |||
<link href='css/style.css' rel='stylesheet' /> | |||
├── css | |||
│ ├── interface.css | |||
│ └── style.css | |||
├── index.html | |||
└── js | |||
└── paged.polyfill.js | |||
2. To preview the pdf Go Live on your code Editor. | |||
3. You can also download <code>paged.js</code> through command line. | |||
$ npm install -g pagedjs-cli pagedjs | |||
==== Step 2. Design with CSS ==== | |||
This is the fun part! Using html and css to designing the zine. | |||
[https://pagedjs.org/en/documentation/5-web-design-for-print/ Web design for print] | |||
1. Set the page size and margin | |||
@page { | |||
size: A5; | |||
margin: 8mm 12mm; | |||
font-family: TT2020StyleD-Regular; | |||
p { | |||
font-size: 9pt; | |||
line-height: 14pt; | |||
} | |||
} | |||
2. Set page order using pagebreak | |||
<code>break-before: page;</code> The element should start on a new page | |||
<br><code>break-before: right;</code> The element starts on the next right/left page. | |||
==== Step 3. Make PDF ==== | |||
If you're ready to print, make it into a pdf. The total number of pages must be a '''multiple of 4'''. | |||
1. cmd/ctrl + p to download the pdf. | |||
2. [https://manpages.debian.org/bookworm/texlive-extra-utils/pdfbook2.1.en.html pdfbook] for [[Imposition]] | |||
⚠️ If you are printing at the '''publication station you do not need imposition''', the printer will do it for you. (costed 42 euros to learn this) ⚠️ | |||
pdfbook2 --paper=a4paper -n -s output.pdf | |||
-s, --short-edge | |||
-n, --no-crop | |||
Test Prints | |||
<div style="display: flex; gap: 5px;">[[File:Test print2.jpg|frameless]][[File:Test print.jpg|frameless]][[File:Test print 3.jpg|frameless]]</div> | |||
====Step 4. Print and bind them together==== | |||
For better resolution for my pencil drawings, I used the laser printer at the publication studio. | |||
==Final Output== | |||
*Font: [https://copypaste.wtf/TT2020/docs/download.html TT2020 StyleD italic] | |||
*Binding: Saddle stitch binding | |||
*Print method: Laser print, grayscale | |||
[[File:Tangled thoughts-ezgif.com-resize(1).gif|frameless|500x500px]] | |||
Latest revision as of 02:24, 18 March 2026
For Extraterrestrial Zine Fair 2026, I'm using paged.js.
There are 2 reason for using paged.js instead of weasyprint. First, The Internet Phone Book used paged.js and I'm a big fan of Elliott Cost. Second, paged.js supports nth-child unlike weasyprint. This page is the documentation of making a zine using paged.js.
Title: Tangled Thoughts
During the winter break, I spent time drawing tangled threads. I've been weirdly obsessed with these shapes. I think it reflects my chaotic mind. But they are satisfying to draw. With the gathered drawings, I compiled them together into a zine. It is a good practice to move away from Adobe, although I'm still using Photoshop to edit the drawings.
Working Process
Step 1. File Setup
I used Paged.js as a polyfill in web browsers as it is easy to design looking at the results live through the browser.
1. Download paged.polyfill.js and interface.css link it from the head of your html file. Make a new style.cssand also link it.
<script src="js/paged.polyfill.js"></script> <link href="path/to/file/interface.css" rel="stylesheet" type="text/css" /> <link href='css/style.css' rel='stylesheet' />
├── css │ ├── interface.css │ └── style.css ├── index.html └── js └── paged.polyfill.js
2. To preview the pdf Go Live on your code Editor.
3. You can also download paged.js through command line.
$ npm install -g pagedjs-cli pagedjs
Step 2. Design with CSS
This is the fun part! Using html and css to designing the zine.
1. Set the page size and margin
@page {
size: A5;
margin: 8mm 12mm;
font-family: TT2020StyleD-Regular;
p {
font-size: 9pt;
line-height: 14pt;
}
}
2. Set page order using pagebreak
break-before: page; The element should start on a new page
break-before: right; The element starts on the next right/left page.
Step 3. Make PDF
If you're ready to print, make it into a pdf. The total number of pages must be a multiple of 4.
1. cmd/ctrl + p to download the pdf.
2. pdfbook for Imposition
⚠️ If you are printing at the publication station you do not need imposition, the printer will do it for you. (costed 42 euros to learn this) ⚠️
pdfbook2 --paper=a4paper -n -s output.pdf
-s, --short-edge -n, --no-crop
Test Prints
Step 4. Print and bind them together
For better resolution for my pencil drawings, I used the laser printer at the publication studio.
Final Output
- Font: TT2020 StyleD italic
- Binding: Saddle stitch binding
- Print method: Laser print, grayscale