@chalk-format/pdf
v0.1.3
Published
Convert a PDF into a .chalk book, in Node: rendered pages and a searchable text layer. Includes the chalk-pdf command.
Maintainers
Readme
@chalk-format/pdf
Converts a PDF into a .chalk book in Node, with no browser: each page rendered as a picture (WebP by default)
with the PDF's text as a searchable text layer.
npx @chalk-format/pdf convert book.pdf -o book.chalk --title "Physics" --locale bn --license "All rights reserved"
npx @chalk-format/pdf --help(Installed, the command is chalk-pdf.)
import { convertPdfToChalk } from '@chalk-format/pdf';
const chalk = await convertPdfToChalk(pdfBytes, 'Physics', { locale: 'bn' }); // the .chalk file's bytes@chalk-format/pdf/engine is the page mapping it uses (pdf.js), shared with in-browser imports.
Scanned PDFs have no text to extract: the book shows the pages but cannot be searched until they are OCR'd. Making a book from start to finish: the guide. Apache-2.0.
