7323 Commits

Author SHA1 Message Date
Tim van der Meij
40b52fa43a
Merge pull request #20458 from calixteman/fix_firstchild
Don't use firstChild/lastChild when getting elements (follow-up of #20447)
2025-11-27 21:34:56 +01:00
calixteman
029cae2ad4 Don't use firstChild/lastChild when getting elements (follow-up of #20447) 2025-11-22 21:10:32 +01:00
calixteman
ec71e4ed65
Merge pull request #20455 from calixteman/bug1998843
[XFA] Set default max value in occur tag to -1 (bug 1998843)
2025-11-22 20:59:04 +01:00
calixteman
b41959bde8
Merge pull request #20413 from sachiniyer/siyer/fix-annotation-editor-deletion
fix: deleteAnnotationElement takes a full editor object
2025-11-21 22:28:06 +01:00
Sachin Iyer
464dae11ac fix: deleteAnnotationElement takes a full editor object 2025-11-21 11:32:29 -08:00
Calixte Denizet
516aea5562 [XFA] Set default max value in occur tag to -1 (bug 1998843) 2025-11-21 17:53:38 +01:00
calixteman
ddf3a989ca
Merge pull request #20427 from Aditi-1400/issue-20426
Add setter for some FontFaceObject properties
2025-11-20 20:49:30 +01:00
Aditi
7743d11594 Add setter for some FontFaceObject properties 2025-11-20 22:47:57 +05:30
calixteman
c6b61a34e6
Merge pull request #20436 from calixteman/merge_struct_trees
Merge the structure trees coming from different pdfs (bug 1997379)
2025-11-17 20:10:06 +01:00
Calixte Denizet
e13a618df3 Merge the structure trees coming from different pdfs (bug 1997379) 2025-11-17 19:56:36 +01:00
Calixte Denizet
50c48cf11b Add telemetry for tagged pdfs (bug 1997134) 2025-11-17 19:47:16 +01:00
calixteman
e7288dca8e
Merge pull request #20431 from calixteman/split_merge_p4
Add a wrapper for the new xref in order to be able to get some values from cloned dictionaries
2025-11-11 21:47:42 +01:00
Tim van der Meij
bc4d90711a
Merge pull request #20432 from calixteman/version
Version entry in the catalog has to be a name and not a string
2025-11-11 20:31:59 +01:00
Calixte Denizet
a98b0b1fb5 Version entry in the catalog has to be a name and not a string 2025-11-09 15:34:57 +01:00
Calixte Denizet
65881f0e21 Add a wrapper for the new xref in order to be able to get some values from cloned dictionaries 2025-11-09 15:28:43 +01:00
Calixte Denizet
37f4712f7e Update the named page destinations when some pdf are combined (bug 1997379)
and remove link annotations pointing on a deleted page.
2025-11-07 18:22:19 +01:00
Calixte Denizet
ad97c5b816 Update the page labels tree when a pdf is extracted (bug 1997379) 2025-11-07 15:59:57 +01:00
calixteman
85ed401b82
Merge pull request #20409 from calixteman/split_merge_p1
Add the possibility to create a pdf from different ones (bug 1997379)
2025-11-07 15:05:52 +01:00
Calixte Denizet
bc87f4e8d6 Add the possibility to create a pdf from different ones (bug 1997379)
For now it's just possible to create a single pdf in selecting some pages in different pdf sources.
The merge is for now pretty basic (it's why it's still a WIP) none of these data are merged for now:
 - the struct trees
 - the page labels
 - the outlines
 - named destinations
For there are 2 new ref tests where some new pdfs are created: one with some extracted pages and an other
one (encrypted) which is just rewritten.
The ref images are generated from the original pdfs in selecting the page we want and the new images are
taken from the generated pdfs.
2025-11-07 14:57:48 +01:00
Calixte Denizet
04db38558a Create the number tree for the ParentTree only one time 2025-11-05 17:49:55 +01:00
calixteman
2cc809ade2
Merge pull request #20213 from lab-core/pointer-type
[Editor] A new CurrentPointers class to store current pointers used by the editor
2025-11-01 19:17:32 +01:00
Tim van der Meij
6e7a6eb52b
Merge pull request #20408 from calixteman/fix_mml_encoding
Don't set the MathML namespace for attributes in MathML tags (bug 1997343)
2025-11-01 14:58:15 +01:00
Tim van der Meij
c696648826
Merge pull request #20404 from mozilla/revert-20031-telemetry_signature_certificate
Revert "Add some telemetry in order to know what are the certificates used in pdfs (bug 1973573)"
2025-11-01 14:55:07 +01:00
Calixte Denizet
6db23139be Don't set the MathML namespace for attributes in MathML tags (bug 1997343)
And by default a XML file is UTF-8 encoded so correctly decode the embedded file.
2025-10-30 18:37:19 +01:00
Edoardo Cavazza
4c22b99df3 Collect all child nodes of lists and tables 2025-10-29 17:30:46 +01:00
calixteman
aeceee1df3
Revert "Add some telemetry in order to know what are the certificates used in pdfs (bug 1973573)" 2025-10-29 15:41:34 +01:00
Coelacanthus
6590063614
Add the font PT Astra Serif as a possible substitution for Times New Roman
Metric-compatible font with Times New Roman created by ParaType, based on
their serif font PT Serif, released under OFL-1.1 license.

https://www.paratype.com/fonts/pt/pt-astra-serif

