CSS Print is a module within the CSS language standards maintained by the W3C.
Some reasons why CSS Print can be interesting to use:
@media print{
h1{
width: 100%;
text-align: center;
}
}
That speaks for itself :)
But.. when doing this on the wiki, there is only one stylesheet for all wiki pages :(
WIKIPAGE=$1
# Download a wikipage in HTML
curl https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=render > $WIKIPAGE.html
# Change the links in the images
sed -i "s/\https://pzwiki.wdka.nl/mw-mediadesign/https:\/\/pzwiki.wdka.nl\https://pzwiki.wdka.nl/mw-mediadesign/g" $WIKIPAGE.html
# Add stylesheet(s)
pandoc \
--standalone \
--css screen.css \
--css print.css \
$WIKIPAGE.html \
--output $WIKIPAGE.html
Now open the web page in your browser, and CTRL+P
/
CMD+P
!
$ weasyprint https://pzwiki.wdka.nl/mediadesign/Protocols_for_Collective_Performance:_Radio_Broadcast_1?action=render --stylesheet print.css broadcast1.pdf
Download the Paged.js library:
WIKIPAGE=$1
# Download a wikipage in HTML
curl https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=render > $WIKIPAGE.html
# Change the links in the images
sed -i "s/\https://pzwiki.wdka.nl/mw-mediadesign/https:\/\/pzwiki.wdka.nl\https://pzwiki.wdka.nl/mw-mediadesign/g" $WIKIPAGE.html
# Add stylesheet(s) + paged.js library
pandoc \
--standalone \
--css print.css \
--css pagedjs.interface.css \
--include-in-header=pagedjs.polyfill.js \
$WIKIPAGE.html \
--output $WIKIPAGE.html
$ pdfunite file1.pdf file2.pdf file3.pdf output.pdf
There are many ways to make booklets with the terminal, using Imposition tools.
For example:
$ pdfbook2 output.pdf --no-crop --short-edge --paper=a4paper