Μετάβαση στο κύριο περιεχόμενο
Συνταγή αριθμός 194

Συνταγολόγιο · Κεφάλαιο 10 · Έξοδος και ενσωμάτωση

Ένα εξώφυλλο με παράθυρο που πλαισιώνει τη σελίδα τίτλου

Οβάλ παράθυρο στο εξώφυλλο με dieCuts, μετρημένο στον πίνακα της σελίδας τίτλου ώστε να πέφτει στο επίχρυσο πλαίσιο, και η γραμμή κοπτικού σε δικό της τσίγκο.

Σε αυτή τη σελίδα
Επίπεδο
Μεσαίο
Postext
Δοκιμασμένο με το Postext 1.84.0
Απαιτεί ≥ 1.84.0 · postext-pdf ≥ 1.84.0
Άδεια
Ενημέρωση: 13 Νοε 2026
Κώδικας MIT · Κείμενο CC BY 4.0
  • Δείγμα στα αγγλικά: δεν υπάρχει ακόμη ελληνική έκδοση
  • Διάσταση σελίδας 130 × 195 mm
  • 1 στήλη
  • EB Garamond 10,5/14
  • Cormorant Garamond
  • 10 σελίδες
  • Επίπεδο
  • Postext 1.84.0
  • Σελιδοποίηση σε 14 ms
  • 179 γραμμές κώδικα

Με λίγα λόγια

Ένα μικρό σκληρόδετο βιβλίο με ένα διήγημα του Πόε, που το διακοσμημένο εξώφυλλό του έχει μια οβάλ τρύπα. Μέσα από την τρύπα βλέπετε το πρόσωπο του πορτρέτου που είναι τυπωμένο στη σελίδα τίτλου από κάτω.

Τι θα στοιχειοθετήσετε

Το οβάλ πορτρέτο, το διήγημα του Έντγκαρ Άλαν Πόε του 1842 στο συντομότερο κείμενο που τύπωσε το 1845, ως σκληρόδετο βιβλίο δέκα σελίδων σε 130 × 195 mm. Το εξώφυλλο είναι ένα παλιό δαμασκηνό ύφασμα με ένα οβάλ παράθυρο κομμένο μέσα του. Κάτω από το εξώφυλλο βρίσκεται η σελίδα τίτλου, το ίδιο το πορτρέτο μέσα στο επίχρυσο μαυριτανικό πλαίσιό του, και το παράθυρο τοποθετείται ώστε η άκρη του να πέφτει πάνω στο επίχρυσο: κλειστό, το βιβλίο δείχνει το ζωγραφισμένο πρόσωπο πλαισιωμένο δύο φορές, μία από το χρυσό και μία από την κοπή (die-cut). Το διήγημα ακολουθεί σε κρεμ χαρτί με αρχίγραμμα, και το οπισθόφυλλο επαναλαμβάνει το δαμασκηνό με το κείμενο σε ένα σκούρο φόντο. Το αρχείο για το τυπογραφείο φέρει το περίγραμμα του παραθύρου σε δικό του τσίγκο.

Αυτή η συνταγή απαντά

  • Πώς ανοίγω ένα παράθυρο σε ένα εξώφυλλο που πλαισιώνει τη σελίδα τίτλου από κάτω;
  • Πώς στέλνω στον κατασκευαστή του κοπτικού μια γραμμή κοπτικού σε δικό της τσίγκο στο PDF;

Η σύντομη απάντηση

script.js · γραμμές 41–48στον πλήρη κώδικα
// The window is cut through the first leaf, so the closed book shows page 3 through it.
// Its size is measured on the title-page painting: a little wider than the frame's opening,
// so the cut edge falls on the gilt and the face sits in the middle of the hole.
const dieCuts = {
  shapes: [{ id: 'window', name: t({ en: 'Oval window', es: 'Ventana oval' }),
    shape: 'ellipse', x: mm(26), y: mm(15.7), width: mm(78), height: mm(102) }],
  pages: [{ pages: '1', die: 'window' }], // page 1, the front board
};

Υλικά

