Saltar al contenido principal
Receta número 24

Recetario · Capítulo 10 · Salida e integración

PDF listo para imprenta: sangrado, marcas de corte y PDF/X

Un folleto de exposición con 3 mm de sangrado y marcas de corte, exportado a PDF/X-4 sobre FOGRA51 con másteres de impresión y un preflight limpio.

En esta página
Salida
Canvas · PDF
Postext
Probada con Postext 1.65.0
Requiere ≥ 1.25.0 · postext-pdf ≥ 1.25.0
Licencia
Actualizada el 10 oct 2026
Código MIT · Texto CC BY 4.0
  • Formato 170 × 227 mm
  • 1 columna
  • Karla 9,6/13,6
  • Space Grotesk
  • Space Mono
  • 4 páginas
  • Nivel
  • Postext 1.57.1
  • Compuesto en 51 ms
  • 274 líneas de código

En pocas palabras

Una hoja de sala para una exposición de mapas, lista para la imprenta. Enseña a añadir un margen extra más allá del borde y marcas de corte, y a guardar un PDF en los colores que usan las imprentas.

Lo que vas a componer

La hoja de sala de Cartografías imaginarias, una exposición inventada de mapas de lugares imaginarios, tal como se manda a la imprenta. Cada página, de 170 × 227 mm, va en una hoja 22 mm mayor con el sangrado y las marcas de corte. En la cubierta, una ruta naranja cruza un archipiélago en verdes escalonados y sale del corte hacia el sangrado. Dentro, cuatro salas en Karla en bandera se abren bajo antetítulos con una parada de la ruta, y un uñero naranja lleva el folio en el corte exterior; la contracubierta pone el plano sobre una banda de relieve. El código exporta el archivo de imprenta, un PDF/X-4 separado para FOGRA51 (la condición PSO Coated v3 del estucado de 150 g) con fuentes, marcadores y etiquetas de página, y una prueba en grises, y pasa el preflight sobre la maquetación antes de ofrecerlos. En el archivo de imprenta, mapas y plano salen de másteres con tintas elegidas a mano, y el texto, el uñero y las paradas usan esas mismas tintas gracias a una paleta definida en CMYK.

Esta receta responde a

  • ¿Cómo hago un PDF listo para imprenta con sangrado, marcas de corte, marcadores, etiquetas de página y espacio de color?
  • ¿Cómo exporto un PDF de verdad en el navegador, con las fuentes incrustadas?
  • ¿Cómo añado una marca de agua, un fondo de color o una imagen decorativa en todas las páginas?

La respuesta corta

script.js · líneas 46–76en el código completo
const BLEED = 3; // mm of artwork past the trim: the cover, the tab and the back band reach it
// Hook-up: config().page.cutLines. A mark starts markOffset outside the trim (3 mm by default)
// and never inside the bleed, and runs 5 mm (markLength). Each page grows by doc.trimOffset
// a side, bleed + offset + mark: 11 mm here.
const cutLines = { enabled: true, bleed: mm(BLEED) };

// Hook-up: config().print. PDF/X-4 for the press on FOGRA51 (PSO Coated v3, the leaflet's
// 150 g coated matte): every colour separated through the profile (the authored ones as
// written), 100 % K text overprinting, the output intent, TrimBox and BleedBox on each page.
// The 7.5 pt bold labels in forest hold in four inks on coated stock: the small-text check
// starts at 7 pt instead of 9.
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51', preflight: { smallTextSize: pt(7) } };
// Where the profiles are fetched from: postext.dev serves postext's icc/ folder at /icc/ (any
// copy of it works, and so does the npm CDN's postext/icc/).
const PROFILES = 'https://postext.dev/icc/';

// `masters` holds print-master bytes by fileId (section 2 writes them). The proof is an
// ordinary greyscale PDF: no PDF/X, which would force CMYK.
function pressPdf(doc, kind, masters) {
  const press = kind === 'press';
  return renderToPdf(doc, {
    fontProvider: fontsourceProvider, // Fontsource's files; TrueType faces are subset
    // The press file takes config().print, its profile fetched from PROFILES
    // (outputProfile: the .icc bytes, to hand it over yourself).
    profileBaseUrl: PROFILES,
    ...(press ? {} : { print: { standard: 'none' }, colorSpace: 'grayscale' }),
    // renderToPdf asks for a drawing's master (svg.pdfFileId) first, then for its SVG. The
    // proof answers the SVG only, which its grey conversion can reach; a master stays in CMYK.
    resourceBytes: (fileId) => (press && masters.get(fileId)) || imageBytes(fileId),
  }); // bookmarks (from the headings) and /PageLabels (from the folios) come by default
}

