1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/web
Calixte Denizet 117bbf7cd9 [api-minor] Don't normalize the text used in the text layer.
Some arabic chars like \ufe94 could be searched in a pdf, hence it must be normalized
when creating the search query. So to avoid to duplicate the normalization code,
everything is moved in the find controller.
The previous code to normalize text was using NFKC but with a hardcoded map, hence it
has been replaced by the use of normalize("NFKC") (it helps to reduce the bundle size
by 30kb).
In playing with this \ufe94 char, I noticed that the bidi algorithm wasn't taking into
account some RTL unicode ranges, the generated font wasn't embedding the mapping this
char and the unicode ranges in the OS/2 table weren't up-to-date.

When normalized some chars can be replaced by several ones and it induced to have
some extra chars in the text layer. To avoid any regression, when copying some text
from the text layer, a copied string is normalized (NFKC) before being put in the
clipboard (it works like this in either Acrobat or Chrome).
2023-04-17 14:31:23 +02:00
..
images Remove shadow around each pages (fix issue #15836) 2023-01-02 14:58:53 +01:00
.gitignore Remove obselete file from .gitignore 2015-01-26 16:44:45 +01:00
annotation_editor_layer_builder.css Use cursor:move for draggable texts and drawings (Bug 1804252) 2023-03-22 09:49:43 +01:00
annotation_editor_layer_builder.js [Editor] Make the annotation editor layer invisible when disabled and empty 2023-02-01 17:53:44 +01:00
annotation_editor_params.js Reduce duplication when dispatching the "switchannotationeditorparams" event 2023-04-03 09:05:07 +02:00
annotation_layer_builder.css [Annotation] Don't rotate an annotation when it has the NoRotate flag 2023-03-06 17:27:11 +01:00
annotation_layer_builder.js Handle possibly undefined parameters *once* per AnnotationLayer.render invocation 2022-12-14 12:23:24 +01:00
app.js Create the "hiddenCopyElement" in the PDFViewer constructor (PR 16286 follow-up) 2023-04-16 09:14:05 +02:00
app_options.js [GeckoView] Show the download button by default and add a pref to disable it (bug 1827963) 2023-04-13 20:33:03 +02:00
base_tree_viewer.js Use modern DOM methods a bit more (PR 15031 follow-up) 2022-06-13 10:47:37 +02:00
chrome-i18n-allow-access-to-file-urls.json Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
chromecom.js Move rewriteUrlClosure into the web/chromecom.js file 2023-02-09 11:18:08 +01:00
compressed.tracemonkey-pldi-09.pdf Add Makefile. Move some files around to make building the website easier. 2011-07-05 10:53:57 -07:00
debugger.css Enable the declaration-block-no-redundant-longhand-properties Stylelint rule 2023-03-25 10:08:27 +01:00
debugger.js Prevent the debugger from breaking on unbalanced save/restore OPS (issue 15767) 2022-12-01 15:43:17 +01:00
download_manager.js Remove inline opening of PDF attachments in the COMPONENTS build 2023-02-06 12:02:22 +01:00
event_utils.js Use private fields in a few more viewer classes 2022-11-04 15:29:45 +01:00
firefox_print_service.js Convert FirefoxPrintService and PDFPrintService into standard classes 2023-04-14 10:02:28 +02:00
firefoxcom.js [api-minor] Add support, in PDFFindController, for mixing phrase/word searches (issue 7442) 2023-04-15 13:32:37 +02:00
generic_scripting.js [JS] Use beforeinput event to trigger a keystroke event in the sandbox 2022-01-23 19:53:01 +01:00
genericcom.js Remove the unused DefaultExternalServices.createDownloadManager options (PR 12191 follow-up) 2022-12-03 12:52:36 +01:00
genericl10n.js Fix broken/missing JSDocs and typedefs, to allow updating TypeScript to the latest version (issue 14342) 2021-12-15 23:14:25 +01:00
grab_to_pan.js Enable the unicorn/prefer-dom-node-append ESLint plugin rule 2022-06-12 13:07:03 +02:00
interfaces.js Change the finishPaintTask/finishPaintTask helpers into private methods 2023-04-02 15:23:45 +02:00
l10n_utils.js Enable the unicorn/prefer-string-replace-all ESLint plugin rule 2023-03-23 12:57:10 +01:00
overlay_manager.js Use modern DOM methods a bit more (PR 15031 follow-up) 2022-06-13 10:47:37 +02:00
password_prompt.js Improve handling of the "Cancel"-button in the password dialog 2022-08-22 11:17:08 +02:00
pdf_attachment_viewer.js Support FileAttachments with hash-signs in the filename (issue 15729) 2022-11-23 10:47:33 +01:00
pdf_cursor_tools.js [GeckoView] Reduce the size of the *built* viewer 2023-02-05 14:12:32 +01:00
pdf_document_properties.js Ensure that the contentDispositionFilename is always respected, when setting the document title (PR 13014 follow-up) 2022-05-28 12:39:49 +02:00
pdf_find_bar.js [api-minor] Add support, in PDFFindController, for mixing phrase/word searches (issue 7442) 2023-04-15 13:32:37 +02:00
pdf_find_controller.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
pdf_find_utils.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
pdf_history.js Tweak the pdfOpenParams parameter, in the "updateviewarea" event, in PresentationMode 2022-04-05 14:13:20 +02:00
pdf_layer_viewer.js [api-minor] Add basic support for the SetOCGState action (issue 15372) 2022-09-01 17:34:24 +02:00
pdf_link_service.js [api-minor] Add support, in PDFFindController, for mixing phrase/word searches (issue 7442) 2023-04-15 13:32:37 +02:00
pdf_outline_viewer.js [api-minor] Add partial support for the "GoToE" action (issue 8844) 2022-10-06 10:33:07 +02:00
pdf_page_view.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
pdf_presentation_mode.js Prevent mouse interaction with form elements in PresentationMode (issue 12232) 2022-10-30 21:55:44 +01:00
pdf_print_service.js Convert FirefoxPrintService and PDFPrintService into standard classes 2023-04-14 10:02:28 +02:00
pdf_rendering_queue.js Move the Default{...}LayerFactory into a new web/default_factory.js file 2021-12-15 23:17:08 +01:00
pdf_scripting_manager.js [GeckoView] Introduce a development mode constant to tell the viewers apart 2023-02-07 16:07:12 +01:00
pdf_sidebar.js Reduce some duplication when toggling buttons in the viewer toolbars 2023-04-13 13:18:37 +02:00
pdf_sidebar_resizer.js Introduce a viewer constant for document.documentElement.style 2022-05-25 09:55:54 +02:00
pdf_single_page_viewer.js Remove the abstract BaseViewer-class 2022-09-08 12:38:17 +02:00
pdf_thumbnail_view.js Change the finishPaintTask/finishPaintTask helpers into private methods 2023-04-02 15:23:45 +02:00
pdf_thumbnail_viewer.js Remove the unused eventBus option in PDFThumbnailViewer (PR 15215 follow-up) 2023-02-12 18:38:31 +01:00
pdf_viewer.component.js [api-minor] Remove the xfaLayerFactory in the viewer 2022-12-18 13:26:54 +01:00
pdf_viewer.css Add the possibility to copy all the pdf text whatever the rendered pages are (bug 1788035) 2023-04-15 18:59:40 +02:00
pdf_viewer.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
pdfjs.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
preferences.js Revert Preferences to their previous values, when writing to storage failed 2022-03-12 17:25:45 +01:00
print_utils.js Enable the unicorn/prefer-dom-node-append ESLint plugin rule 2022-06-12 13:07:03 +02:00
secondary_toolbar.js Reduce some duplication when toggling buttons in the viewer toolbars 2023-04-13 13:18:37 +02:00
struct_tree_layer_builder.js Hide the struct tree layer during zooming 2023-02-07 15:33:01 +01:00
stubs-geckoview.js [GeckoView] Reduce the size of the *built* viewer 2023-02-05 14:12:32 +01:00
text_accessibility.js Move binarySearchFirstItem back to the web/-folder (PR 15237 follow-up) 2022-08-14 11:38:17 +02:00
text_highlighter.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
text_layer_builder.css Introduce inset usage in the CSS files 2023-03-19 14:32:37 +01:00
text_layer_builder.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
toolbar-geckoview.js [GeckoView] Show the download button by default and add a pref to disable it (bug 1827963) 2023-04-13 20:33:03 +02:00
toolbar.js Reduce some duplication when toggling buttons in the viewer toolbars 2023-04-13 13:18:37 +02:00
ui_utils.js Reduce some duplication when toggling buttons in the viewer toolbars 2023-04-13 13:18:37 +02:00
view_history.js Add a bit more validation in the ViewHistory constructor 2020-03-21 13:55:06 +01:00
viewer-geckoview.css [GeckoView] Show the download button by default and add a pref to disable it (bug 1827963) 2023-04-13 20:33:03 +02:00
viewer-geckoview.html Create the "hiddenCopyElement" in the PDFViewer constructor (PR 16286 follow-up) 2023-04-16 09:14:05 +02:00
viewer-geckoview.js Create the "hiddenCopyElement" in the PDFViewer constructor (PR 16286 follow-up) 2023-04-16 09:14:05 +02:00
viewer-snippet-chrome-extension.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer-snippet-chrome-overlays.html Convert the existing overlays to use <dialog> elements (issue 14698) 2022-03-28 11:36:29 +02:00
viewer-snippet-firefox-extension.html Remove <base> tag from the Firefox built-in viewer (bug 1821408) 2023-03-14 10:12:42 +01:00
viewer-snippet-minified.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer-snippet.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer.css [Firefox] Use float: inline-start/inline-end directly in MOZCENTRAL builds (PR 15968 follow-up) 2023-04-10 16:26:19 +02:00
viewer.html Create the "hiddenCopyElement" in the PDFViewer constructor (PR 16286 follow-up) 2023-04-16 09:14:05 +02:00
viewer.js Use CustomEvent when dispatching the "webviewerloaded" event 2023-04-16 15:36:19 +02:00
xfa_layer_builder.css Use consistent forced-colors media-queries throughout the CSS files 2023-01-18 10:49:52 +01:00
xfa_layer_builder.js Change the XfaLayerBuilder.render method to be asynchronous 2022-12-11 13:08:23 +01:00