diff --git a/README.md b/README.md index b095250..b8e172d 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,130 @@ The choice to work with Mediawiki and web-to-print techniques, continues practic * DiVersions (Constant, OSP) https://www.books.constantvzw.org/home/diversions-v2, https://diversions.constantvzw.org/, https://diversions.constantvzw.org/wiki/index.php?title=PublicationUnfolded, http://osp.kitchen/work/diversions/, https://gitlab.constantvzw.org/osp/work.diversions * Mondoteque (Constant, André Castro, Alexia de Visscher) https://www.books.constantvzw.org/home/mondotheque, https://www.mondotheque.be/wiki/index.php?title=The_radiated_book * html2print (OSP), http://osp.kitchen/tools/html2print/ + +## Other tools used for Volumetric Regimes + +Most of these tools are used for PDF manipulation. + +With a big thanks to OSP's PDFUTILS! + +### OSP-tools.pdfutils: `color_convert.sh` + +**Convert PDF RGB to only-Black** + +This will convert an RGB PDF (even if it appears only black) to `input-K.pdf`. + + ./color_convert.sh black input.pdf input-K.pdf + +Link: + +### OSP-tools.pdfutils: `rgb2cmyk.sh` + +**Convert PDF from RGB to CMYK** + +Dependencies: + +- `gs` (Ghostscript) +- `pdftops` +- `control.txt` +- `apple_to_jNP_photo.icc` +- `apple_to_jNP_neutral.icc` + +This will convert a PDF to `input-cmyk.pdf`. + +Usage: + + ./rgb2cmyk.sh input.pdf + +Link: + +### OSP-tools.pdfutils: `rgb2cmyk-overprint.sh` + +**Convert PDF from RGB to CMYK, with overprint enabled on the whole document** + +Dependencies: + +- `gs` (Ghostscript) +- `pdftops` +- `control.txt` +- `apple_to_jNP_photo.icc` +- `apple_to_jNP_neutral.icc` + +This will convert a PDF to `input-CMYK-op.pdf`. + +Usage: + + ./rgb2cmyk-overprint.sh input.pdf + +Link: + +### OSP-tools: `resample.sh` + +Dependencies: + +- `gs` (Ghostscript) + +This will change the resolution of a PDF. + +Usage: + + ./resample input.pdf 150 + +### Custom VR tools: `make-images-bw.sh` + +Dependencies: + +- `imagemagick` + +This will create a copy of an image folder, with all images converted to BW. + +Usage: + + ./make-images-bw.sh ./images-folder/ + +### Custom VR tools: `convert-to-PDFX-3-2002.sh` + +Dependencies: + +- `texlive-xetex` (xelatex) + +This will convert a PDF into the PDFX/3:2002 format + edit the PDF metadata. + +Edit PDF metadata: + + Open the xelatex template (`xelatex-PDFX-3-2002.template.tex`) and edit the metadata on line 7-12. + +Usage: + + convert-to-PDFX-3-2002.sh input.pdf output.pdf + +### Custom VR tools: `separatecolors.sh` + +Dependencies: + +- `gs` (Ghostscript) + +This will convert the PDF into a set of TIFF files, which is useful to inspect how the colors are spread over the different color "plates". + +The script generates one TIFF for: + +- full color +- cyan plate +- magenta plate +- yellow plate +- black plate + +Usage: + + ./simulateoverprint.sh input.pdf + +### Other useful tools + +- Check metadata of PDF: `pdfinfo filename.pdf` +- Check color space of PDF: `pdfimages -list filename.pdf` +- Check colors of PDF: `identify -verbose filename.pdf` + + + + + diff --git a/command-line/css/print.css b/command-line/css/print.css index 6941a6e..1019252 100644 --- a/command-line/css/print.css +++ b/command-line/css/print.css @@ -96,7 +96,7 @@ body{ /*size: 164mm 237mm;*/ /* Size of the physical printed DB06 book */ /*size: 576px 864px;*/ size: 152mm 229mm; - bleed: 3mm; /* ON for final print files */ + /*bleed: 3mm;*/ /* ON for final print files */ /*marks: crop;*/ /* OFF for the final print files */ @bottom-center{ @@ -165,9 +165,9 @@ body{ } @page section{ /* section title pages -- color */ - /*background: linear-gradient(180deg, #3741ea, #c0c1e7);*/ + background: linear-gradient(180deg, #3741ea, #c0c1e7); /* section title pages -- black and white */ - background: linear-gradient(180deg, #444444, #d1d1d1); + /*background: linear-gradient(180deg, #444444, #d1d1d1);*/ color: white !important; @top-center{ diff --git a/command-line/multi-remix/multi-remix-stamp.pdf b/command-line/multi-remix/multi-remix-stamp.pdf index a069c59..7720c33 100644 Binary files a/command-line/multi-remix/multi-remix-stamp.pdf and b/command-line/multi-remix/multi-remix-stamp.pdf differ diff --git a/command-line/multi-remix/multi-remix-web-stamp.pdf b/command-line/multi-remix/multi-remix-web-stamp.pdf new file mode 100644 index 0000000..b491357 Binary files /dev/null and b/command-line/multi-remix/multi-remix-web-stamp.pdf differ diff --git a/command-line/multi-remix/multi-remix-web.pdf b/command-line/multi-remix/multi-remix-web.pdf new file mode 100644 index 0000000..80adff0 Binary files /dev/null and b/command-line/multi-remix/multi-remix-web.pdf differ diff --git a/command-line/multi-remix/multi-remix-web.svg b/command-line/multi-remix/multi-remix-web.svg new file mode 100644 index 0000000..dcd4791 --- /dev/null +++ b/command-line/multi-remix/multi-remix-web.svg @@ -0,0 +1,76 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/command-line/tools/convert-to-PDFX-3-2002.sh b/command-line/tools/convert-to-PDFX-3-2002.sh index 80cd577..001e45b 100755 --- a/command-line/tools/convert-to-PDFX-3-2002.sh +++ b/command-line/tools/convert-to-PDFX-3-2002.sh @@ -1,6 +1,9 @@ -# Read first argument from command line: input folder name +# Use: sh convert-to-PDFX-3-2002.sh filename.pdf + +bn=$(basename $1 ".pdf") + INPUT_PDF=$1 -OUTPUT_PDF=$2 +OUTPUT_PDF=$bn-PDFX-3-2022.pdf # Make a tmp copy of the tex template with the input PDF filename sed "s/XXX/$INPUT_PDF/g" xelatex-PDFX-3-2002.template.tex > xelatex-PDFX-3-2002.tmp.tex diff --git a/command-line/tools/forceblack.ps b/command-line/tools/forceblack.ps new file mode 100644 index 0000000..063dcb7 --- /dev/null +++ b/command-line/tools/forceblack.ps @@ -0,0 +1,22 @@ +%! +/sys_setcolorspace /setcolorspace load def +/sys_setcolor /setcolor load def +userdict/is_rgb false put +/setcolorspace +{ + sys_setcolorspace + currentcolorspace 0 get /DeviceRGB eq + userdict/is_rgb 3 -1 roll put +}bind def +/setcolor +{ + userdict/is_rgb get not + {sys_setcolor} + { + 3 copy + 2 copy eq 4 1 roll eq exch pop and + {setgray pop pop (!\n)print flush} + {/DeviceRGB sys_setcolorspace sys_setcolor}ifelse + }ifelse +}bind def +% diff --git a/command-line/tools/rgb2cmyk-overprint.sh b/command-line/tools/rgb2cmyk-overprint.sh new file mode 100755 index 0000000..0905a9b --- /dev/null +++ b/command-line/tools/rgb2cmyk-overprint.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +# CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS +# OVERPRINT FEATURE IS AVAILABLE WITH AN OPTION + +# USAGE: +# ./rgb2cmyk.sh input.pdf +# ./rgb2cmyk.sh input.pdf overprint + +# OUTPUT: +# input-cmyk.pdf +# input-cmyk-op.pdf (in case of overprint) + +bn=$(basename $1 ".pdf") + +gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1 + +# OVERPRINT COMMANDS BELOW + +pdftops -level2sep ${bn}-CMYK.pdf +sed -e "s/false \(op\)/true \1/gI" ${bn}-CMYK.ps > ${bn}-CMYK-op.ps +#gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${bn}-CMYK-op.pdf ./forceblack.ps ${bn}-CMYK-op.ps +gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK-op.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt ${bn}-CMYK-op.ps +#rm ${bn}-CMYK.pdf +rm ${bn}-CMYK.ps diff --git a/command-line/tools/rgb2cmyk.sh b/command-line/tools/rgb2cmyk.sh index 5fa9110..9765b97 100755 --- a/command-line/tools/rgb2cmyk.sh +++ b/command-line/tools/rgb2cmyk.sh @@ -1,30 +1,14 @@ #! /bin/bash # CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS -# OVERPRINT FEATURE IS AVAILABLE WITH AN OPTION # USAGE: # ./rgb2cmyk.sh input.pdf -# ./rgb2cmyk.sh input.pdf overprint # OUTPUT: # input-cmyk.pdf -# input-cmyk-op.pdf (in case of overprint) bn=$(basename $1 ".pdf") -op=${2:-knockout} gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1 -if [ $op == overprint ] - then - pdftops -level2sep ${bn}-CMYK.pdf - sed -e "s/false \(op\)/true \1/gI" ${bn}-CMYK.ps > ${bn}-CMYK-op.ps - #gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${bn}-CMYK-op.pdf ./forceblack.ps ${bn}-CMYK-op.ps - gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK-op.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt ${bn}-CMYK-op.ps - rm ${bn}-CMYK.pdf - rm ${bn}-CMYK.ps -fi - - - diff --git a/command-line/tools/separatecolors.sh b/command-line/tools/separatecolors.sh new file mode 100644 index 0000000..e157516 --- /dev/null +++ b/command-line/tools/separatecolors.sh @@ -0,0 +1,8 @@ +# From: https://stackoverflow.com/questions/30518547/cmyk-overprinting-and-knockout-in-ghostscript + +bn=$(basename $1 ".pdf") + +gs -dBATCH -dNOPAUSE -dSAFER \ + -sDEVICE=tiffsep \ + -sOutputFile=$bn.tif \ + $1 diff --git a/command-line/update.py b/command-line/update.py index 32ea1eb..c873950 100644 --- a/command-line/update.py +++ b/command-line/update.py @@ -234,8 +234,8 @@ def tweaking(html): # print(match) # html = html.replace(match, f'{ match }') - html = html.replace('.png', '.jpg') # Using only jpg version of the images in the BW version, June 2022 - html = html.replace('.gif', '.jpg') # Using only jpg version of the images in the BW version, June 2022 + # html = html.replace('.png', '.jpg') # Using only jpg version of the images in the BW version, June 2022 + # html = html.replace('.gif', '.jpg') # Using only jpg version of the images in the BW version, June 2022 html = html.replace('Topology-typography-1A.jpg', 'Topology-typography-1A.png') # Using png's for Spec, Aug 2022 html = html.replace('Topology-typography-1B.jpg', 'Topology-typography-1B.png') # Using png's for Spec, Aug 2022 html = html.replace('Topology-typography-2A.jpg', 'Topology-typography-2A.png') # Using png's for Spec, Aug 2022 @@ -244,8 +244,10 @@ def tweaking(html): html = html.replace('sky is black
and the ground is yellow.

', 'sky is black
and the ground is yellow.
') # Aug 2022 html = html.replace('
', '
') # Aug 2022 - html = html.replace('''

3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimization, normalization and hegemonic world order. The legacies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of contemporary hyper-computation. -

This book brings together diverse materials from an ongoing transfeminist conversation between artists, software developers and theorists working with
techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''', '''

3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimiza-
tion, normalization and hegemonic world order. The lega-
cies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension
between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of
contemporary hyper-computation. + html = html.replace( + '''

3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimization, normalization and hegemonic world order. The legacies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of contemporary hyper-computation. +

This book brings together diverse materials from an ongoing transfeminist conversation between artists, software developers and theorists working with techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''', + '''

3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimiza-
tion, normalization and hegemonic world order. The lega-
cies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension
between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of
contemporary hyper-computation.

This book brings together diverse materials from an ongoing transfeminist conversation between artists, software developers and theorists working with
techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''') # Aug 2022 return html