Ingredientes

Tipografía
Karla, Space Grotesk, Space Mono (SIL OFL 1.1)
Recursos
Ninguno: todas las imágenes se dibujan en código

Elaboración

#1 · Colores de pantalla elegidos por su plancha

script.js · líneas 19–42en el código completo
const palette = {
  ink: '#161616', // text: a neutral grey prints on the black plate alone (K95 on FOGRA51)
  muted: '#666666', // the running heads, on black alone for the same reason (K66)
  forest: '#0b3d2e', // the sea, the kickers, the back band
  signal: '#ff6626', // route, waypoints, tab
  sage: '#9fb8a8', // high ground; small type on forest
  paper: '#f4f1ea', // type on forest: reversed out, it prints no ink at all
};
// The colours authored in CMYK (%), the same builds as the print masters (section 2), so the
// type, the tab and the drawings share their inks. Without them the profile would separate
// the forest as C90 M43 Y71 K62 and the orange as C0 M70 Y90 K0, a shade off the route.
const AUTHORED = { forest: [100, 45, 80, 55], signal: [0, 60, 85, 0], sage: [40, 20, 35, 0],
  paper: [0, 0, 0, 0] };
const cmyk = ([c, m, y, k]) => ({ c, m, y, k });
const value = (id) => (AUTHORED[id]
  ? { hex: palette[id], model: 'cmyk', cmyk: cmyk(AUTHORED[id]) }
  : { hex: palette[id], model: 'hex' });
// col(id): a palette-linked colour: the hex for the screen and, where authored, its build.
const col = (id) => ({ ...value(id), paletteId: id });
const colorPalette = [
  ...Object.keys(palette).map((id) => ({ id, name: id, value: value(id) })),
  // The engine's defaults link to 'main-color': point it at the forest, so nothing prints blue.
  { id: 'main-color', name: 'forest (defaults)', value: { hex: palette.forest, model: 'hex' } },
];

Con print: { standard: 'pdfx4', outputProfile: 'fogra51' } en la configuración, cada color se separa con el perfil FOGRA51 que trae postext. Los grises neutros se imprimen solo con la plancha del negro, con el K elegido para que el tono no cambie: #161616 queda en K95 y el #666666 de las cabeceras en K66, y el texto al 100 % de K sobreimprime. El perfil imprimiría el verde como C90 M43 Y71 K62 y el naranja como C0 M70 Y90 K0, un matiz distinto del de la ruta de los másteres (paso 5), así que esos dos, el verde salvia y el color del papel se definen en CMYK: ColorValue.cmyk guarda la mezcla, el hexadecimal se queda para la pantalla y todo uso vinculado a la paleta imprime la mezcla tal como está escrita. El color del papel es C0 M0 Y0 K0: el texto calado sobre el verde no lleva tinta, y ninguna plancha puede desplazarlo.

#2 · Un uñero que sobrevive a la guillotina

script.js · líneas 86–107en el código completo
const TAB = { w: 10, h: 24 }; // the tab as it will be trimmed, mm; its foot is level with the text
const tab = (parity) => {
  const edge = parity === 'even' ? 'bottom-left' : 'bottom-right'; // the fore-edge
  const from = (to, y) => ({ anchor: { to, edge }, offset: { y: mm(y) } });
  return [
    // The box hangs from the bleed frame and BLEED of its width is trimmed off, so a cut that
    // lands a millimetre outside the trim still leaves orange at the edge.
    { kind: 'box', id: `tab-${parity}`, style: { backgroundColor: col('signal') },
      placement: { ...from('bleed', -(FOOT + BLEED)), size: { width: mm(TAB.w + BLEED),
        height: mm(TAB.h) } } },
    // The folio hangs from the trim frame ('page'), so it centres on the part left after the cut.
    { kind: 'text', id: `folio-${parity}`, content: '{pageNumber}', ...label, align: 'center',
      fontSize: pt(11), letterSpacing: pt(0), color: col('ink'),
      placement: { ...from('page', -FOOT), size: { width: mm(TAB.w), height: mm(TAB.h) } } },
  ].map((element) => ({ ...element, parity, pages: 'body' })); // never on the covers
};
const head = (parity, content) => ({ kind: 'text', id: `head-${parity}`, content, ...label,
  color: col('muted'), parity, pages: 'body',
  placement: { anchor: { to: 'container', edge: parity === 'even' ? 'top-left' : 'top-right' },
    offset: { y: mm(11) } } });
