本文へスキップ
レシピ番号24

レシピ集 · 第10章 · 出力と組み込み

入稿用PDF:裁ち落とし、トンボ、PDF/X

3mmの塗り足しとトンボを付けた展覧会のリーフレットを、印刷用マスターとともにFOGRA51のPDF/X-4として書き出します。プリフライトの指摘はありません。

このページの内容
出力
Canvas · PDF
レベル
上級
Postext
Postext 1.65.0で検証済み
1.25.0以上が必要 · postext-pdf ≥ 1.25.0
ライセンス
2026年10月10日更新
コードMIT · 本文CC BY 4.0

1ページ(全4ページ)

  • スペイン語の見本:日本語版はまだありません
  • 仕上がり170 × 227 mm
  • 1段
  • Karla 9.6/13.6
  • Space Grotesk
  • Space Mono
  • 4ページ
  • レベル
  • Postext 1.57.1
  • 組版時間51 ms
  • コード274行

かんたんな説明

地図の展覧会のリーフレットを、印刷所にそのまま渡せる形にします。ページの端の外側に画像をはみ出させる余白と断裁の目印を付け、印刷機が使う色でPDFを保存する方法を示します。

できあがり

架空の土地の地図を集めた架空の展覧会『Cartografías imaginarias』の展示解説シートを、印刷所に渡す状態で組みます。このページはどの言語版でも見本はスペイン語です。170×227mmの各ページは、四辺とも11mm大きい紙に載り、そこに塗り足しとトンボが入ります。表紙では、オレンジの航路が段階的な緑の群島を横切り、仕上がり線を越えて塗り足しまで延びます。中面では、左そろえのKarlaで組んだ4つの展示室がウェイポイント形のキッカーの下で始まり、オレンジの爪がノンブルを小口の外へ運びます。裏表紙は起伏の帯の上に平面図を置きます。サンプルのコードは、FOGRA51(150gのコート紙に当たるPSO Coated v3の印刷条件)向けに分版した入稿用のPDF/X-4をフォント、しおり、ページラベル付きで書き出し、グレースケールの校正用PDFも書き出します。ファイルを渡す前に、レイアウトをプリフライトで確認します。入稿用ファイルでは、地図と平面図は手で選んだインキの印刷用マスターから取ります。文字、爪、ウェイポイントの輪も、CMYKで指定したパレットを通じて同じインキを使います。

このレシピが答える質問

  • 裁ち落とし、トンボ、しおり、ページラベル、色空間を備えた入稿用PDFを作るには?
  • フォントを埋め込んだ本物のPDFをブラウザーで書き出すには?
  • すべてのページに透かし、背景の色、装飾画像を加えるには?

手短な答え

script.js · 46〜76行コード全体で見る
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
}

材料

種類
Karla, Space Grotesk, Space Mono (SIL OFL 1.1)
素材
なし:画像はすべてコードで描画

作り方

#1 · 画面の色を版で選ぶ

script.js · 19〜42行コード全体で見る
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' } },
];

設定のprint: { standard: 'pdfx4', outputProfile: 'fogra51' }は、postextに同梱のFOGRA51プロファイルですべての色を分版します。無彩色のグレーは墨版だけで刷られ、Kの値は明度が合うように選ばれます。#161616はK95に、柱の#666666はK66になり、K 100%の文字はオーバープリントします。プロファイルに任せると、深緑はC90 M43 Y71 K62、オレンジはC0 M70 Y90 K0で刷られ、マスターの航路(手順5)とわずかに色がずれます。そこでこの2色に、セージと紙の色を加えた4色をCMYKで指定します。ColorValue.cmykが掛け合わせを指定し、16進値は画面用に残ります。パレットにリンクした箇所は、どこでも書いたとおりの掛け合わせで刷られます。紙の色はC0 M0 Y0 K0です。深緑から白抜きにした文字はインキを使わないので、どの版がずれても影響を受けません。

#2 · 断裁でずれても残る爪

script.js · 86〜107行コード全体で見る
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')] };

爪の箱は塗り足しの枠から下げ、仕上がりの爪よりBLEEDだけ幅を広げます。こうしておけば、断裁が仕上がり線から1mm外にずれても、端にオレンジが残ります。ノンブルはページの枠、つまり仕上がり線から下げ、残る10mmの中央に置きます。parityは各要素が出るページを選び、edgeはそれに合わせて変わって小口に届きます。pages: 'body'は爪と柱(フロントマターの{title}と{subtitle})を両方の表紙から外します。表紙はどちらもページ全幅の見出し、または改ページする見出しで始まるので、扉として数えられるからです。ヘッダーとフッターの要素はどれもこうして繰り返されるので、imageにparityとpagesを付ければ、透かしや装飾の画像を全ページに置けます。スロットは本文の上に描かれるので、本文の背後に敷く色はpage.backgroundColorに入れます。

#3 · 絵柄は裁ち落としまで、文字は仕上がりの内側に

script.js · 124〜170行コード全体で見る
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は、塗り足し、トンボのオフセット、5mmのトンボをページの各辺に足します。ここでは11mmです。オフセットは既定で3mm、ここの塗り足しと同じなので、トンボは塗り足しの縁から外へ向かって引かれます。塗り足しがそれより広い場合もトンボはその縁から始まり、塗り足しの内側には入りません。塗り足しに固定しwidth: 'fill'とした画像要素は、その枠の幅を取り、自分の縦横比を保ちます。表紙の地図は176×233mm、仕上がりに片側3mmを足した大きさで描かれるので、トンボが始まる塗り足しの縁まで届きます。文字は版面から下げるので、仕上がり線のかなり内側に収まります。裏表紙はフッターが文書のフッターを置き換える見出しスタイルです。同じ生成コードで作った帯を塗り足しの下端に固定し、地の余白で本文をその8mm上に止めます。