Signed-off-by: Coelacanthus <uwu@coelacanthus.name>
2025-10-29 17:15:31 +08:00
calixteman
520363b350
Merge pull request #20384 from calixteman/bug1937438
Make MathML elements visible in the struct tree (bug 1937438)
2025-10-23 17:55:42 +02:00
Calixte Denizet
e5a62c8d06 Make MathML elements visible in the struct tree (bug 1937438)
It'll help to make math equations "visible" for screen readers.
MS Office has a specific way to add some MathML code to struc tree leaf
and this patch handles it.
2025-10-23 16:29:01 +02:00
calixteman
638861008f
Merge pull request #20388 from calixteman/bug1995705
[Editor] Avoid to have several Undo entries in the context menu (bug 1995705)
2025-10-23 09:01:19 +02:00
Calixte Denizet
19cbdba434 [Editor] Avoid to have several Undo entries in the context menu (bug 1995705) 2025-10-22 19:45:52 +02:00
calixteman
1a8689b9be
Merge pull request #20340 from Aditi-1400/serialize-pattern-ab
Serialize pattern data into ArrayBuffer
2025-10-22 11:05:22 +02:00
legraina
a932804fb5
A new CurrentPointers class to store current pointers used by the editor
Move current pointer field of DrawingEditor to CurrentPointer class in tools.js: The pointer types fields have been moved to a CurrentPointer object in tools.js. This object is used by eraser.js and ink.js.
Only reset pointer type when user select a new mode: Clear the pointer type when changing mode, instead of at the end of the session. It seems more stable, as the method is not called this way when the user changes pages. Also, clear the pointer type when the mode is changed by an event (the user changes the editor type), otherwise, the same pointer type is kept (the document is changed for example)
2025-10-21 17:00:08 -04:00
Calixte Denizet
9205305dbb Add a highlightSpan function in order to simplify a bit the integration tests 2025-10-19 19:37:41 +02:00
Calixte Denizet
199b3d04df Fix stream use when getting the text (follow-up of #20373) 2025-10-18 22:58:27 +02:00
calixteman
b0e8c39f31
Merge pull request #20373 from calixteman/get_original_stream
Use stream for whatever substrem in stream classes
2025-10-18 14:53:49 +02:00
Calixte Denizet
05f368056d Use stream for whatever substrem in stream classes
and add a method in order to get the original stream.
When writing an existing stream it'll help to have the original one instead of the filtered one.
2025-10-17 22:26:05 +02:00
Tim van der Meij
bd0bf03a68
Merge pull request #20375 from calixteman/fix_color_copy_paste
[Editor] Make sure the color picker has the right color when pasting an editor
2025-10-17 21:05:44 +02:00
Calixte Denizet
97fec3ab81 [Editor] Make sure the color picker has the right color when pasting an editor 2025-10-17 19:37:05 +02:00
Calixte Denizet
18a7a82c29 [Editor] FreeText annotations aren't supposed to have an attached popup so disable commenting for them (bug 1995028) 2025-10-17 18:33:15 +02:00
calixteman
928a758811
Merge pull request #20372 from calixteman/bug1994958
[Editor] Fix the tooltip of the comment button when in the editor toolbar (bug 1994958)
2025-10-17 16:20:30 +02:00
Calixte Denizet
54ffd860ec [Editor] Fix the tooltip of the comment button when in the editor toolbar (bug 1994958) 2025-10-17 15:47:55 +02:00
Tim van der Meij
1c1becf60b
Merge pull request #20369 from calixteman/bug1994738
[Editor] Correctly focus the annotation once the comment has been removed in the annotation layer (bug 1994738)
2025-10-16 20:43:55 +02:00
Calixte Denizet
fd3f7528b6 [Editor] Correctly focus the annotation once the comment has been removed in the annotation layer (bug 1994738) 2025-10-16 16:12:36 +02:00
Calixte Denizet
bb2a1126e6 Use a binary format for the glyph paths
We used a SVG string which can be pass to the Path2D ctor but it's a bit slower than
building the path step by step.
Having numerical data instead of a string will help the font data serialization.
2025-10-16 15:52:51 +02:00
Nicolò Ribaudo
d79651e797
Reset sameLineText dependencies data on setTextMatrix
The position of the text rendered by `showText` is affected
incrementally by the preceding `showText` operations "on the same line".
For this reason, we keep track of all of them (with their dependencies)
in `sameLineText`.

`sameLineText` can be reset whenever we explicitly position the text
somewhere else. We were previously only doing it for `moveText`, and
this patch updates the code to also do it on `setTextMatrix` (which
resets `this.current.x/y` in `CanvasGraphics` to 0).

The complexity of subsequent `sameLineText` operations dependency
tracking grows quadratically with the number of operations on the same
line, so this patch fixes the performance problem when there are whole
pages of text that only use `setTextMatrix` and not `moveText`.
2025-10-15 17:56:30 +02:00
Calixte Denizet
aab521327b Very slightly improve intersector performance
It just avoid useless computations.
2025-10-13 14:55:44 +02:00
Aditi
fa631806bf Serialize pattern data into ArrayBuffer
Follow up on https://github.com/mozilla/pdf.js/pull/20197,
This serializes pattern data into an ArrayBuffer which is
then transferred from the worker to the main thread.

It sets up the stage for us to eventually switch to a
SharedArrayBuffer in the future.
2025-10-11 01:58:07 +05:30
calixteman
30fdf16071
Merge pull request #20354 from Aditi-1400/use-enum
Use enums instead of string for mesh shading figure type
2025-10-10 18:49:50 +02:00
calixteman
0d8a300777
Merge pull request #20353 from calixteman/improve_intersector
[Annotation] Improve the performance of the code for getting glyphs which belongs to annotations bounding boxes (bug 1987914)
2025-10-10 13:31:03 +02:00