calixteman
918a319de6
Merge pull request #20885 from calixteman/gouraud_gpu
...
Implement Gouraud-based shading using WebGPU.
2026-03-21 15:18:56 +01:00
calixteman
86441e9eb8
Implement Gouraud-based shading using WebGPU.
...
The WebGPU feature hasn't been released yet but it's interesting to see how
we can use it in order to speed up the rendering of some objects.
This patch allows to render mesh patterns using WebGPU.
I didn't see any significant performance improvement on my machine (mac M2)
but it may be different on other platforms.
2026-03-21 14:34:32 +01:00
Tim van der Meij
d66629376e
Merge pull request #20934 from Snuffleupagus/fix-TextLayerBuilder-abortSignal
...
Ensure that `TextLayerBuilder` works correctly without the `abortSignal` parameter (PR 20928 follow-up)
2026-03-21 13:48:02 +01:00
Jonas Jenwald
4c0504460f
[Debugger] Allow debugging page-rendering from the /Ref, in addition to the pageNumber
...
Currently it's only possible to trigger page-render debugging through the page number, but when looking at the /Pages tree it's often not immediately obvious what the page number actually is.
However, the /Ref of the page is directly available and it's thus handy to be able to use that one instead to enable page-render debugging.
2026-03-21 12:06:30 +01:00
Jonas Jenwald
ba796a3441
Ensure that TextLayerBuilder works correctly without the abortSignal parameter (PR 20928 follow-up)
...
After the changes in PR 20928 the code no longer works correctly unless the `abortSignal` parameter is provided, which completely breaks text-selection in e.g. the standalone viewer-components with errors such as:
```
#renderTextLayer: TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
#bindMouse http://localhost:8888/web/text_layer_builder.js:173
render http://localhost:8888/web/text_layer_builder.js:128
#renderTextLayer http://localhost:8888/web/pdf_page_view.js:532
resultPromise http://localhost:8888/web/pdf_page_view.js:1184
promise callback*draw http://localhost:8888/web/pdf_page_view.js:1174
renderView http://localhost:8888/web/pdf_rendering_queue.js:219
forceRendering http://localhost:8888/web/pdf_viewer.js:2081
promise callback*forceRendering http://localhost:8888/web/pdf_viewer.js:2080
renderHighestPriority http://localhost:8888/web/pdf_rendering_queue.js:84
update http://localhost:8888/web/pdf_viewer.js:1895
onScaleChanging http://localhost:8888/web/app.js:2755
dispatch http://localhost:8888/web/event_utils.js:115
#setScaleUpdatePages http://localhost:8888/web/pdf_viewer.js:1555
#setScale http://localhost:8888/web/pdf_viewer.js:1640
set currentScaleValue http://localhost:8888/web/pdf_viewer.js:592
setInitialView http://localhost:8888/web/app.js:1969
load http://localhost:8888/web/app.js:1570
promise callback*load/< http://localhost:8888/web/app.js:1518
promise callback*load http://localhost:8888/web/app.js:1507
open http://localhost:8888/web/app.js:1255
promise callback*open http://localhost:8888/web/app.js:1253
run http://localhost:8888/web/app.js:895
webViewerLoad http://localhost:8888/web/viewer.js:366
<anonymous> http://localhost:8888/web/viewer.js:377
pdf_page_view.js:547:15
```
2026-03-20 23:22:11 +01:00
calixteman
e577141154
Merge pull request #20906 from calixteman/debugger_text
...
Add the possibility to debug only text rendering by filtering the op list.
2026-03-20 22:39:18 +01:00
calixteman
cf3b3fa900
Add the possibility to debug only text rendering by filtering the op list.
...
And a specific view for inspecting font information and the text layer on top of the canvas.
2026-03-20 22:28:34 +01:00
calixteman
977e4f2c4a
Merge pull request #20928 from calixteman/pass_global_signal_text_layer
...
Pass the global signal the text layer builder in order to remove all the listeners defined here
2026-03-20 18:36:25 +01:00
calixteman
5a240f7802
Merge pull request #20932 from calixteman/bug2023150
...
Trigger the current find after a page has been moved (bug 2023150)
2026-03-20 18:07:24 +01:00
Calixte Denizet
e1f02be670
Pass the global signal the text layer builder in order to remove all the listeners defined here
...
The goal of this patch is to remove the noice we've in the logs:
```
0:09.36 INFO Console message: [JavaScript Warning: "Script terminated by timeout at:
reset@resource://pdf.js/web/viewer.mjs:11773:7
EventListener.handleEvent*#enableGlobalSelectionListener@resource://pdf.js/web/viewer.mjs:11787:12
render@resource://pdf.js/web/viewer.mjs:11716:20
async*#renderTextLayer@resource://pdf.js/web/viewer.mjs:12108:28
draw/resultPromise<@resource://pdf.js/web/viewer.mjs:12575:53
promise callback*draw@resource://pdf.js/web/viewer.mjs:12570:8
renderView@resource://pdf.js/web/viewer.mjs:7872:14
forceRendering/<@resource://pdf.js/web/viewer.mjs:13963:29
" {file: "resource://pdf.js/web/viewer.mjs" line: 11773}]
```
2026-03-20 18:06:39 +01:00
calixteman
5bdeb79b09
Merge pull request #20926 from calixteman/bug2022516
...
Correctly focus the pasted page (bug 2022516)
2026-03-20 17:47:02 +01:00
calixteman
2c5812006a
Merge pull request #20929 from calixteman/bug2022481
...
Add the basic telemetry for Organize feature (bug 2022481)
2026-03-20 17:44:19 +01:00
calixteman
16aee06aac
Merge pull request #20925 from calixteman/reorganize_save_annotations
...
Add the possibility to save added annotations when reorganizing a pdf (bug 2023086)
2026-03-20 16:32:10 +01:00
Calixte Denizet
118228480b
Trigger the current find after a page has been moved (bug 2023150)
2026-03-20 16:22:53 +01:00
Calixte Denizet
008181a43e
Add the basic telemetry for Organize feature (bug 2022481)
2026-03-20 14:33:55 +01:00
Calixte Denizet
4aee2e8f2c
Correctly focus the pasted page (bug 2022516)
2026-03-20 11:39:57 +01:00
Calixte Denizet
04272de41d
Add the possibility to save added annotations when reorganizing a pdf (bug 2023086)
2026-03-20 10:55:47 +01:00
Calixte Denizet
1db3774540
Make sure the menuitems are readable when hovering them (bug 2023138)
...
Simplify a bit the html for the menu: remove the li elements.
Make sure the the menuitems are exposed when disabled.
2026-03-20 10:01:45 +01:00
calixteman
a98449510c
Merge pull request #20913 from calixteman/new_badge
...
Add a new badge close to the Manage button in the sidebar.
2026-03-18 21:38:47 +01:00
calixteman
e65d643af5
Merge pull request #20907 from calixteman/fix_bad_bugs
...
Fix various bug around copy/paste/delete/undo (bug 2022586, bug 2022824, bug 2022884, bug 2023171, bug 2023176)
2026-03-18 21:38:15 +01:00
Calixte Denizet
85d88e59f3
Add a new badge close to the Manage button in the sidebar.
2026-03-18 21:05:00 +01:00
Calixte Denizet
75cb69eef2
Fix various bug around copy/paste/delete/undo (bug 2022586, bug 2022824, bug 2022884, bug 2023171, bug 2023176)
...
Those bugs are more or less related so it's why they're all fixed together in the same patch.
2026-03-18 13:57:20 +01:00
Calixte Denizet
bab17136ed
Fix the outline of the deselect button in the sidebar (bug 2024156)
...
I noticed a typo in class name (hiddden for hidden) and I found few others I fixed.
2026-03-18 12:53:48 +01:00
calixteman
979d9c3091
Merge pull request #20895 from calixteman/issue20893
...
Fix the position of 'Attachments' in the sidebar
2026-03-18 11:24:22 +01:00
Calixte Denizet
96d1465aab
Allow to collapse/expand all the outlines in double clicking somewhere on the header bar (bug 2019550)
2026-03-18 10:26:04 +01:00
Calixte Denizet
44f4627600
Fix the position of 'Attachments' in the sidebar
...
It fixes #20893 .
2026-03-18 10:09:23 +01:00
Calixte Denizet
5493585b54
Try to fix few intermittents bug in reorganize_pages_spec integration tests
2026-03-16 22:00:42 +01:00
Tim van der Meij
0a2c030c8b
Merge pull request #20888 from calixteman/debugger_skip_ops
...
Add the possibility to skip some ops in the debug view
2026-03-16 20:36:48 +01:00
Tim van der Meij
481a0cbe62
Merge pull request #20889 from calixteman/debugger_search_btns
...
(Debugger) Replace checkboxes in the search bar by toggle buttons
2026-03-16 20:35:17 +01:00
calixteman
fc286aac4e
(Debugger) Don't draw the checkerboard on the canvas but add it behind
2026-03-15 23:20:18 +01:00
calixteman
c7837580b9
(Debugger) Replace checkboxes in the search bar by toggle buttons
2026-03-15 22:46:13 +01:00
calixteman
e85c30e08a
Add the possibility to skip some ops in the debug view
...
The user has to click in the space before an op to add a breakpoint
and click again in order to skip it.
2026-03-15 22:25:45 +01:00
Tim van der Meij
c2acab55d9
Merge pull request #20765 from calixteman/update_eslint
...
Update eslint to version 10
2026-03-15 20:26:09 +01:00
calixteman
d5ac981d62
Update eslint to version 10
...
Unfortunately, eslint-plugin-import depends on eslint 9. This plugin doesn't seem to be
actively maintained (lot of open issues and PRs).
Fortunately there's a fork of the plugin that doesn't support eslint 10 yet but is actively maintained.
So this PR changes the eslint version to 10 and replaces eslint-plugin-import with eslint-plugin-import-x.
2026-03-15 19:36:54 +01:00
Jonas Jenwald
e05df11e98
Increase the maximum viewer scale to 2500 percent
...
After PR 19128 huge zoom levels should no longer be an issue, so let's increase the maximum viewer scale a bit.
2026-03-15 15:45:34 +01:00
calixteman
a3a205d69b
Merge pull request #20871 from calixteman/refactor_debugger
...
Split the new debugger into multiple files
2026-03-15 14:29:13 +01:00
calixteman
7bac644731
Split the new debugger into multiple files
...
Instead of having all the code for the new debugger in a single file,
split it into multiple files.
This makes it easier to navigate and maintain the codebase.
It'll be make hacking and fixing bugs in the debugger easier.
2026-03-15 13:21:26 +01:00
Tim van der Meij
820b70eb25
Merge pull request #20858 from calixteman/move_save_as_to_export_selected
...
Move 'Save as...' menu to 'Export selected...'
2026-03-13 22:04:12 +01:00
Tim van der Meij
94b7f8f998
Merge pull request #20863 from calixteman/fix_intermittent_undo_bar
...
Only focus the undo bar when the focus isn't inside
2026-03-13 22:03:45 +01:00
Jonas Jenwald
75739a173b
Bundle the necessary files and set the correct cMapUrl, iccUrl, and standardFontDataUrl when building gulp internal-viewer
...
Without these changes none of the relevant functionality would work in the *built* internal-viewer.
2026-03-13 18:16:10 +01:00
calixteman
1d25607b9c
Move 'Save as...' menu to 'Export selected...'
2026-03-13 17:29:12 +01:00
Calixte Denizet
df4a5638d0
Add a button for unchecking all the checked thumbnails (bug 2022769)
2026-03-13 14:18:51 +01:00
calixteman
fbfccebb81
Merge pull request #20850 from calixteman/bug2021828
...
Don't let the user delete/cut all the pages (bug 2021828)
2026-03-13 14:06:01 +01:00
Calixte Denizet
bbf178c5ee
Only focus the undo bar when the focus isn't inside
...
It should fix the test "must work properly when selecting undo by keyboard"
which calls focus() but it can be steal by fixed callback in setTimeout.
2026-03-13 13:53:51 +01:00
calixteman
2381ac6b16
Update the internal viewer to use a new debugger.
...
It has few cool features:
- all the canvas used during the rendering can be viewed;
- the different properties in the graphics state can be viewed;
- the different paths can be viewed.
2026-03-12 22:38:08 +01:00
Calixte Denizet
1291f5a32b
Don't let the user delete/cut all the pages (bug 2021828)
...
And dispatch an event only when the context menu is displayed.
2026-03-11 17:23:56 +01:00
Jonas Jenwald
63b4874b39
Remove the enableHWA option from viewer components (PR 20016 follow-up)
...
In PR 20016 the actual uses of the `enableHWA` option was removed from the viewer, but for some reason it's still being provided when initializing `PDFViewer` and `PDFThumbnailViewer` despite the fact that it's now dead code.
2026-03-11 15:28:43 +01:00
calixteman
9d093d9607
Merge pull request #20626 from nicolo-ribaudo/images-right-click
...
Add support for right-clicking on images (bug 1012805)
2026-03-11 11:45:51 +01:00
calixteman
98f7e859ac
Merge pull request #20837 from calixteman/bug2021934
...
Disable dragging a thumbnail when the user has to paste what they copied (bug 2021934)
2026-03-11 09:13:25 +01:00
Tim van der Meij
44a63549b0
Merge pull request #20831 from calixteman/internal_viewer
...
Add a new internal viewer to explore the structure of PDF files.
2026-03-10 20:48:40 +01:00