Bundlers like Vite cannot resolve directory paths (cmaps/, standard_fonts/)
through the new URL(..., import.meta.url) pattern. Add optional config to
makePDF, makeBook, and View.open so consumers can provide explicit URLs.
When options are not provided, falls back to import.meta.url resolution
(preserving existing behavior for direct module usage).
- Change pdfjsPath template from 'vendor/pdfjs/' to
'./vendor/pdfjs/' so the relative glob resolves correctly
when the module is bundled with Vite
- Reformat entire file: 2-space indentation, double quotes, semicolons,
trailing commas, parenthesized arrow function parameters, and aligned
multi-line call arguments for consistency with the rest of the codebase
The fixed-layout renderer now accepts an object for the return value of
`load()` (on the `book.sections` items). If it's an object, the `src`
is the URL of the section, and `onZoom`, if present, will be called
when the viewport is zoomed. With this you can scale the page yourself
rather than relying on the renderer's own scaling with CSS transform.
Also upgraded to PDF.js 4.6.82. And now internal links are broken...
Don't know how to fix that yet.