mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Expose the PDF.js document proxy on the book object
book.pdf lets the host drive pdf.js directly (page.getTextContent for in-book search) without reaching into renderer internals.
This commit is contained in:
@@ -154,7 +154,7 @@ export const makePDF = async (file, options = {}) => {
|
||||
isEvalSupported: false,
|
||||
}).promise;
|
||||
|
||||
const book = { rendition: { layout: "pre-paginated" } };
|
||||
const book = { rendition: { layout: "pre-paginated" }, pdf };
|
||||
|
||||
const { metadata, info } = (await pdf.getMetadata()) ?? {};
|
||||
// TODO: for better results, parse `metadata.getRaw()`
|
||||
|
||||
Reference in New Issue
Block a user