const header = { elements: [head('even', '{title}'), head('odd', '{subtitle}')] };
const footer = { elements: [...tab('even'), ...tab('odd')] };

La caja del uñero cuelga del marco del sangrado y mide BLEED más que el uñero ya cortado, así que un corte desviado un milímetro hacia fuera sigue dejando naranja en el borde; el folio, en cambio, cuelga del marco de la página, que es el formato cortado, y se centra en los 10 mm que quedan. parity elige las páginas en las que aparece cada elemento, y edge cambia con ella para ir al corte exterior; pages: 'body' deja el uñero y las cabeceras ({title} y {subtitle}, del frontmatter) fuera de las dos cubiertas, que cuentan como aperturas porque empiezan con un título que ocupa la página o salta a una nueva. Cualquier elemento de la cabecera o del pie de página se repite de la misma forma, así que una image con parity y pages pone una marca de agua o una imagen decorativa en todas las páginas; las zonas de diseño se pintan encima del texto, y un fondo de color bajo el texto se fija en page.backgroundColor.

#3 · La ilustración hasta el sangrado, el texto dentro del corte

script.js · líneas 124–170en el código completo
const BAND = 44; // mm from the trim foot to the top of the back band
const onForest = { color: col('paper'), align: 'left', overflow: 'wrap' };
const art = (resourceId, edge) => ({ kind: 'image', id: resourceId, resourceId,
  placement: { anchor: { to: 'bleed', edge }, size: { width: 'fill' } } }); // height: its ratio
// The map is as tall as the sheet and the cover reserves down to its foot, so the lead
// starts on page 2. span: 'page' makes the cover an opener, so furniture set to
// pages: 'body' skips it.
const cover = { id: 'cover', numbered: false, span: 'page', advancedDesign: { enabled: true,
  slot: { elements: [ // paint order: the map first, the type on top
    art('cubierta', 'top-left'),
    { kind: 'text', id: 'kicker', content: '{attr.kicker}', ...label, color: col('sage'),
      placement: { anchor: { to: 'container', edge: 'top-left' }, offset: { y: mm(6) } } },
    { kind: 'text', id: 'title', content: '{titleText}', fontFamily: 'Space Grotesk',
      fontWeight: 700, fontSize: pt(50), lineHeight: 0.98, ...onForest,
      placement: { anchor: { to: '#kicker', edge: 'below' }, offset: { y: mm(4) },
        size: { width: mm(132) } } },
    { kind: 'text', id: 'subtitle', content: '{subtitle}', fontFamily: 'Karla', fontSize: pt(13),
      ...onForest, placement: { anchor: { to: '#title', edge: 'below' }, offset: { y: mm(5) } } },
  ] } },
  footer: { elements: [ // the cover's own foot: dates and place, over open sea
    { kind: 'text', id: 'dates', content: '{attr.fechas}', ...label, color: col('paper'),
      placement: { anchor: { to: 'container', edge: 'bottom-left' }, offset: { y: mm(-15) } } },
    { kind: 'text', id: 'place', content: '{attr.lugar}', ...label, color: col('sage'),
      placement: { anchor: { to: '#dates', edge: 'below' }, offset: { y: mm(1.6) } } },
  ] } };
const back = { id: 'back', numbered: false, breakBefore: { enabled: true, parity: 'any' },
  advancedDesign: room('{attr.kicker}'),
  margins: { bottom: mm(BAND + 8) }, // the text stops 8 mm above the band
  footer: { elements: [
    art('banda', 'bottom-left'),
    { kind: 'text', id: 'venue', content: '{attr.lugar}', fontFamily: 'Space Grotesk',
      fontWeight: 700, fontSize: pt(20), ...onForest, // on the band, level with the text edge
      placement: { anchor: { to: '#banda', edge: 'align-top' }, offset: { x: mm(BLEED + OUTER),
        y: mm(6) } } },
    { kind: 'text', id: 'address', content: '{attr.direccion}', fontFamily: 'Karla',
      fontSize: pt(10), ...onForest,
      placement: { anchor: { to: '#venue', edge: 'below' }, offset: { y: mm(1.5) } } },
    { kind: 'text', id: 'when', content: '{attr.fechas}', ...label, color: col('sage'),
      placement: { anchor: { to: '#address', edge: 'below' }, offset: { y: mm(4) } } },
    { kind: 'text', id: 'colophon', content: '{attr.colofon}', ...label, fontWeight: 400,
      // 6.3 pt in sage would be three inks on a four-ink band: reversed to paper, it prints
      // no ink and no plate can shift it (the preflight's small-text check).
      fontSize: pt(6.3), letterSpacing: pt(0), textTransform: 'none', lineHeight: 1.4,
      color: col('paper'), overflow: 'wrap',
      placement: { anchor: { to: 'page', edge: 'bottom-left' }, offset: { x: mm(OUTER),
        y: mm(-6) }, size: { width: mm(78) } } }, // 57 monospaced characters a line
  ] } };

