Examples/PDF book

PDF book

Same gestures as the image book, backed by PdfSource.

Source

import { Zine } from '@zinejs/core';
import { PdfSource } from '@zinejs/pdf';

// Vite / Nuxt: import the worker URL explicitly if needed
// import pdfWorker from 'pdfjs-dist/build/pdf.worker.min.mjs?url';

const book = new Zine(document.getElementById('book'), {
  source: new PdfSource('/pdf/sample.pdf', {
    // workerSrc: pdfWorker,
  }),
});