Γραμματοσειρές
EB Garamond, Cormorant Garamond (SIL OFL 1.1)
Αρχεία
  • damask.jpg
  • portrait.jpg
  • Cover and back: a pomegranate damask (Generated With Diffusion Models, πρωτότυπο)
  • Title page: the oval portrait on a velvet wall (Generated With Diffusion Models, πρωτότυπο)

Προετοιμασία

#1 · Ένα παράθυρο σε σύμπτωση με το πλαίσιο

Ο κώδικας είναι η σύντομη απάντηση παραπάνω. Το παράθυρο είναι ένα ellipse στη σελίδα 1, τοποθετημένο από την πάνω αριστερή γωνία της κομμένης σελίδας. Μια τρύπα στη σελίδα 1 βλέπει στη σελίδα 3, γι' αυτό μετρήστε την πάνω στον πίνακα της σελίδας τίτλου: εδώ το άνοιγμα του πλαισίου και η εξωτερική του άκρη διαβάστηκαν από την εικόνα σε pixel και μετατράπηκαν σε χιλιοστά, και το παράθυρο τοποθετήθηκε στο ένα τρίτο της επίχρυσης ταινίας, ώστε ένα λεπτό δαχτυλίδι χρυσού να φαίνεται μέσα στην κοπή.

#2 · Πίνακες κρεμασμένοι από την κομμένη σελίδα

script.js · γραμμές 52–93στον πλήρη κώδικα
// Both paintings are placed in trim millimetres, the same frame the die is measured in. The
// portrait is set a little larger than the page so the frame is centred on it (and on the
// window); the cover type sits on a dark cartouche below the window.
const bleed = (x, y, width, height) => ({ kind: 'image', id: 'painting',
  resourceId: '{attr.picture}', fit: 'cover', placement: at('page', 'top-left', x, y,
    { width: mm(width), height: mm(height) }) });
const sheet = bleed(-BLEED, -BLEED, WIDTH + 2 * BLEED, HEIGHT + 2 * BLEED);
const portrait = bleed(-3.6, -BLEED, 140, 210); // its oval centred at x = WIDTH / 2
const box = (id, y, h) => ({ kind: 'box', id, placement: at('page', 'top-left', 17, y,
  { width: mm(WIDTH - 34), height: mm(h) }), style: { backgroundColor: col('plate'),
  borderColor: col('gold'), borderWidth: pt(0.75) } });
const type = (id, content, y, size, extra = {}) => ({ kind: 'text', id, content,
  fontFamily: DISPLAY, fontSize: pt(size), lineHeight: 1.1, color: col('gold'),
  align: 'center', placement: at('page', 'top-left', 17, y, { width: mm(WIDTH - 34) }),
  ...extra });
const caps = { fontWeight: 600, textTransform: 'uppercase', letterSpacing: pt(2.2) };
const full = (elements) => ({ enabled: true, minHeight: mm(HEIGHT - TOP),
  slot: { elements } });
const bare = { numbered: false, toc: false, header: { elements: [] },
  footer: { elements: [] } };
// A plate's section drops the foot margin, so its design reaches the foot of the page.
const flush = (top = TOP, side = 0) => ({ margins: { top: mm(top), bottom: mm(0),
  left: mm(INNER + side), right: mm(OUTER + side) } });
const dark = { palette: { paper: palette.velvet }, marginTop: pt(0), marginBottom: pt(0) };
const behind = (el) => ({ ...el, reserve: false }); // painted under the section's text
const headingStyles = [
  { id: 'cover', ...bare, ...dark, ...flush(), advancedDesign: full([sheet,
    box('plate', 130, 44), type('title', '{title}', 138, 27, { italic: true, fontWeight: 500 }),
    type('author', '{author}', 159, 9.5, caps)]) },
  { id: 'titlepage', ...bare, ...dark, ...flush(), breakBefore: { enabled: true, parity: 'odd' },
    advancedDesign: full([portrait, type('title', '{title}', 146, 30,
      { italic: true, fontWeight: 500 }), type('author', '{author}', 166, 10, caps)]) },
  { id: 'colophon', ...bare, hidden: true, ...flush(132), breakBefore: { parity: 'any' },
    bodyStyle: { fontSize: pt(9), lineHeight: pt(12.5), color: col('muted'), textAlign: 'left' } },
  { id: 'tale', numbered: false, toc: true, breakBefore: { enabled: true, parity: 'odd' },
    marginTop: mm(30), marginBottom: pt(28),
    dropCap: { lines: 3, fontFamily: DISPLAY, color: col('ink'), gap: mm(1.2) } },
  // The back: the damask again, and the copy set in gold on a cartouche.
  { id: 'back', ...bare, ...dark, ...flush(74, 10), breakBefore: { enabled: true,
    parity: 'even' }, advancedDesign: { enabled: true, slot: { elements: [behind(sheet),
      behind(box('plate', 62, 78))] } } },
];