cutLines añade a cada lado de la página el sangrado, la separación de la marca y la marca de 5 mm, que aquí suman 11 mm. La separación es de 3 mm por defecto, lo mismo que este sangrado, así que las marcas empiezan en el borde del sangrado y van hacia fuera; con un sangrado mayor seguirían empezando en su borde, nunca dentro. Un elemento de imagen anclado al sangrado con width: 'fill' toma el ancho de ese marco y conserva su proporción: el mapa de la cubierta está dibujado a 176 × 233 mm, el formato más 3 mm por lado, así que llega hasta el borde del sangrado, donde empiezan las marcas, mientras el texto cuelga de la caja de texto, bien dentro del corte. La contracubierta es un estilo de encabezado cuyo pie de página sustituye al del documento, con una banda del mismo generador anclada al pie del sangrado y un margen inferior que detiene el texto 8 mm por encima.

#4 · Títulos que se convierten en marcadores

script.js · líneas 190–201en el código completo
  headings: {
    // A designed heading keeps its own text, hidden, for the bookmarks and the tags. Set it in
    // a face the pages already load, or the PDF embeds Open Sans for that text alone.
    fontFamily: 'Space Grotesk',
    levels: [
      // Rooms follow on: the H1's page break is off. The back cover breaks through its style,
      // and the front one fills its page. The template numbers kicker and bookmark: "Sala 1
      // Una isla en ninguna parte".
      { level: 1, numberingTemplate: 'Sala {1}', breakBefore: { enabled: false },
        marginTop: pt(LEAD), advancedDesign: room('{number} · {attr.fecha}') },
    ],
  },

renderToPdf construye los marcadores a partir de los títulos, así que cada sala es un encabezado de primer nivel que sigue al anterior sin salto de página, y numberingTemplate da al antetítulo su {number} y al marcador su prefijo: el PDF lista la cubierta, de «Sala 1 Una isla en ninguna parte» a «Sala 4 La isla del tesoro», y la información práctica. Un título con diseño oculta su propio texto, pero lo conserva para los marcadores y las etiquetas de accesibilidad; sin fontFamily, ese texto oculto va en Open Sans 700, una fuente que las páginas cargarían y el PDF incrustaría solo para él. Las etiquetas de página siguen page.pageNumbering, que aquí conserva su valor por defecto, decimal desde 1, de modo que la página 3 del visor es la que lleva un 3 en el uñero.

#5 · Másteres de impresión con tintas exactas

script.js · líneas 394–426en el código completo
// C, M, Y, K in %, one build per colour of the drawings, matched to the screen colours on a
// proof. The palette authors forest, signal, sage and paper with these same builds, so the
// route matches the tab and the kickers match the sea.
const INKS = { forest: [100, 45, 80, 55], shallows: [100, 50, 85, 40], coast: [90, 50, 85, 20],
  lowland: [80, 40, 75, 5], upland: [50, 15, 45, 20], sage: [40, 20, 35, 0],
  summit: [10, 5, 10, 0], tint: [5, 0, 5, 5], signal: [0, 60, 85, 0], paper: [0, 0, 0, 0] };
