Commit Graph
15 Commits
Author SHA1 Message Date
john-okeefe e3c6fd528f Fix PDF.js vendor path glob and reformat with consistent style
- 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
2026-04-22 16:26:43 -04:00
John Factotum 1217096245 Update PDF.js to 5.5.207
Fixes https://github.com/johnfactotum/foliate-js/issues/85
2026-03-05 15:52:38 +08:00
John Factotum 519c0329b2 PDF: improve metadata 2024-10-18 13:42:49 +08:00
Huang Xin f24e611c4e Lazy loading of PDF documents (#37) (#38) 2024-10-18 04:05:31 +00:00
John Factotum 4cd2ca2eb3 PDF: fix comment 2024-09-28 19:32:14 +08:00
John Factotum 3409674e66 PDF: set isEvalSupported to false
`eval()` would be blocked by CSP and thus not supported
2024-09-28 19:17:12 +08:00
John Factotum 45d67a0db3 PDF: add CMaps and fonts 2024-09-28 17:41:38 +08:00
John Factotum be76724699 PDF: fix text selection 2024-09-28 17:38:59 +08:00
John Factotum 693341f008 PDF: fix links 2024-09-28 14:29:47 +08:00
John Factotum 1e952102bd PDF: rerender when scale changes
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.
2024-09-28 12:12:59 +08:00
Kian-Meng Ang 42ebb0aec4 Fix typos (#34)
Found via `typos --hidden --format brief`
2024-09-23 08:29:28 +00:00
John Factotum 37626ba44a PDF: default to odd pages right 2024-06-22 01:40:58 +08:00
Vytor Rennan 28a757e5bb Fix bad resolution for pdfs (#23) 2024-04-26 03:52:21 +00:00
John Factotum 4f321563c7 PDF: add annotation layer and handle links 2023-10-09 01:56:13 +08:00
John Factotum a63a68eda0 Add PDF support 2023-10-08 21:27:06 +08:00