Η κοπή μετριέται σε χιλιοστά της κομμένης σελίδας, άρα και οι πίνακες. Το δαμασκηνό απλώνεται στο περιθώριο αιμορραγίας πέρα από την κομμένη σελίδα σε κάθε πλευρά· το πορτρέτο τοποθετείται λίγα χιλιοστά φαρδύτερο από αυτό, ώστε το πλαίσιο της εικόνας να είναι κεντραρισμένο στη σελίδα και στο παράθυρο. Το εξώφυλλο και η σελίδα τίτλου αφήνουν έξω το κάτω περιθώριο, ώστε τα σχέδιά τους να φτάνουν ως το κάτω μέρος της σελίδας, και καθεμία τυπώνει τον τίτλο και τον συγγραφέα της από το frontmatter.

#3 · Η γραμμή κοπτικού σε δικό της τσίγκο

script.js · γραμμές 105–106στον πλήρη κώδικα
  print: { standard: 'pdfx4', outputProfile: 'fogra51', convertImages: false,
    dieLine: { output: 'page', ink: 'Die', width: pt(0.5) } },

Το PDF τυπώνει ολόκληρο το εξώφυλλο και χαράζει το περίγραμμα του παραθύρου σε έναν διαχωρισμό Die με υπερεκτύπωση (overprint) και δεν μελανώνεται ποτέ: ο κατασκευαστής της μήτρας διαβάζει από εκεί το σχήμα και το πιεστήριο τον αφήνει έξω. Το convertImages: false κρατά τους πίνακες ως JPEG σε sRGB, κάτι που το PDF/X-4 επιτρέπει, και το αρχείο μένει κάτω από ένα megabyte.

#4 · Το κλειστό βιβλίο πάνω στο γραφείο

script.js · γραμμές 128–134στον πλήρη κώδικα
  folio: {
    tilt: 34, yaw: 0,
    paper: { type: 'bookWove', shade: '#f6efe2' },
    binding: { type: 'hardcover', cover: 'pages', coverMaterial: 'paper' },
    surface: { type: 'walnut' },
    lighting: { environment: 'lamp', intensity: 1.15 },
  },

Με binding.cover: 'pages' η πρώτη σελίδα είναι το μπροστινό χαρτόνι, έτσι το Folio δείχνει το βιβλίο κλειστό με το πρόσωπο μέσα στο παράθυρο και τα τοιχώματα της κοπής να πιάνουν το φως της λάμπας. Γυρίστε το εξώφυλλο για να δείτε ολόκληρη τη σελίδα τίτλου.

#5 · Το επίπεδο εξώφυλλο που βλέπει από μέσα

script.js · γραμμές 211–219στον πλήρη κώδικα
const under = new Map();
const beneath = (i) => {
  if (!under.has(i) && doc.pages[i]) {
    const canvas = document.createElement('canvas');
    under.set(i, canvas);
    renderPageToCanvas(doc.pages[i], doc, canvas, { scale: 1, beneath });
  }
  return under.get(i);
};

Στον καμβά, το beneath δίνει στον αποδοτή τη σελίδα 3 για το παράθυρο του εξωφύλλου, και το επίπεδο εξώφυλλο δείχνει κι αυτό το πρόσωπο. Η εσωτερική πλευρά του εξωφύλλου δεν έχει τίποτα από κάτω, γι' αυτό η τρύπα της δείχνει το φόντο.

Η πλήρης συνταγή

