mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-21 14:49:51 -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:
1 parent
1c0ebf331f
commit
d0654951b5
1 file changed
+1
-1
@@ -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