Two-a4-on-one-a3.sh: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
==Longer version== | ==Longer version== | ||
This script was written to generate the print files for the publication ''ongoing circulations'', a publication made at Varia to document a series of five collective learning sessions in 2022. Each session departed from a technological practice and made space for exploring, questioning and (re)turning (to) digital library software, plain text publishing protocols, web-to-print tools, high frequency radio communication, and colonial infrastructures. The publication is based on the format of the letter, a mode of address that was chosen to reach out to the participants of the sessions specifically, but could meanwhile also speak to a larger body of readers and invite them into the questions that were formulated and materials that were produced. The letters | This script was written to generate the print files for the publication ''ongoing circulations'', a publication made at Varia to document a series of five collective learning sessions in 2022. Each session departed from a technological practice and made space for exploring, questioning and (re)turning (to) digital library software, plain text publishing protocols, web-to-print tools, high frequency radio communication, and colonial infrastructures. The publication is based on the format of the letter, a mode of address that was chosen to reach out to the participants of the sessions specifically, but could meanwhile also speak to a larger body of readers and invite them into the questions that were formulated and materials that were produced. | ||
The letters were RISO printed by Printroom, which is a space in Rotterdam dedicated to artist publications, small press and self-publishing. They run a RISO workshop in the city, where they have two A3 RISO machines plus four A4 ones, lots of different colors, and a range of machines for the post production, such as folding machines. Printroom asked us to prepare the print files on A3, because these RISO machines are the most reliable ones they have. At first i wasn't really sure how to do it... How can each A4 page of the PDF be duplicated and placed side-by-side on one A3 page without loosing any quality? Using raster editor software, like Gimp, would not make sense, as i was not sure if this would keep the quality of the PDF intact. Using vector editor software, like Inkscape, would also not make a lot of sense, because the fonts would not be rendered correctly. So i started to look for a tool that could be used from the command line. | |||
The script does two things: it multiplies each page of a PDF by two, and it places two A4 pages on an A3 side-by-side. It took me a while to figure out how you could do this, but eventually [https://superuser.com/a/1549057 this answer on superuser.com] revealed a very nice trick using <code>pdftk</code>. I have used <code>pdftk</code> in the past to work with PDFs to extract certain pages, so i was aware of the <code>cat</code> option and that you can use it to point to specific pages of your document. I had never seen <code>cat</code> being used though, to duplicate pages! It was a great discovery, specially because other ways of reaching the same outcome involved for loops written in bash, which would mean probably mean that i would write a small bash script to write this all out, and now i needed just one line of code. | The script does two things: it multiplies each page of a PDF by two, and it places two A4 pages on an A3 side-by-side. It took me a while to figure out how you could do this, but eventually [https://superuser.com/a/1549057 this answer on superuser.com] revealed a very nice trick using <code>pdftk</code>. I have used <code>pdftk</code> in the past to work with PDFs to extract certain pages, so i was aware of the <code>cat</code> option and that you can use it to point to specific pages of your document. I had never seen <code>cat</code> being used though, to duplicate pages! It was a great discovery, specially because other ways of reaching the same outcome involved for loops written in bash, which would mean probably mean that i would write a small bash script to write this all out, and now i needed just one line of code. |
Revision as of 16:19, 6 April 2023
pdftk ongoing-circulations.pdf cat 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 output ongoing-circulations-double-pages.pdf pdfjam --nup 2x1 --paper a3paper --landscape partylines-publication-double-pages.pdf
Shorter version
The script does two things: it multiplies each page of a PDF by two, and it places two A4 pages on an A3 side-by-side.
It uses two PDF manipulation tools: pdftk
and pdfjam
.
This script was written to generate the print files for the publication ongoing circulations, a publication made at Varia to document a series of five collective learning sessions in 2022.
Longer version
This script was written to generate the print files for the publication ongoing circulations, a publication made at Varia to document a series of five collective learning sessions in 2022. Each session departed from a technological practice and made space for exploring, questioning and (re)turning (to) digital library software, plain text publishing protocols, web-to-print tools, high frequency radio communication, and colonial infrastructures. The publication is based on the format of the letter, a mode of address that was chosen to reach out to the participants of the sessions specifically, but could meanwhile also speak to a larger body of readers and invite them into the questions that were formulated and materials that were produced.
The letters were RISO printed by Printroom, which is a space in Rotterdam dedicated to artist publications, small press and self-publishing. They run a RISO workshop in the city, where they have two A3 RISO machines plus four A4 ones, lots of different colors, and a range of machines for the post production, such as folding machines. Printroom asked us to prepare the print files on A3, because these RISO machines are the most reliable ones they have. At first i wasn't really sure how to do it... How can each A4 page of the PDF be duplicated and placed side-by-side on one A3 page without loosing any quality? Using raster editor software, like Gimp, would not make sense, as i was not sure if this would keep the quality of the PDF intact. Using vector editor software, like Inkscape, would also not make a lot of sense, because the fonts would not be rendered correctly. So i started to look for a tool that could be used from the command line.
The script does two things: it multiplies each page of a PDF by two, and it places two A4 pages on an A3 side-by-side. It took me a while to figure out how you could do this, but eventually this answer on superuser.com revealed a very nice trick using pdftk
. I have used pdftk
in the past to work with PDFs to extract certain pages, so i was aware of the cat
option and that you can use it to point to specific pages of your document. I had never seen cat
being used though, to duplicate pages! It was a great discovery, specially because other ways of reaching the same outcome involved for loops written in bash, which would mean probably mean that i would write a small bash script to write this all out, and now i needed just one line of code.
So in the end, the script uses two PDF manipulation tools: pdftk
and pdfjam
.
The first line of the script calls pdftk
, then uses ongoing-circulations.pdf
as its input file, then uses cat 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10
to select a range of pages of the input file, and writes it the output
to ongoing-circulations-double-pages.pdf
.