function pdfPage(w, h, shapes) { // w, h in mm; the content stream flips y to match the SVG
  const s = 72 / 25.4; // pt per mm
  const ink = (id, op) => `${INKS[id].map((v) => v / 100).join(' ')} ${op}`;
  const ops = (d) => d.replace(/([MLCZ])([^MLCZ]*)/g,
    (_, c, v) => `${v.trim()} ${{ M: 'm', L: 'l', C: 'c', Z: 'h' }[c]} `.trimStart());
  const body = shapes.map(({ d, fill, stroke, width, dash }) => [
    'q', fill && ink(fill, 'k'), stroke && ink(stroke, 'K'), stroke && `${width} w 1 J 1 j`,
    dash && `[${dash.join(' ')}] 0 d`, ops(d), fill ? 'f' : 'S', 'Q',
  ].filter(Boolean).join(' ')).join('\n');
  const stream = `${s} 0 0 ${-s} 0 ${h * s} cm\n${body}`;
  const objects = ['<< /Type /Catalog /Pages 2 0 R >>', '<< /Type /Pages /Kids [3 0 R] /Count 1 >>',
    `<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${n(w * s)} ${n(h * s)}] /Contents 4 0 R >>`,
    `<< /Length ${stream.length} >>\nstream\n${stream}\nendstream`];
  let pdf = '%PDF-1.4\n';
  const offsets = objects.map((object, i) => {
    const offset = pdf.length;
    pdf += `${i + 1} 0 obj\n${object}\nendobj\n`;
    return offset;
  });
  const xref = pdf.length;
  pdf += `xref\n0 ${objects.length + 1}\n0000000000 65535 f \n`
    + offsets.map((o) => `${String(o).padStart(10, '0')} 00000 n \n`).join('')
    + `trailer\n<< /Size ${objects.length + 1} /Root 1 0 R >>\nstartxref\n${xref}\n%%EOF\n`;
  return new TextEncoder().encode(pdf); // ASCII only, so string length = byte length
}
const masters = new Map(Object.entries(DRAWINGS) // by fileId: cubierta.pdf, banda.pdf, plano.pdf
  .map(([id, [size, shapes]]) => [`${id}.pdf`, pdfPage(...size, shapes)]));

Cada dibujo se define una sola vez, como trazados. La región del arte los convierte en el SVG que pinta el canvas, y esta región escribe los mismos trazados en un PDF CMYK de una página, con mezclas elegidas para que la prueba se parezca a la pantalla; así el mar va en C100 M45 Y80 K55, el verde de la paleta. Cada recurso indica su máster en svg.pdfFileId; renderToPdf pide ese identificador, pressPdf() (en la respuesta corta) responde con los bytes del máster, y postext-pdf incrusta esa página tal cual, en vectores y con las tintas del máster. Lo hace con el plano, que es una figura, y con el mapa de la cubierta y la banda de la contracubierta, que son imágenes de diseño. La prueba en escala de grises recibe los SVG, porque un máster incrustado nunca se convierte y seguiría en color.

La receta completa