#4 · しおりになる見出し

script.js · 190〜201行コード全体で見る
  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は見出しからしおりを作ります。そこで各展示室を改ページなしで続くレベル1の見出しにし、numberingTemplateでキッカーに{number}を、しおりに接頭辞を与えます。PDFのしおりには、表紙、「Sala 1 Una isla en ninguna parte」から「Sala 4 La isla del tesoro」まで、そして来館案内が並びます。デザインした見出しは自分のテキストを隠しますが、しおりとタグのためにそれを保持します。fontFamilyがないと、その隠れたテキストはOpen Sans 700で組まれ、ページはそのためだけにこのフォントを読み込み、PDFはそれを埋め込みます。ページラベルは既定のままのpage.pageNumbering、つまり1からのアラビア数字に従うので、PDFビューアーの3ページは爪に3とあるページです。

#5 · 正確なインキで作る印刷用マスター

script.js · 394〜426行コード全体で見る
// 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)]));

各図版はパスとして一度だけ定義します。artの領域はそれをCanvasが描くSVGにし、この領域は同じパスを1ページのCMYKのPDFに書き込みます。掛け合わせは校正が画面と合うように選んであり、海はパレットの深緑と同じC100 M45 Y80 K55になります。各リソースはsvg.pdfFileIdでマスターを指定します。renderToPdfがそのidを問い合わせ、手短な答えのpressPdf()がマスターのバイト列を返します。postext-pdfはそのページを手を加えずに、マスター自身のインキのベクターとして埋め込みます。これは図である平面図にも、デザイン画像である表紙の地図と裏表紙の帯にも当てはまります。グレースケールの校正にはSVGのほうを渡します。埋め込んだマスターは変換されないので、カラーのまま残ってしまうからです。

レシピの全体

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

組み立てたscript.jsはそのまま動きます。任意のページのモジュールスクリプトに貼り付けるか、レシピをCodePenで開いてください。 GitHub上のレシピのフォルダー ↗ (新しいタブで開きます)

アレンジ

#5mmの裁ち落としにする

絵柄、爪、縮尺バーはBLEEDから寸法を取り、トンボは塗り足しの縁から始まります。5mmを求める印刷所に合わせるには、この変更だけで済み、各用紙は196×253mmになります。

-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

#絵柄をSVGから刷る

pdfFileIdがないと、入稿用ファイルは各図版をSVGから描きます。ベクターのままで、色はプロファイルを通ります。CMYKで指定した深緑はC100 M45 Y80 K55を保ちますが、島のほかの緑は手で選んだ掛け合わせではなく、プロファイルによる分版になります。

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

よくあるつまずき

つまずき

SVGの図に<marker>やフィルターを使わない(ラスターにフォールバックする)

SVGの図がPDFでベクターのまま残るのは、<marker>、フィルター、マスクを使っていない場合だけです。使っているとラスターにフォールバックし、深く入れ子にしたフィルターはChromeで図を真っ白にすることがあります。矢じりはパスで描いてください。 リソースとしての図と表 →

つまずき

Fontsourceのファイルは文字を収め、記号は収めない

キットは各書体のFontsourceのlatinファイルを埋め込み、本文にč、ł、†があればlatin-extファイルを、α、χがあればgreekファイル(それを持つファミリーのみ。LoraとGelasioにはない)を、画面でもPDFでも加えます。→、≈、✓、★などの記号はどのファイルにもなく、PDFでは欠けます。図として描くか、数式で書くか、それを収めたファイルを持つ書体を選んでください。 PDFに埋め込むフォント →

  • PDF/Xの規格は、colorSpaceの値にかかわらず常にCMYKで書き出します。そのためグレースケールの校正では、colorSpace: 'grayscale'と並べてprintを{ standard: 'none' }で上書きします。
  • PDF/Xの描画は、出力プロファイルがないと失敗します。renderToPdfはfogra51.iccをprofileBaseUrl(ここではpostext.devの/icc/)から取得します。自分で用意するなら、ファイルのバイト列をoutputProfileに渡します。
  • プリフライトは、2色以上のインキで刷る9pt未満の文字を指摘します。深緑の7.5ptの太字ラベルはコート紙なら4色でも崩れないので、print.preflight.smallTextSizeを7ptにしています。6.3ptの奥付は、セージにすると4色の帯の上で3色の掛け合わせになるので、代わりに紙の色で白抜きにします。
  • PDF/Xのファイルにはリンク注釈が入りません。印刷用のファイルは塗り足しを含む枠の内側に注釈を入れられないからです。しおりは残ります。
  • 生成が終わると、各ボタンは「Open the PDF ↗」のリンクとダウンロードのリンクに変わります。ファイル名が付くのはダウンロードのリンクだけです。

クレジット

レシピ
Ignacio Ferro
本文
書き下ろしの文章, CC BY 4.0
フォント
Karla (SIL OFL 1.1) · Space Grotesk (SIL OFL 1.1) · Space Mono (SIL OFL 1.1)
SandboxPDF