Calixte Denizet
30101cbb31
[Editor] Fix the quadpoints value when serializing an highlight annotation
...
The coordinates of each point in a box are in the page coordinates system.
2024-03-01 11:36:16 +01:00
Calixte Denizet
7af90bb8bc
[Editor] Enable the thickness input when no editors are selected (bug 1881219)
2024-02-29 23:05:33 +01:00
Calixte Denizet
f52bf2836f
[Editor] Make the delete button clickable with the space key (bug 1882248)
2024-02-29 19:05:38 +01:00
Calixte Denizet
a9f47e87d5
[Editor] Add the possibility to move the caret with the keyboard once an highlight has been made (bug 1881684)
2024-02-29 18:18:13 +01:00
Jonas Jenwald
a92b38e71c
Inline the HighlightEditor.#telemetryType
getter at its only call-site (PR 17748 follow-up)
2024-02-28 20:47:01 +01:00
Calixte Denizet
3a7e638fce
[Editor] Count the colors used when highlighting whatever the highlight kind is
2024-02-28 18:24:24 +01:00
calixteman
07abd647f4
Merge pull request #17737 from calixteman/highlight_telemetry
...
[Editor] Add some telemetry for the highlight feature (bug 1866437)
2024-02-28 15:20:57 +01:00
Calixte Denizet
65342d2bee
[Editor] Add some telemetry for the highlight feature (bug 1866437)
2024-02-28 10:17:11 +01:00
Calixte Denizet
e0b843d991
Always add links in the annotation layer
...
Fixes #17730 .
2024-02-27 22:48:08 +01:00
calixteman
ca4ab064e5
Merge pull request #17720 from calixteman/editor_simplify_highlighting
...
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)
2024-02-25 17:52:11 +01:00
Calixte Denizet
0520f2f0cb
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)
...
In implementing caret browsing mode in pdf.js, I didn't notice that selectstart isn't always triggered.
So this patch removes the use of selectstart and rely only on selectionchange.
In order to simplify the selection management, the selection code is moved in the AnnotationUIManager:
- it simplifies the code;
- it allows to have only one listener for selectionchange instead of having one by visible page
for selectstart.
I had to add a delay in the integration tests for highlighting (there's a comment with an explanation),
it isn't really nice, but it's the only way I found and in real life there always is a delay between
press and release.
2024-02-25 15:35:30 +01:00
Calixte Denizet
fe41e789de
Fix the string GlobalConstants.IDS_INVALID_DATE
2024-02-23 21:39:06 +01:00
Jonas Jenwald
346efe919a
Merge pull request #17718 from Snuffleupagus/hexNumbers-tweak
...
Tweak how the `hexNumbers` Array, used by `Util.makeHexColor`, is built
2024-02-23 18:17:10 +01:00
Calixte Denizet
e1f6f5179f
[Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739)
2024-02-23 16:18:03 +01:00
Jonas Jenwald
49a2aff532
Tweak how the hexNumbers
Array, used by Util.makeHexColor
, is built
...
*Please note:* This is a micro optimization, hence I fully understand if the patch is rejected.
Currently we create two temporary Arrays and have to iterate twice in total when building the final `hexNumbers` Array.
With this patch there's only one temporary Array and a single iteration required to build the final `hexNumbers` Array.
2024-02-23 14:20:53 +01:00
calixteman
72b8b29147
Merge pull request #17701 from calixteman/alt_text_ai
...
[Editor] Add the possibility to query some ML stuff to guess an alt text for an image
2024-02-21 10:14:40 +01:00
Calixte Denizet
46416bb131
[Editor] Add the possibility to query some ML stuff to guess an alt text for an image
...
It's only for an experimental purpose.
2024-02-20 21:29:33 +01:00
Calixte Denizet
95f9bedc7c
[Editor] Disable annotation layer when highlighting (bug 1868759)
...
When highlighting, the annotation editor layer is disabled to get pointer events
from the text layer, but the annotation layer must be then disabled either in
order to avoid bad interactions.
2024-02-20 21:17:05 +01:00
calixteman
70015ffe6b
Merge pull request #17688 from calixteman/editor_no_scroll_unselect
...
[Editor] Avoid to scroll when an editor is unselected
2024-02-20 17:00:43 +01:00
Calixte Denizet
a6eadf8150
Avoid to access to a missing cidSystemInfo property
...
Fixes #17689 .
2024-02-19 09:55:23 +01:00
Calixte Denizet
c2fcc66302
[Editor] Avoid to scroll when an editor is unselected
2024-02-18 19:21:45 +01:00
Jonas Jenwald
a7bcc81eb1
Add a dummy beginMarkedContentProps
operator when optional content parsing fails (issue 17679)
2024-02-17 13:45:16 +01:00
calixteman
a83a8d7e4f
Merge pull request #17674 from calixteman/issue17671
...
Fix the endoffset of the last glyph when it's followed by a null offset in the loca table
2024-02-15 10:19:55 +01:00
Calixte Denizet
fcad3718f0
Fix the endoffset of the last glyph when it's followed by a null offset in the loca table
...
It fixes #17671 .
2024-02-14 17:20:04 +01:00
Calixte Denizet
2133da166e
When updating, write the xref table in the same format as the previous one (bug 1878916)
...
The specs are unclear about what kind of xref table format must be used.
In checking the validity of some pdfs in the preflight tool from Acrobat
we can guess that having the same format is the correct way to do.
The pdf in the mentioned bug, after having been changed, wasn't correctly
displayed in neither Chrome nor Acrobat: it's now fixed.
2024-02-13 14:14:37 +01:00
Jonas Jenwald
e60329cea1
Merge pull request #17666 from Snuffleupagus/issue-17665
...
Skip any whitespace after the first object in linearized PDFs (issue 17665)
2024-02-13 12:39:36 +01:00
Jonas Jenwald
37e98e39f6
Skip any whitespace after the first object in linearized PDFs (issue 17665)
...
This way the code is now consistent with the non-linearized branch in the `PDFDocument.startXRef` getter.
2024-02-12 22:05:36 +01:00
calixteman
05b035602e
Merge pull request #17664 from calixteman/bug1879281
...
[Editor] Ends a free highlight where the mouse pointer is (bug 1879281)
2024-02-12 18:39:18 +01:00
Calixte Denizet
750b8e328a
[Editor] Ends a free highlight where the mouse pointer is (bug 1879281)
2024-02-12 17:26:33 +01:00
Calixte Denizet
de1985abbb
[Editor] Set rotated free highlight at the right position after having changed its thickness (bug 1879108)
2024-02-11 21:06:56 +01:00
calixteman
f15b4b34fd
Merge pull request #17650 from calixteman/editor_highlight_keyboard
...
[Editor] Add a way to highlight text in using the keyboard (bug 1877426)
2024-02-11 18:52:37 +01:00
Calixte Denizet
b5e446213e
[Editor] Disable the thickness slider for non-free highlight
2024-02-09 22:54:53 +01:00
Calixte Denizet
8fc6c5c8a6
[Editor] Add a way to highlight text in using the keyboard (bug 1877426)
2024-02-09 22:52:24 +01:00
Calixte Denizet
8d61fc1fde
[Editor] Compute the position of the last point before applying rotation (bug 1879113)
2024-02-08 21:08:24 +01:00
Calixte Denizet
c4ac7eef95
[Editor] Correctly rotate the mask when rotation a free highlight (bug 1879102)
2024-02-08 15:29:29 +01:00
Jonas Jenwald
06cd278808
Simplify the signature of the PDFDataTransportStream
constructor
...
Given that we need to pass in a `PDFDataRangeTransport`-instance a number of the needed parameters can be obtained from it, rather than having to specify them manually.
2024-02-03 13:10:42 +01:00
Jonas Jenwald
363dce6744
Use a limit, in more places, when splitting strings
...
This should be a *tiny* bit more efficient, since it avoids parsing substrings that we don't care about.
*Please note:* I cannot find an ESLint rule to enforce this automatically.
2024-02-02 13:10:52 +01:00
Wojciech Maj
f80ba44fb0
Make downloadManager optional in AnnotationLayerParameters
...
Continuation of fix started in #17038
2024-02-01 11:08:12 +01:00
calixteman
833d7ac830
Merge pull request #17602 from calixteman/editor_free_highlight_lastpoint
...
[Editor] Fix the position of the free highlight toolbar
2024-01-30 20:34:47 +01:00
calixteman
245fd02141
Merge pull request #17586 from calixteman/editor_freehighlight_outline_inside
...
[Editor] Remove the outline which is inside the free highlight shape
2024-01-30 17:56:52 +01:00
Calixte Denizet
7529c1e3dc
[Editor] Fix the position of the free highlight toolbar
2024-01-30 15:40:33 +01:00
Calixte Denizet
b88c6f9c39
[Editor] Remove the outline which is inside the free highlight shape
...
When an highlight is self-intersecting, the outline was drawn inside.
In order to remove it, we use a svg mask to exclude the shape inside
when drawing the outlines.
That leads to change the outline 1px,white-2px,blue-1px,white to a
2px,white-2px,blue: the part of the stroke which is inside the shape
is removed because of the mask.
2024-01-30 14:40:56 +01:00
Calixte Denizet
f3bdbedf9b
[Editor] Change the cursors for highlighting (bug 1876588)
2024-01-26 18:17:05 +01:00
Calixte Denizet
7f2428a77e
Reduce memory use and improve perfs when computing the bounding box of a bezier curve (bug 1875547)
...
It isn't really a fix for the mentioned bug but it slightly improve things.
In reducing the memory use, the time spent in the GC is reduced either.
The algorithm to compute the bounding box is the same as before but it has just
been rewritten to be more efficient.
2024-01-24 23:41:14 +01:00
Calixte Denizet
2b8ecf5688
[Editor] Add the possibility to change the thickness of a free highlight (bug 1876096)
2024-01-24 22:04:39 +01:00
Calixte Denizet
d713df28c3
[Editor] Update the parameters in the UI of the last selected editor when undoing/redoing
2024-01-24 18:16:51 +01:00
Jonas Jenwald
fa583427ef
Always export the "raw" /ToUnicode-data from PartialEvaluator.preEvaluateFont
(PR 13354 follow-up)
...
This, ever so slightly, simplifies the implementation in the `PartialEvaluator.extractDataStructures`-method.
2024-01-22 13:06:32 +01:00
Jonas Jenwald
f21a30dfb4
Convert the PartialEvaluator.readToUnicode
method to be async
2024-01-22 12:47:06 +01:00
Jonas Jenwald
f5c01188dc
Convert the PartialEvaluator.extractDataStructures
method to be async
2024-01-22 12:47:06 +01:00
Jonas Jenwald
cf0797dfbd
Use await
consistently in the PartialEvaluator.setGState
method
2024-01-22 12:47:06 +01:00