Sandbox
// ═══ Postext Cookbook · Nº 024 · Print-ready PDF: bleed, crop marks and CMYK ═══════════
// https://postext.dev/en/cookbook/print-ready-pdf
// Code: MIT · Text: original (CC BY 4.0) · Maps: generated in code (CC BY 4.0)
// Fonts: Karla, Space Grotesk, Space Mono (SIL OFL 1.1) · Needs postext ≥ 1.25.0
// An exhibition leaflet set up for the press: bleed and crop marks on every page, and a
// PDF/X-4 file separated for FOGRA51 that embeds its fonts and takes the maps and the floor
// plan from print masters, checked by the preflight before it is offered.
import {
  buildDocumentWithFonts, renderPageToCanvas, registerResourceImage, defaultResourceTypes,
  preflightDocument, loadOutputProfile, outputTransform,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';

const LANG = 'es'; // @lang: the language of the sample document (this recipe is Spanish only)
const RECIPE = 'print-ready-pdf';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: screen colours, and for four of them the inks the press prints them in
const palette = {
  ink: '#161616', // text: a neutral grey prints on the black plate alone (K95 on FOGRA51)
  muted: '#666666', // the running heads, on black alone for the same reason (K66)
  forest: '#0b3d2e', // the sea, the kickers, the back band
  signal: '#ff6626', // route, waypoints, tab
  sage: '#9fb8a8', // high ground; small type on forest
  paper: '#f4f1ea', // type on forest: reversed out, it prints no ink at all
};
// The colours authored in CMYK (%), the same builds as the print masters (section 2), so the
// type, the tab and the drawings share their inks. Without them the profile would separate
// the forest as C90 M43 Y71 K62 and the orange as C0 M70 Y90 K0, a shade off the route.
const AUTHORED = { forest: [100, 45, 80, 55], signal: [0, 60, 85, 0], sage: [40, 20, 35, 0],
  paper: [0, 0, 0, 0] };
const cmyk = ([c, m, y, k]) => ({ c, m, y, k });
const value = (id) => (AUTHORED[id]
  ? { hex: palette[id], model: 'cmyk', cmyk: cmyk(AUTHORED[id]) }
  : { hex: palette[id], model: 'hex' });
// col(id): a palette-linked colour: the hex for the screen and, where authored, its build.
const col = (id) => ({ ...value(id), paletteId: id });
const colorPalette = [
  ...Object.keys(palette).map((id) => ({ id, name: id, value: value(id) })),
  // The engine's defaults link to 'main-color': point it at the forest, so nothing prints blue.
  { id: 'main-color', name: 'forest (defaults)', value: { hex: palette.forest, model: 'hex' } },
];
// #endregion

// #region answer: bleed and crop marks on every page; a CMYK PDF that swaps in print masters
const BLEED = 3; // mm of artwork past the trim: the cover, the tab and the back band reach it
// Hook-up: config().page.cutLines. A mark starts markOffset outside the trim (3 mm by default)
// and never inside the bleed, and runs 5 mm (markLength). Each page grows by doc.trimOffset

El script.js compuesto funciona tal cual: pégalo como script de módulo en cualquier página o abre la receta en CodePen. Carpeta de la receta en GitHub ↗ (se abre en una nueva pestaña)

Variantes

#Pide 5 mm de sangrado

El arte, el uñero y la escala gráfica se miden desde BLEED, y las marcas de corte empiezan en el borde del sangrado, así que para una imprenta que pida 5 mm basta este cambio, y cada hoja pasa a medir 196 × 253 mm.

-const BLEED = 3; // mm of artwork past the trim: the cover, the tab and the back band reach it
+const BLEED = 5; // mm of artwork past the trim: the cover, the tab and the back band reach it

#Imprime el arte desde sus SVG

Sin pdfFileId, el archivo de imprenta dibuja cada imagen desde su SVG, también en vectores y a través del perfil: el verde, definido en CMYK, conserva C100 M45 Y80 K55, pero los demás verdes de las islas toman las separaciones del perfil y no las elegidas a mano.

-  updatedAt: 0, ...extra, svg: { fileId: `${id}.svg`, pdfFileId: `${id}.pdf`,
+  updatedAt: 0, ...extra, svg: { fileId: `${id}.svg`,

Errores frecuentes

Error frecuente

Sin <marker> ni filtros en los SVG, o pasan a mapa de bits

Una figura SVG solo sigue siendo vectorial en el PDF sin <marker>, filtros ni máscaras; si no, pasa a mapa de bits, y los filtros muy anidados pueden dejarla en blanco en Chrome. Dibuja las puntas de flecha como trazados. Figuras y tablas como recursos →

Error frecuente

Los archivos de Fontsource cubren letras, no símbolos

El kit incrusta el archivo latin de Fontsource de cada fuente y, cuando el texto los usa, su archivo latin-ext para č, ł, † y su archivo greek para α, χ (en una familia que lo tenga: Lora y Gelasio no), en pantalla y en el PDF. Símbolos como →, ≈, ✓ y ★ no están en ninguno de esos archivos y faltan en el PDF: dibújalos, escríbelos como matemáticas o elige una fuente cuyos archivos los tengan. Fuentes incrustadas en el PDF →

  • Una norma PDF/X escribe siempre CMYK, diga lo que diga colorSpace, así que la prueba en grises sustituye print por { standard: 'none' } junto a colorSpace: 'grayscale'.
  • Un PDF/X no se genera sin su perfil de salida. renderToPdf descarga fogra51.icc de profileBaseUrl (aquí, la carpeta /icc/ de postext.dev); para servirlo tú, pasa los bytes del archivo como outputProfile.
  • El preflight avisa del texto de menos de 9 pt que lleva más de una tinta. Las etiquetas de 7,5 pt en negrita y en verde aguantan bien cuatro tintas sobre papel estucado, así que print.preflight.smallTextSize es 7 pt; el colofón de 6,3 pt, que en verde salvia serían tres tintas sobre una banda de cuatro, va calado en el color del papel.
  • Un archivo PDF/X no lleva anotaciones de enlace, porque un archivo para imprenta no puede tenerlas dentro de su BleedBox; los marcadores se mantienen.
  • Una vez generado, cada botón se convierte en un enlace «Open the PDF ↗» y otro de descarga, y solo los de descarga llevan el nombre de su archivo.

Créditos

Texto
Texto original, CC BY 4.0
Fuentes
Karla (SIL OFL 1.1) · Space Grotesk (SIL OFL 1.1) · Space Mono (SIL OFL 1.1)
SandboxPDF