In breve
Una rivista di fotografia con un rivestimento vellutato su ogni pagina e uno lucido solo sulle foto e sul titolo. Le vernici non hanno colore; la vista 3D e una vista di prova mostrano dove si trovano.
Che cosa comporrai
Il numero 14 di Long Light, una rivista di fotografia inventata: sei pagine da 210 × 280 mm, in brossura fresata. Ogni pagina ha una vernice soft touch, la finitura vellutata che spegne il foglio e gli toglie la lucentezza. Sulle cinque fotografie e sulla testata lo stampatore stende una seconda vernice, lucida, così le immagini prendono la luce mentre la pagina intorno resta ferma. Nessuna delle due vernici ha un colore: la tela mostra le pagine come vengono stampate, e tre viste della copertina accanto a Folio mostrano le lastre e il riflesso. Folio apre la rivista su un tavolo di marmo in luce da studio, dove il lucido brilla quando si gira un foglio.
Questa ricetta risponde a
- Come metto una vernice soft touch su ogni pagina e una lucida serigrafica solo sulle foto?
La risposta breve
// A varnish is a spot ink: its own plate in the PDF, clear on screen. Soft touch goes over
// the whole sheet, the gloss over the pictures and the masthead. Both overprint by default,
// so neither cuts a hole in the colours under it. Each has a hex of its own all the same:
// a print render tells inks apart by their hex.
const varnish = (hex, name, sheen) => ({ hex, model: 'spot',
spot: { name, cmyk: { c: 0, m: 0, y: 0, k: 0 }, finish: { kind: 'varnish', sheen } } });
const palette = {
velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
gloss: varnish('#e4f0ee', 'Spot UV gloss', 'gloss'),
// The colours that print: a near-black, a slate for the bands, the paper.
ink: { hex: '#1d1d22', model: 'cmyk', cmyk: { c: 30, m: 20, y: 10, k: 95 } },
slate: { hex: '#262b3a', model: 'cmyk', cmyk: { c: 80, m: 65, y: 35, k: 60 } },
muted: { hex: '#6c6a70', model: 'cmyk', cmyk: { c: 0, m: 5, y: 0, k: 65 } },
paper: { hex: '#ffffff', model: 'hex' },
};
// The ink table names both varnishes as the order to the printer will.
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51', convertImages: false, inks: [
{ name: 'Soft-touch varnish', finish: { kind: 'varnish', sheen: 'softTouch' } },
{ name: 'Spot UV gloss', finish: { kind: 'varnish', sheen: 'gloss' } }] };
Ingredienti
- Funzionalità
- Inchiostri specialiTinte piatte e tabella degli inchiostriPDF in CMYK e in scala di grigiVisualizzatore di libri in 3D (Folio)Carta, rilegatura, scrivania e luce (Folio)Tavolozza di colori semanticaCopertine, frontespizi e colophonStili di titoloAperture progettateTesto, filetti e riquadri nei progetti di paginaImmagini nei progetti di paginaTestatine e folioEsportazione in PDFPagine su un canvas
- Usa anche
- Attributi dei titoliFascia di capitolo a tutta larghezzaColore della cartaFont incorporati nel PDFTipi di risorsa personalizzatiFigure e tabelle come risorseTestatine per sezioneCapitoli non numerati
- Tipo
- Bodoni Moda, Source Serif 4, Source Sans 3 (SIL OFL 1.1)
- Risorse
dusk-560.jpgfog-800.jpgnets-1100.jpgroad-1100.jpgsaltflat-800.jpg- A walker on a salt flat at dusk, on the cover (Generated With Diffusion Models, originale)
- A fisherman mending a net (Generated With Diffusion Models, originale)
- Pines in morning fog (Generated With Diffusion Models, originale)
- A desert road between mesas (Generated With Diffusion Models, originale)
- The salt flat at sunset, on the back cover (Generated With Diffusion Models, originale)
Preparazione
#1 · Ogni vernice è una tinta piatta con una finitura
Il codice è la risposta breve qui sopra. Una vernice è un colore piatto con la finitura varnish e una brillantezza: softTouch per il vellutato, gloss per la UV serigrafica (finiture). Il file PDF/X-4 mette ciascuna su una Separation propria, così lo stampatore riceve due lastre di vernice accanto alle quattro di quadricromia. A schermo una vernice non dipinge nulla; le serve comunque un hex proprio, perché un render di stampa distingue gli inchiostri dal loro hex. Una vernice è in sovrastampa per impostazione predefinita, quindi nessuna delle due fa risparmio nei colori che ha sotto.
#2 · Soft touch su ogni pagina
// The page's footer carries it, so every page has it. A varnish goes down last on press, and
// nothing painted after it cuts it away. The cover and the back keep it alone.
const velvet = { kind: 'box', id: 'velvet', style: { backgroundColor: col('velvet') },
placement: at('bleed', 'top-left', 0, 0, { width: 'fill', height: 'fill' }) };
Il soft touch è un solo riquadro nella vernice, da abbondanza ad abbondanza. Lo porta il piè di pagina, così ogni pagina lo riceve da un solo punto. In macchina la vernice va per ultima, sopra tutto, e nel PDF niente di ciò che la pagina dipinge dopo la risparmia: il riquadro potrebbe anche aprire l'intestazione, prima del testo e dei numeri di pagina, che resterebbero sotto di esso sulla lastra. La copertina e la quarta non hanno numeri di pagina, e il loro piè di pagina porta solo il riquadro.
#3 · Lucido sulle fotografie
// The gloss box comes after the picture, so it lies on top; being a varnish it paints
// nothing on the canvas, and in the PDF it overprints the picture on a plate of its own.
const glossed = (resourceId, placement, focus) => [
{ kind: 'image', id: 'photo', resourceId, fit: 'cover', placement, ...(focus && { focus }) },
{ kind: 'box', id: 'shine', style: { backgroundColor: col('gloss') }, placement },
];
Ogni fotografia è un'immagine con sopra un riquadro nella vernice lucida, della stessa misura. Il riquadro viene dopo, quindi sta sopra: sulla lastra è un rettangolo che copre l'immagine esattamente, ed è così che si disegna una lastra di UV serigrafica.
#4 · La testata composta due volte
const BAND = 222; // mm from the top of the bleed to the slate band
const masthead = (id, color) => text(id, '{titleText}', { fontFamily: DISPLAY, fontWeight: 700,
fontSize: pt(84), lineHeight: 0.9, align: 'center', color },
at('page', 'top-left', 0, 12, { width: mm(TRIM_W) }));
const cover = { id: 'cover', numbered: false, toc: false, span: 'page',
footer: { elements: [velvet] }, advancedDesign: { enabled: true, minHeight: mm(230),
slot: { elements: [
...glossed('saltflat', at('bleed', 'top-left', 0, 0, { width: 'fill',
height: mm(BAND + 3) }), { x: 0.5, y: 0.62 }),
{ kind: 'box', id: 'band', style: { backgroundColor: col('slate') },
placement: at('bleed', 'top-left', 0, BAND, { width: 'fill', height: mm(70) }) },
masthead('title', col('paper')), masthead('title-gloss', col('gloss')),
text('issue', '{attr.issue}', { ...label(8, col('paper')), align: 'center' },
at('page', 'top-left', 0, 46, { width: mm(TRIM_W) })),
text('lines', '{attr.lines}', { fontFamily: SERIF, fontSize: pt(12), lineHeight: 1.35,
color: col('paper') }, at('page', 'top-left', MARGIN.outer, BAND + 4,
{ width: mm(150) })),
] } } };
La testata è fatta di due elementi di testo nello stesso punto: uno in bianco carta, che si risparmia nella fotografia, e uno nella vernice lucida sopra. La versione lucida non dipinge nulla a schermo e dà alla lastra la forma delle lettere, così sulla copertina stampata il titolo brilla sopra un cielo che brilla anche lui.
#5 · Le viste delle finiture e Folio
// 'flat' paints the inks and leaves the varnish out; 'map' marks the special plates in false
// colour (varnish in cyan) over a faded page; 'sheen' sweeps a light across the page.
const views = document.createElement('section');
views.id = 'finish-views';
views.style.cssText = 'display: flex; gap: 16px; justify-content: center; padding: 16px';
const VIEWS = { flat: t({ en: 'As it prints', es: 'Como se imprime' }),
map: t({ en: 'The varnish plates', es: 'Las planchas de barniz' }),
sheen: t({ en: 'Under a raking light', es: 'Con luz rasante' }) };
for (const [finishes, name] of Object.entries(VIEWS)) {
const [figure, canvas, caption] = ['figure', 'canvas', 'figcaption']
.map((tag) => document.createElement(tag));
figure.style.margin = '0';
canvas.style.width = '260px';
canvas.setAttribute('role', 'img');
canvas.setAttribute('aria-label', `${t({ en: 'The cover', es: 'La cubierta' })}: ${name}`);
renderPageToCanvas(doc.pages[0], doc, canvas, { scale: 520 / doc.pages[0].width, finishes });
caption.textContent = name;
figure.append(canvas, caption);
views.append(figure);
}
document.getElementById('pages').before(views);
const folio = {
tilt: 26, yaw: -18,
paper: { type: 'coatedMatte', grammage: 150 },
binding: { type: 'paperback', cover: 'pages' },
surface: { type: 'marble' },
lighting: { environment: 'studio', intensity: 1.15 },
};
renderPageToCanvas accetta un'opzione finishes. 'flat' è il valore predefinito e mostra la pagina come viene stampata; 'map' sbiadisce la pagina e segna ogni lastra speciale in falsi colori, la vernice in ciano, il lucido più chiaro del soft touch; 'sheen' fa passare una luce sulla pagina. Folio legge la stessa maschera delle finiture: il lucido prende i riflessi, il soft touch li toglie.
La ricetta completa
// ═══ Postext Cookbook · Nº 192 · Spot gloss over a soft-touch magazine ═════════════════
// https://postext.dev/en/cookbook/spot-uv-photo-magazine
// Code: MIT · Text: original (CC BY 4.0) · Photographs: diffusion models
// Fonts: Bodoni Moda, Source Serif 4, Source Sans 3 (SIL OFL 1.1) · Needs postext ≥ 1.85.1
//
// A photography magazine whose pages are coated in a soft-touch varnish, with a gloss
// varnish laid over the photographs and the masthead only: the spot UV a printer sells as
// the contrast between a velvet page and a shining picture. Varnish puts no colour on the
// page, so the canvas shows the pages as they print and the finish views show the varnish.
import {
buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
import { createFolioFromDocument } from 'https://esm.sh/postext-folio';
const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'spot-uv-photo-magazine';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region answer: two varnishes, each a spot ink with a finish
// A varnish is a spot ink: its own plate in the PDF, clear on screen. Soft touch goes over
// the whole sheet, the gloss over the pictures and the masthead. Both overprint by default,
// so neither cuts a hole in the colours under it. Each has a hex of its own all the same:
// a print render tells inks apart by their hex.
const varnish = (hex, name, sheen) => ({ hex, model: 'spot',
spot: { name, cmyk: { c: 0, m: 0, y: 0, k: 0 }, finish: { kind: 'varnish', sheen } } });
const palette = {
velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
gloss: varnish('#e4f0ee', 'Spot UV gloss', 'gloss'),
// The colours that print: a near-black, a slate for the bands, the paper.
ink: { hex: '#1d1d22', model: 'cmyk', cmyk: { c: 30, m: 20, y: 10, k: 95 } },
slate: { hex: '#262b3a', model: 'cmyk', cmyk: { c: 80, m: 65, y: 35, k: 60 } },
muted: { hex: '#6c6a70', model: 'cmyk', cmyk: { c: 0, m: 5, y: 0, k: 65 } },
paper: { hex: '#ffffff', model: 'hex' },
};
// The ink table names both varnishes as the order to the printer will.
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51', convertImages: false, inks: [
{ name: 'Soft-touch varnish', finish: { kind: 'varnish', sheen: 'softTouch' } },
{ name: 'Spot UV gloss', finish: { kind: 'varnish', sheen: 'gloss' } }] };
// #endregion
const col = (id) => ({ ...palette[id], paletteId: id });
const colorPalette = [...Object.entries(palette).map(([id, value]) => ({ id, name: id, value })),
{ id: 'main-color', name: 'ink (defaults)', value: palette.ink }];
const [TRIM_W, TRIM_H] = [210, 280];
const MARGIN = { top: 18, bottom: 20, inner: 18, outer: 16 };
const LEAD = 13.6; // pt
const [DISPLAY, SERIF, SANS] = ['Bodoni Moda', 'Source Serif 4', 'Source Sans 3'];
Lo script.js composto funziona così com’è: incollalo nello script modulo di qualsiasi pagina, oppure apri la ricetta su CodePen. Cartella della ricetta su GitHub ↗ (si apre in una nuova scheda)
Varianti
#Opaco al posto del soft touch
Una semplice vernice opaca costa meno e dà lo stesso contrasto, un po' meno profondo.
- velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
+ velvet: varnish('#e9e4f0', 'Matte varnish', 'matte'),#Lucido solo sulla scritta
Lascia le foto opache e stendi il lucido solo sulla testata e sui titoli: componi i titoli due volte, come la testata, e togli i riquadri sopra le immagini.
Errori frequenti
- Una vernice con l'hex di un altro colore viene stampata come quel colore. Dai a ogni vernice un hex che nient'altro usa.
- Una vernice generale fermata al rifilo lascia una striscia scoperta sul bordo quando il foglio viene tagliato un po' storto. Portala fino all'abbondanza, come il riquadro qui.
- Il soft touch si vende spesso come plastificazione e non come vernice. Chiedi allo stampatore quale nome di lastra vuole e impostalo con
pdfNamenella tabella degli inchiostri.
Crediti
- Ricetta
- Ignacio Ferro
- Testo
- Testo originale, CC BY 4.0
- Immagini
- A walker on a salt flat at dusk, on the cover · Generated With Diffusion Models · originale
- A fisherman mending a net · Generated With Diffusion Models · originale
- Pines in morning fog · Generated With Diffusion Models · originale
- A desert road between mesas · Generated With Diffusion Models · originale
- The salt flat at sunset, on the back cover · Generated With Diffusion Models · originale
- Font
- Bodoni Moda (SIL OFL 1.1) · Source Serif 4 (SIL OFL 1.1) · Source Sans 3 (SIL OFL 1.1)
- Codice
- MIT, come Postext
Modifica questo testo ↗ (si apre in una nuova scheda)Cartella della ricetta su GitHub ↗ (si apre in una nuova scheda)