Sandbox
// ═══ Postext Cookbook · Nº 194 · A window cover that frames the title page ═══════════════
// https://postext.dev/en/cookbook/die-cut-window-cover
// Code: MIT · Text: Poe (PD) · Translation: CC BY 4.0 · Paintings: diffusion models
// Fonts: EB Garamond, Cormorant Garamond (SIL OFL 1.1) · Needs postext ≥ 1.84.0
//
// Poe's tale of a portrait in an oval frame, as a small hardback whose damask cover has an
// oval window cut through it. Closed, the book shows the face of the portrait on the title
// page through the window; the window's edge falls on the gilt of the painted frame.
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 = 'die-cut-window-cover';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: ink on cream inside; gold on a near-black for the cover and its plates
const palette = {
  ink: '#2b2320', // the text
  paper: '#f6efe2', // a cream book wove
  velvet: '#2a0d10', // the wall behind the portrait, and the endpapers
  plate: '#160c0b', // the cartouches on the damask
  gold: '#d9b36c', // the title type, the colour of the painted frame
  muted: '#6f6158', // the note on the text
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = [
  ...Object.entries(palette).map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } })),
  { id: 'main-color', name: 'gold (defaults)', value: { hex: palette.gold, model: 'hex' } },
];
// #endregion
const [WIDTH, HEIGHT, BLEED] = [130, 195, 3]; // mm: a small hardback, and its bleed
const [TOP, FOOT, INNER, OUTER] = [18, 24, 16, 19];
const [TEXT, DISPLAY] = ['EB Garamond', 'Cormorant Garamond'];
const at = (to, edge, x = 0, y = 0, size) => ({ anchor: { to, edge },
  offset: { x: mm(x), y: mm(y) }, ...(size && { size }) });

// #region answer: one oval die through the cover, in register with the frame beneath
// The window is cut through the first leaf, so the closed book shows page 3 through it.
// Its size is measured on the title-page painting: a little wider than the frame's opening,
// so the cut edge falls on the gilt and the face sits in the middle of the hole.
const dieCuts = {
  shapes: [{ id: 'window', name: t({ en: 'Oval window', es: 'Ventana oval' }),
    shape: 'ellipse', x: mm(26), y: mm(15.7), width: mm(78), height: mm(102) }],
  pages: [{ pages: '1', die: 'window' }], // page 1, the front board
};

Το συντεθειμένο script.js εκτελείται ως έχει: επικολλήστε το στο module script οποιασδήποτε σελίδας ή ανοίξτε τη συνταγή στο CodePen. Φάκελος της συνταγής στο GitHub ↗ (ανοίγει σε νέα καρτέλα)

Παραλλαγές

#Ονομάστε τον τσίγκο όπως τον περιμένει ο κόφτης

Τα ψηφιακά τραπέζια κοπής ψάχνουν ένα χρώμα spot με το όνομα CutContour, συνήθως ματζέντα, και μια πολύ λεπτή γραμμή.

-    dieLine: { output: 'page', ink: 'Die', width: pt(0.5) } },
+    dieLine: { output: 'page', ink: 'CutContour', cmyk: { c: 0, m: 100, y: 0, k: 0 },
+      width: pt(0.25) } },

#Ένα στρογγυλό παράθυρο

Ένας κύκλος δείχνει μόνο το πρόσωπο· το πλαίσιο μένει κρυμμένο κάτω από το εξώφυλλο ώσπου να γυρίσει.

-    shape: 'ellipse', x: mm(26), y: mm(15.7), width: mm(78), height: mm(102) }],
+    shape: 'circle', x: mm(32), y: mm(24), width: mm(66), height: mm(66) }],

Ευχαριστίες

Συνταγή
Ignacio Ferro
Κείμενο
  • The Oval Portrait, in the text of the Broadway Journal (1845), from Project Gutenberg eBook 2147, with Poe’s “rarely” for the eBook’s “merely” · Edgar Allan Poe · κοινό κτήμα
  • The Spanish translation, the note on the text and the back-cover copy · Postext Cookbook · CC BY 4.0
Εικόνες
  • Cover and back: a pomegranate damask · Generated With Diffusion Models · πρωτότυπο
  • Title page: the oval portrait on a velvet wall · Generated With Diffusion Models · πρωτότυπο
Γραμματοσειρές
EB Garamond (SIL OFL 1.1) · Cormorant Garamond (SIL OFL 1.1)
SandboxPDF