Pular para o conteúdo principal
Receita número 192

Receitas · Capítulo 10 · Saída e integração

Verniz localizado brilhante numa revista soft touch

Dois vernizes como cores especiais: soft touch em todas as páginas e brilho sobre as fotos e o logotipo da capa, vistos no Folio e nas vistas de acabamento.

Nesta página
Saída
Canvas · PDF
Nível
Avançado
Postext
Testada com o Postext 1.86.0
Requer ≥ 1.85.1 · postext-pdf ≥ 1.85.1
Licença
Atualizada em 13 de nov. de 2026
Código MIT · Texto CC BY 4.0
  • Amostra em inglês: ainda sem edição em português
  • Refile 210 × 280 mm
  • 2 colunas, medianiz de 6 mm
  • Source Serif 4 9,8/13,6
  • Bodoni Moda
  • Source Sans 3
  • 6 páginas
  • Nível
  • Postext 1.86.0
  • Diagramado em 83 ms
  • 213 linhas de código

Em poucas palavras

Uma revista de fotografia com um acabamento aveludado em todas as páginas e outro brilhante só nas fotos e no título. Os vernizes não têm cor; a vista 3D e uma vista de prova mostram onde eles ficam.

O que você vai compor

A edição 14 de Long Light, uma revista de fotografia inventada: seis páginas de 210 × 280 mm, com lombada quadrada colada. Todas as páginas levam um verniz soft touch, o acabamento aveludado que apaga a folha e tira o brilho dela. Sobre as cinco fotografias e o logotipo da capa a gráfica aplica um segundo verniz, brilhante, para que as fotos peguem a luz enquanto a página em volta fica quieta. Nenhum dos vernizes tem cor: a tela mostra as páginas como são impressas, e três vistas da capa ao lado do Folio mostram as chapas e o brilho. O Folio abre a revista sobre uma mesa de mármore com luz de estúdio, onde o brilho reluz quando uma folha vira.

Esta receita responde a

  • Como aplico verniz soft touch em todas as páginas e verniz localizado brilhante só nas fotos?

A resposta curta

script.js · linhas 21–39no código completo
// 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' } }] };

Ingredientes

Tipografia
Bodoni Moda, Source Serif 4, Source Sans 3 (SIL OFL 1.1)
Materiais
  • dusk-560.jpg
  • fog-800.jpg
  • nets-1100.jpg
  • road-1100.jpg
  • saltflat-800.jpg
  • A walker on a salt flat at dusk, on the cover (Generated With Diffusion Models, original)
  • A fisherman mending a net (Generated With Diffusion Models, original)
  • Pines in morning fog (Generated With Diffusion Models, original)
  • A desert road between mesas (Generated With Diffusion Models, original)
  • The salt flat at sunset, on the back cover (Generated With Diffusion Models, original)

Preparo

#1 · Cada verniz é uma cor especial com acabamento

O código é a resposta curta lá em cima. Um verniz é uma cor especial com o acabamento varnish e um brilho: softTouch para o aveludado, gloss para o UV localizado (acabamentos). O arquivo PDF/X-4 põe cada um numa Separation própria, e a gráfica recebe duas chapas de verniz ao lado das quatro de quadricromia. Na tela um verniz não pinta nada; mesmo assim precisa de um hex próprio, porque uma renderização de impressão distingue as tintas pelo hex. Um verniz sobreimprime por padrão, então nenhum dos dois vaza as cores que estão embaixo.

#2 · Soft touch em todas as páginas

script.js · linhas 57–60no código completo
// 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' }) };

O soft touch é uma única caixa no verniz, de sangria a sangria. Quem a leva é o rodapé, então todas as páginas a recebem de um só lugar. Na impressora o verniz vai por último, por cima de tudo, e no PDF nada do que a página pinta depois o vaza: a caixa poderia muito bem abrir o cabeçalho, antes do texto e dos fólios, que ficariam embaixo dela na chapa. A capa e a quarta capa não têm fólio, e o rodapé delas leva só a caixa.

#3 · Brilho sobre as fotografias

script.js · linhas 64–69no código completo
// 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 },
];

Cada fotografia é uma imagem com uma caixa no verniz brilhante por cima, do mesmo tamanho. A caixa vem depois, então fica em cima: na chapa ela é um retângulo que cobre a imagem exatamente, que é como se desenha uma chapa de UV localizado.

#4 · O logotipo composto duas vezes

script.js · linhas 73–90no código completo
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) })),
    ] } } };

O logotipo da capa são dois elementos de texto no mesmo lugar: um em branco papel, vazado na fotografia, e outro no verniz brilhante por cima. A versão brilhante não pinta nada na tela e dá à chapa a forma das letras, então na capa impressa o título brilha sobre um céu que também brilha.

#5 · As vistas de acabamento e o Folio

script.js · linhas 239–259no código completo
// '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);
script.js · linhas 138–144no código completo
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 aceita a opção finishes. 'flat' é o padrão e mostra a página como ela é impressa; 'map' esmaece a página e marca cada chapa especial em cor falsa, o verniz em ciano, o brilhante mais claro que o soft touch; 'sheen' passa uma luz pela página. O Folio lê a mesma máscara de acabamentos: o brilhante pega os reflexos, o soft touch os tira.

A receita completa

Sandbox
// ═══ 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'];

O script.js montado funciona como está: cole-o como script de módulo em qualquer página ou abra a receita no CodePen. Pasta da receita no GitHub ↗ (abre em uma nova aba)

Variações

#Fosco no lugar do soft touch

Um verniz fosco comum custa menos e dá o mesmo contraste, um pouco menos profundo.

-  velvet: varnish('#e9e4f0', 'Soft-touch varnish', 'softTouch'),
+  velvet: varnish('#e9e4f0', 'Matte varnish', 'matte'),

#Brilho só nas letras

Deixe as fotos foscas e aplique o brilho só sobre o logotipo e os títulos: componha os títulos duas vezes, como o logotipo, e tire as caixas de cima das imagens.

Erros comuns

  • Um verniz com o hex de outra cor é impresso como essa cor. Dê a cada verniz um hex que nada mais use.
  • Um verniz geral que vai só até o corte deixa uma faixa sem verniz na borda quando a folha é cortada um pouco torta. Leve-o até a sangria, como a caixa daqui.
  • O soft touch costuma ser vendido como laminação, e não como verniz. Pergunte à gráfica qual nome de chapa ela quer e defina-o com pdfName na tabela de tintas.

Créditos

Texto
Texto original, CC BY 4.0
Imagens
  • A walker on a salt flat at dusk, on the cover · Generated With Diffusion Models · original
  • A fisherman mending a net · Generated With Diffusion Models · original
  • Pines in morning fog · Generated With Diffusion Models · original
  • A desert road between mesas · Generated With Diffusion Models · original
  • The salt flat at sunset, on the back cover · Generated With Diffusion Models · original
Fontes
Bodoni Moda (SIL OFL 1.1) · Source Serif 4 (SIL OFL 1.1) · Source Sans 3 (SIL OFL 1.1)
SandboxPDF