2013-11-23 04:10:43 +09:00
<!DOCTYPE html>
2012-09-01 07:48:21 +09:00
<!--
Copyright 2012 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2014-03-11 05:03:35 +09:00
2015-06-30 16:33:25 +09:00
Adobe CMap resources are covered by their own copyright but the same license:
Copyright 1990-2015 Adobe Systems Incorporated.
See https://github.com/adobe-type-tools/cmap-resources
2012-09-01 07:48:21 +09:00
-->
2018-01-20 06:05:50 +09:00
< html dir = "ltr" mozdisallowselectionprint >
2012-04-12 08:12:51 +09:00
< head >
2012-05-01 11:55:21 +09:00
< meta charset = "utf-8" >
2012-05-24 06:50:54 +09:00
< meta name = "viewport" content = "width=device-width, initial-scale=1, maximum-scale=1" >
2013-07-16 07:13:05 +09:00
<!-- #if GENERIC || CHROME -->
< meta name = "google" content = "notranslate" >
<!-- #endif -->
2012-04-19 04:02:49 +09:00
< title > PDF.js viewer< / title >
2012-08-02 03:29:13 +09:00
2020-01-08 21:57:31 +09:00
<!-- #if MOZCENTRAL -->
2012-08-02 03:29:13 +09:00
<!-- #include viewer - snippet - firefox - extension.html -->
2023-03-19 01:17:46 +09:00
<!-- #elif CHROME -->
[CRX] Show nicely formatted URL in omnibox
Before commit:
chrome-extension://EXTENSIONID/content/web/viewer.html?file=http%3A%2F%2Fexample.com%2Ffile.pdf
After commit:
chrome-extension://EXTENSIONID/http://example/file.pdf
Technical details:
- The extension's background page uses the webRequest API to intercept
requests for <extension host>/<real path to pdf>, and redirect it to
the viewer's URL.
- viewer.js uses history.replaceState to rewrite the URL, so that it's
easier for users to recognize and copy-paste URLs.
- The fake paths /http:, /https:, /file:, etc. have been added to the
web_accessible_resources section of the manifest file, in order to
avoid seeing chrome-extension://invalid/ instead of the actual URL
when using history back/forward to navigate from/to the PDF viewer.
- Since the relative path resolving doesn't work because relative URLs
are inaccurate, a <base> tag has been added. This method has already
been proven to work in the Firefox add-on.
Notes:
- This commit has been cherry-picked from crx-using-streams-api.
- Need to merge https://github.com/mozilla/pdf.js/pull/3582 to deal with
a bug in Chrome <=30
- In Chrome, getting the contents of a FTP file is not possible, so
there's no support for FTP files, even though the extension router
recognizes the ftp: scheme.
2013-08-16 05:47:30 +09:00
<!-- #include viewer - snippet - chrome - extension.html -->
2023-03-19 01:17:46 +09:00
<!-- #else -->
<!-- #include viewer - snippet.html -->
2012-08-02 03:29:13 +09:00
<!-- #endif -->
2012-04-12 08:12:51 +09:00
2023-03-14 00:56:42 +09:00
<!-- #if MOZCENTRAL -->
<!-- <link rel="stylesheet" href="resource://pdf.js/web/viewer.css"> -->
2023-10-13 23:23:17 +09:00
<!-- <link rel="localization" href="toolkit/pdfviewer/viewer.ftl"/> -->
2023-03-14 00:56:42 +09:00
<!-- #else -->
2016-02-14 21:23:34 +09:00
< link rel = "stylesheet" href = "viewer.css" >
2023-03-14 00:56:42 +09:00
<!-- #endif -->
2023-03-19 01:17:46 +09:00
<!-- #if MOZCENTRAL -->
[api-major] Output JavaScript modules in the builds (issue 10317)
At this point in time all browsers, and also Node.js, support standard `import`/`export` statements and we can now finally consider outputting modern JavaScript modules in the builds.[1]
In order for this to work we can *only* use proper `import`/`export` statements throughout the main code-base, and (as expected) our Node.js support made this much more complicated since both the official builds and the GitHub Actions-based tests must keep working.[2]
One remaining issue is that the `pdf.scripting.js` file cannot be built as a JavaScript module, since doing so breaks PDF scripting.
Note that my initial goal was to try and split these changes into a couple of commits, however that unfortunately didn't really work since it turned out to be difficult for smaller patches to work correctly and pass (all) tests that way.[3]
This is a classic case of every change requiring a couple of other changes, with each of those changes requiring further changes in turn and the size/scope quickly increasing as a result.
One possible "issue" with these changes is that we'll now only output JavaScript modules in the builds, which could perhaps be a problem with older tools. However it unfortunately seems far too complicated/time-consuming for us to attempt to support both the old and modern module formats, hence the alternative would be to do "nothing" here and just keep our "old" builds.[4]
---
[1] The final blocker was module support in workers in Firefox, which was implemented in Firefox 114; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility
[2] It's probably possible to further improve/simplify especially the Node.js-specific code, but it does appear to work as-is.
[3] Having partially "broken" patches, that fail tests, as part of the commit history is *really not* a good idea in general.
[4] Outputting JavaScript modules was first requested almost five years ago, see issue 10317, and nowadays there *should* be much better support for JavaScript modules in various tools.
2023-09-28 20:00:10 +09:00
<!-- <script src="resource://pdf.js/web/viewer.mjs" type="module"></script> -->
2023-09-28 17:07:26 +09:00
<!-- #elif !MOZCENTRAL -->
[api-major] Output JavaScript modules in the builds (issue 10317)
At this point in time all browsers, and also Node.js, support standard `import`/`export` statements and we can now finally consider outputting modern JavaScript modules in the builds.[1]
In order for this to work we can *only* use proper `import`/`export` statements throughout the main code-base, and (as expected) our Node.js support made this much more complicated since both the official builds and the GitHub Actions-based tests must keep working.[2]
One remaining issue is that the `pdf.scripting.js` file cannot be built as a JavaScript module, since doing so breaks PDF scripting.
Note that my initial goal was to try and split these changes into a couple of commits, however that unfortunately didn't really work since it turned out to be difficult for smaller patches to work correctly and pass (all) tests that way.[3]
This is a classic case of every change requiring a couple of other changes, with each of those changes requiring further changes in turn and the size/scope quickly increasing as a result.
One possible "issue" with these changes is that we'll now only output JavaScript modules in the builds, which could perhaps be a problem with older tools. However it unfortunately seems far too complicated/time-consuming for us to attempt to support both the old and modern module formats, hence the alternative would be to do "nothing" here and just keep our "old" builds.[4]
---
[1] The final blocker was module support in workers in Firefox, which was implemented in Firefox 114; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility
[2] It's probably possible to further improve/simplify especially the Node.js-specific code, but it does appear to work as-is.
[3] Having partially "broken" patches, that fail tests, as part of the commit history is *really not* a good idea in general.
[4] Outputting JavaScript modules was first requested almost five years ago, see issue 10317, and nowadays there *should* be much better support for JavaScript modules in various tools.
2023-09-28 20:00:10 +09:00
<!-- <script src="viewer.mjs" type="module"></script> -->
2023-03-19 20:42:22 +09:00
<!-- #elif /* Development mode. */ -->
2023-10-13 23:23:17 +09:00
< link rel = "resource" type = "application/l10n" href = "locale/locale.json" >
2012-08-02 03:29:13 +09:00
2022-04-02 20:00:25 +09:00
< script type = "importmap" >
2020-05-20 01:00:23 +09:00
{
"imports": {
"pdfjs/": "../src/",
"pdfjs-lib": "../src/pdf.js",
2022-07-07 06:02:53 +09:00
"pdfjs-web/": "./",
2023-02-04 21:55:12 +09:00
2023-10-13 23:23:17 +09:00
"fluent-bundle": "../node_modules/@fluent/bundle/esm/index.js",
"fluent-dom": "../node_modules/@fluent/dom/esm/index.js",
"cached-iterable": "../node_modules/cached-iterable/src/index.mjs",
2023-07-13 18:58:16 +09:00
"display-fetch_stream": "../src/display/fetch_stream.js",
"display-network": "../src/display/network.js",
"display-node_stream": "../src/display/stubs.js",
"display-node_utils": "../src/display/stubs.js",
2023-09-21 19:51:34 +09:00
"web-alt_text_manager": "./alt_text_manager.js",
2023-02-04 21:55:12 +09:00
"web-annotation_editor_params": "./annotation_editor_params.js",
2024-01-26 19:50:25 +09:00
"web-download_manager": "./download_manager.js",
2024-01-26 22:31:42 +09:00
"web-external_services": "./genericcom.js",
2024-01-31 02:32:35 +09:00
"web-null_l10n": "./genericl10n.js",
2023-02-04 21:55:12 +09:00
"web-pdf_attachment_viewer": "./pdf_attachment_viewer.js",
"web-pdf_cursor_tools": "./pdf_cursor_tools.js",
"web-pdf_document_properties": "./pdf_document_properties.js",
"web-pdf_find_bar": "./pdf_find_bar.js",
"web-pdf_layer_viewer": "./pdf_layer_viewer.js",
"web-pdf_outline_viewer": "./pdf_outline_viewer.js",
"web-pdf_presentation_mode": "./pdf_presentation_mode.js",
"web-pdf_sidebar": "./pdf_sidebar.js",
"web-pdf_thumbnail_viewer": "./pdf_thumbnail_viewer.js",
2024-01-26 20:04:54 +09:00
"web-preferences": "./genericcom.js",
2023-02-06 00:13:18 +09:00
"web-print_service": "./pdf_print_service.js",
2023-02-04 21:55:12 +09:00
"web-secondary_toolbar": "./secondary_toolbar.js",
"web-toolbar": "./toolbar.js"
2020-05-20 01:00:23 +09:00
}
}
< / script >
2022-04-02 20:00:25 +09:00
< script src = "viewer.js" type = "module" > < / script >
2012-08-02 03:29:13 +09:00
<!-- #endif -->
2012-04-12 08:12:51 +09:00
< / head >
2011-05-26 23:02:52 +09:00
Let the loadingBar have the same width as the viewerContainer
For years the loadingBar and sidebarContainer has had a slightly annoying and unfortunate dependency, since the loadingBar width follows the main toolbar width[1].
To prevent the loadingBar from obscuring part of the sidebarContainer, especially the buttons, the sidebarContainer is thus moved down when the loadingBar is visible. This has always annoyed me[2], since it means that the buttons in the sidebar may thus move vertically which seems bad from a UX perspective.
Now that CSS variables are available in all supported browsers[3] however, fixing the loadingBar/sidebarContainer overlap issues are finally easy. The solution is simply to let the sidebarContainer, when visible, control the loadingBar left position (right in RTL locales) in the same way that the viewerContainer is handled. Hence the sidebarContainer can now have a *consistent* vertical postition, without the loadingBar overlapping it.
---
[1] Obviously the right position (left in RTL locales) of the loadingBar is, potentially, reduced to account for a scrollbar.
[2] I've tried to fix this a few times, but it always seemed like more trouble than it's worth.
[3] https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties#Browser_compatibility
2020-09-08 21:13:10 +09:00
< body tabindex = "1" >
2014-08-17 07:22:05 +09:00
< div id = "outerContainer" >
2011-07-29 02:48:05 +09:00
2012-04-26 05:46:17 +09:00
< div id = "sidebarContainer" >
2012-10-30 06:35:07 +09:00
< div id = "toolbarSidebar" >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< div id = "toolbarSidebarLeft" >
2022-02-11 22:04:47 +09:00
< div id = "sidebarViewButtons" class = "splitToolbarButton toggled" role = "radiogroup" >
2023-10-13 23:23:17 +09:00
< button id = "viewThumbnail" class = "toolbarButton toggled" title = "Show Thumbnails" tabindex = "2" data-l10n-id = "pdfjs-thumbs-button" role = "radio" aria-checked = "true" aria-controls = "thumbnailView" >
< span data-l10n-id = "pdfjs-thumbs-button-label" > Thumbnails< / span >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "viewOutline" class = "toolbarButton" title = "Show Document Outline (double-click to expand/collapse all items)" tabindex = "3" data-l10n-id = "pdfjs-document-outline-button" role = "radio" aria-checked = "false" aria-controls = "outlineView" >
< span data-l10n-id = "pdfjs-document-outline-button-label" > Document Outline< / span >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "viewAttachments" class = "toolbarButton" title = "Show Attachments" tabindex = "4" data-l10n-id = "pdfjs-attachments-button" role = "radio" aria-checked = "false" aria-controls = "attachmentsView" >
< span data-l10n-id = "pdfjs-attachments-button-label" > Attachments< / span >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "viewLayers" class = "toolbarButton" title = "Show Layers (double-click to reset all layers to the default state)" tabindex = "5" data-l10n-id = "pdfjs-layers-button" role = "radio" aria-checked = "false" aria-controls = "layersView" >
< span data-l10n-id = "pdfjs-layers-button-label" > Layers< / span >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< / button >
< / div >
< / div >
< div id = "toolbarSidebarRight" >
2023-12-19 18:01:16 +09:00
< div id = "outlineOptionsContainer" >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< div class = "verticalToolbarSeparator" > < / div >
2023-10-13 23:23:17 +09:00
< button id = "currentOutlineItem" class = "toolbarButton" disabled = "disabled" title = "Find Current Outline Item" tabindex = "6" data-l10n-id = "pdfjs-current-outline-item-button" >
< span data-l10n-id = "pdfjs-current-outline-item-button-label" > Current Outline Item< / span >
Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.
Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:
- The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.
- With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.
- The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.
- Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.
Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.
---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.
[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2020-12-25 20:57:43 +09:00
< / button >
< / div >
2012-10-30 06:35:07 +09:00
< / div >
2011-07-29 02:48:05 +09:00
< / div >
2012-04-26 03:34:28 +09:00
< div id = "sidebarContent" >
< div id = "thumbnailView" >
2012-04-12 08:12:51 +09:00
< / div >
2012-04-26 03:34:28 +09:00
< div id = "outlineView" class = "hidden" >
2012-04-12 08:12:51 +09:00
< / div >
2014-03-19 05:32:47 +09:00
< div id = "attachmentsView" class = "hidden" >
< / div >
[api-minor] Add support for toggling of Optional Content in the viewer (issue 12096)
*Besides, obviously, adding viewer support:* This patch attempts to improve the general API for Optional Content Groups slightly, by adding a couple of new methods for interacting with the (more complex) data structures of `OptionalContentConfig`-instances. (Thus allowing us to mark some of the data as "private", given that it probably shouldn't be manipulated directly.)
By utilizing not just the "raw" Optional Content Groups, but the data from the `/Order` array when available, we can thus display the Layers in a proper tree-structure with collapsible headings for PDF documents that utilizes that feature.
Note that it's possible to reset all Optional Content Groups to their default visibility state, simply by double-clicking on the Layers-button in the sidebar.
(Currently that's indicated in the Layers-button tooltip, which is obviously easy to overlook, however it's probably the best we can do for now without adding more buttons, or even a dropdown-toolbar, to the sidebar.)
Also, the current Layers-button icons are a little rough around the edges, quite literally, but given that the viewer will soon have its UI modernized anyway they hopefully suffice in the meantime.
To give users *full* control of the visibility of the various Optional Content Groups, even those which according to the `/Order` array should not (by default) be toggleable in the UI, this patch will place those under a *custom* heading which:
- Is collapsed by default, and placed at the bottom of the Layers-tree, to be a bit less obtrusive.
- Uses a slightly different formatting, compared to the "regular" headings.
- Is localizable.
Finally, note that the thumbnails are *purposely* always rendered with all Optional Content Groups at their default visibility state, since that seems the most useful and it's also consistent with other viewers.
To ensure that this works as intended, we'll thus disable the `PDFThumbnailView.setImage` functionality when the Optional Content Groups have been changed in the viewer. (This obviously means that we'll re-render thumbnails instead of using the rendered pages. However, this situation ought to be rare enough for this to not really be a problem.)
2020-08-07 04:01:03 +09:00
< div id = "layersView" class = "hidden" >
< / div >
2011-08-22 11:05:10 +09:00
< / div >
2020-09-09 20:29:44 +09:00
< div id = "sidebarResizer" > < / div >
2012-04-26 03:34:28 +09:00
< / div > <!-- sidebarContainer -->
< div id = "mainContainer" >
2017-03-09 07:54:28 +09:00
< div class = "findbar hidden doorHanger" id = "findbar" >
< div id = "findbarInputContainer" >
2023-11-16 22:24:16 +09:00
< span class = "loadingInput end" >
< input id = "findInput" class = "toolbarField" title = "Find" placeholder = "Find in document…" tabindex = "91" data-l10n-id = "pdfjs-find-input" aria-invalid = "false" >
< / span >
2017-03-09 07:54:28 +09:00
< div class = "splitToolbarButton" >
2023-10-13 23:23:17 +09:00
< button id = "findPrevious" class = "toolbarButton" title = "Find the previous occurrence of the phrase" tabindex = "92" data-l10n-id = "pdfjs-find-previous-button" >
< span data-l10n-id = "pdfjs-find-previous-button-label" > Previous< / span >
2017-03-09 07:54:28 +09:00
< / button >
< div class = "splitToolbarButtonSeparator" > < / div >
2023-10-13 23:23:17 +09:00
< button id = "findNext" class = "toolbarButton" title = "Find the next occurrence of the phrase" tabindex = "93" data-l10n-id = "pdfjs-find-next-button" >
< span data-l10n-id = "pdfjs-find-next-button-label" > Next< / span >
2017-03-09 07:54:28 +09:00
< / button >
< / div >
< / div >
2018-09-01 08:28:19 +09:00
< div id = "findbarOptionsOneContainer" >
2017-03-09 07:54:28 +09:00
< input type = "checkbox" id = "findHighlightAll" class = "toolbarField" tabindex = "94" >
2023-10-13 23:23:17 +09:00
< label for = "findHighlightAll" class = "toolbarLabel" data-l10n-id = "pdfjs-find-highlight-checkbox" > Highlight All< / label >
2017-03-09 07:54:28 +09:00
< input type = "checkbox" id = "findMatchCase" class = "toolbarField" tabindex = "95" >
2023-10-13 23:23:17 +09:00
< label for = "findMatchCase" class = "toolbarLabel" data-l10n-id = "pdfjs-find-match-case-checkbox-label" > Match Case< / label >
2017-03-09 07:54:28 +09:00
< / div >
2018-09-01 08:28:19 +09:00
< div id = "findbarOptionsTwoContainer" >
2021-04-19 06:37:22 +09:00
< input type = "checkbox" id = "findMatchDiacritics" class = "toolbarField" tabindex = "96" >
2023-10-13 23:23:17 +09:00
< label for = "findMatchDiacritics" class = "toolbarLabel" data-l10n-id = "pdfjs-find-match-diacritics-checkbox-label" > Match Diacritics< / label >
2021-04-19 06:37:22 +09:00
< input type = "checkbox" id = "findEntireWord" class = "toolbarField" tabindex = "97" >
2023-10-13 23:23:17 +09:00
< label for = "findEntireWord" class = "toolbarLabel" data-l10n-id = "pdfjs-find-entire-word-checkbox-label" > Whole Words< / label >
2021-04-19 06:37:22 +09:00
< / div >
2022-04-01 06:12:56 +09:00
< div id = "findbarMessageContainer" aria-live = "polite" >
2022-02-04 06:16:56 +09:00
< span id = "findResultsCount" class = "toolbarLabel" > < / span >
2017-03-09 07:54:28 +09:00
< span id = "findMsg" class = "toolbarLabel" > < / span >
2012-10-06 09:15:06 +09:00
< / div >
2013-09-05 06:48:31 +09:00
< / div > <!-- findbar -->
2023-11-23 03:02:42 +09:00
< div class = "editorParamsToolbar hidden doorHangerRight" id = "editorHighlightParamsToolbar" >
2023-12-01 00:21:13 +09:00
< div id = "highlightParamsToolbarContainer" class = "editorParamsToolbarContainer" >
< div id = "editorHighlightColorPicker" class = "colorPicker" >
< span id = "highlightColorPickerLabel" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-highlight-colorpicker-label" > Highlight color< / span >
2023-11-23 03:02:42 +09:00
< / div >
2024-01-23 05:27:45 +09:00
< div id = "editorHighlightThickness" >
< label for = "editorFreeHighlightThickness" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-free-highlight-thickness-input" > Thickness< / label >
< div class = "thicknessPicker" >
2024-01-26 03:50:18 +09:00
< input type = "range" id = "editorFreeHighlightThickness" class = "editorParamsSlider" data-l10n-id = "pdfjs-editor-free-highlight-thickness-title" value = "12" min = "8" max = "24" step = "1" tabindex = "101" >
2024-01-23 05:27:45 +09:00
< / div >
< / div >
2023-11-23 03:02:42 +09:00
< / div >
< / div >
2022-06-14 01:23:10 +09:00
< div class = "editorParamsToolbar hidden doorHangerRight" id = "editorFreeTextParamsToolbar" >
< div class = "editorParamsToolbarContainer" >
< div class = "editorParamsSetter" >
2023-10-13 23:23:17 +09:00
< label for = "editorFreeTextColor" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-free-text-color-input" > Color< / label >
2023-11-23 03:02:42 +09:00
< input type = "color" id = "editorFreeTextColor" class = "editorParamsColor" tabindex = "102" >
2022-06-14 01:23:10 +09:00
< / div >
< div class = "editorParamsSetter" >
2023-10-13 23:23:17 +09:00
< label for = "editorFreeTextFontSize" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-free-text-size-input" > Size< / label >
2023-11-23 03:02:42 +09:00
< input type = "range" id = "editorFreeTextFontSize" class = "editorParamsSlider" value = "10" min = "5" max = "100" step = "1" tabindex = "103" >
2022-06-14 01:23:10 +09:00
< / div >
< / div >
< / div >
< div class = "editorParamsToolbar hidden doorHangerRight" id = "editorInkParamsToolbar" >
< div class = "editorParamsToolbarContainer" >
< div class = "editorParamsSetter" >
2023-10-13 23:23:17 +09:00
< label for = "editorInkColor" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-ink-color-input" > Color< / label >
2023-11-23 03:02:42 +09:00
< input type = "color" id = "editorInkColor" class = "editorParamsColor" tabindex = "104" >
2022-06-14 01:23:10 +09:00
< / div >
< div class = "editorParamsSetter" >
2023-10-13 23:23:17 +09:00
< label for = "editorInkThickness" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-ink-thickness-input" > Thickness< / label >
2023-11-23 03:02:42 +09:00
< input type = "range" id = "editorInkThickness" class = "editorParamsSlider" value = "1" min = "1" max = "20" step = "1" tabindex = "105" >
2022-06-14 01:23:10 +09:00
< / div >
2022-07-25 05:19:09 +09:00
< div class = "editorParamsSetter" >
2023-10-13 23:23:17 +09:00
< label for = "editorInkOpacity" class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-ink-opacity-input" > Opacity< / label >
2023-11-23 03:02:42 +09:00
< input type = "range" id = "editorInkOpacity" class = "editorParamsSlider" value = "100" min = "1" max = "100" step = "1" tabindex = "106" >
2022-07-25 05:19:09 +09:00
< / div >
2022-06-14 01:23:10 +09:00
< / div >
< / div >
2023-08-09 21:07:15 +09:00
< div class = "editorParamsToolbar hidden doorHangerRight" id = "editorStampParamsToolbar" >
< div class = "editorParamsToolbarContainer" >
2023-11-23 03:02:42 +09:00
< button id = "editorStampAddImage" class = "secondaryToolbarButton" title = "Add image" tabindex = "107" data-l10n-id = "pdfjs-editor-stamp-add-image-button" >
2023-12-01 00:21:13 +09:00
< span class = "editorParamsLabel" data-l10n-id = "pdfjs-editor-stamp-add-image-button-label" > Add image< / span >
2023-08-09 21:07:15 +09:00
< / button >
< / div >
< / div >
2013-09-05 06:48:31 +09:00
< div id = "secondaryToolbar" class = "secondaryToolbar hidden doorHangerRight" >
< div id = "secondaryToolbarButtonContainer" >
2022-05-08 05:05:39 +09:00
<!-- #if GENERIC -->
2023-11-09 15:55:48 +09:00
< button id = "secondaryOpenFile" class = "secondaryToolbarButton" title = "Open File" tabindex = "51" data-l10n-id = "pdfjs-open-file-button" >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-open-file-button-label" > Open< / span >
2013-09-05 06:48:31 +09:00
< / button >
2022-04-25 17:06:47 +09:00
<!-- #endif -->
2013-09-05 06:48:31 +09:00
2023-10-13 23:23:17 +09:00
< button id = "secondaryPrint" class = "secondaryToolbarButton visibleMediumView" title = "Print" tabindex = "52" data-l10n-id = "pdfjs-print-button" >
< span data-l10n-id = "pdfjs-print-button-label" > Print< / span >
2013-09-05 06:48:31 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "secondaryDownload" class = "secondaryToolbarButton visibleMediumView" title = "Save" tabindex = "53" data-l10n-id = "pdfjs-save-button" >
< span data-l10n-id = "pdfjs-save-button-label" > Save< / span >
2013-09-05 06:48:31 +09:00
< / button >
2022-09-10 00:50:29 +09:00
<!-- #if GENERIC -->
2023-11-09 15:55:48 +09:00
< div class = "horizontalToolbarSeparator" > < / div >
2022-09-10 00:50:29 +09:00
<!-- #else -->
<!-- <div class="horizontalToolbarSeparator visibleMediumView"></div> -->
<!-- #endif -->
2022-09-03 23:17:22 +09:00
2023-10-13 23:23:17 +09:00
< button id = "presentationMode" class = "secondaryToolbarButton" title = "Switch to Presentation Mode" tabindex = "54" data-l10n-id = "pdfjs-presentation-mode-button" >
< span data-l10n-id = "pdfjs-presentation-mode-button-label" > Presentation Mode< / span >
2022-09-03 23:17:22 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< a href = "#" id = "viewBookmark" class = "secondaryToolbarButton" title = "Current Page (View URL from Current Page)" tabindex = "55" data-l10n-id = "pdfjs-bookmark-button" >
< span data-l10n-id = "pdfjs-bookmark-button-label" > Current Page< / span >
2013-09-27 18:44:45 +09:00
< / a >
2022-11-29 21:51:40 +09:00
< div id = "viewBookmarkSeparator" class = "horizontalToolbarSeparator" > < / div >
2013-09-05 06:48:31 +09:00
2023-10-13 23:23:17 +09:00
< button id = "firstPage" class = "secondaryToolbarButton" title = "Go to First Page" tabindex = "56" data-l10n-id = "pdfjs-first-page-button" >
< span data-l10n-id = "pdfjs-first-page-button-label" > Go to First Page< / span >
2013-09-05 06:48:31 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "lastPage" class = "secondaryToolbarButton" title = "Go to Last Page" tabindex = "57" data-l10n-id = "pdfjs-last-page-button" >
< span data-l10n-id = "pdfjs-last-page-button-label" > Go to Last Page< / span >
2013-09-05 06:48:31 +09:00
< / button >
< div class = "horizontalToolbarSeparator" > < / div >
2023-10-13 23:23:17 +09:00
< button id = "pageRotateCw" class = "secondaryToolbarButton" title = "Rotate Clockwise" tabindex = "58" data-l10n-id = "pdfjs-page-rotate-cw-button" >
< span data-l10n-id = "pdfjs-page-rotate-cw-button-label" > Rotate Clockwise< / span >
2013-09-05 06:48:31 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "pageRotateCcw" class = "secondaryToolbarButton" title = "Rotate Counterclockwise" tabindex = "59" data-l10n-id = "pdfjs-page-rotate-ccw-button" >
< span data-l10n-id = "pdfjs-page-rotate-ccw-button-label" > Rotate Counterclockwise< / span >
2013-09-05 06:48:31 +09:00
< / button >
2013-10-03 05:09:43 +09:00
< div class = "horizontalToolbarSeparator" > < / div >
2022-02-11 22:04:47 +09:00
< div id = "cursorToolButtons" role = "radiogroup" >
2023-10-13 23:23:17 +09:00
< button id = "cursorSelectTool" class = "secondaryToolbarButton toggled" title = "Enable Text Selection Tool" tabindex = "60" data-l10n-id = "pdfjs-cursor-text-select-tool-button" role = "radio" aria-checked = "true" >
< span data-l10n-id = "pdfjs-cursor-text-select-tool-button-label" > Text Selection Tool< / span >
2022-02-11 22:04:47 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "cursorHandTool" class = "secondaryToolbarButton" title = "Enable Hand Tool" tabindex = "61" data-l10n-id = "pdfjs-cursor-hand-tool-button" role = "radio" aria-checked = "false" >
< span data-l10n-id = "pdfjs-cursor-hand-tool-button-label" > Hand Tool< / span >
2022-02-11 22:04:47 +09:00
< / button >
< / div >
2015-02-03 00:12:52 +09:00
2014-01-22 08:07:07 +09:00
< div class = "horizontalToolbarSeparator" > < / div >
2022-02-11 22:04:47 +09:00
< div id = "scrollModeButtons" role = "radiogroup" >
2023-10-13 23:23:17 +09:00
< button id = "scrollPage" class = "secondaryToolbarButton" title = "Use Page Scrolling" tabindex = "62" data-l10n-id = "pdfjs-scroll-page-button" role = "radio" aria-checked = "false" >
< span data-l10n-id = "pdfjs-scroll-page-button-label" > Page Scrolling< / span >
2022-02-11 22:04:47 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "scrollVertical" class = "secondaryToolbarButton toggled" title = "Use Vertical Scrolling" tabindex = "63" data-l10n-id = "pdfjs-scroll-vertical-button" role = "radio" aria-checked = "true" >
< span data-l10n-id = "pdfjs-scroll-vertical-button-label" > Vertical Scrolling< / span >
2022-02-11 22:04:47 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "scrollHorizontal" class = "secondaryToolbarButton" title = "Use Horizontal Scrolling" tabindex = "64" data-l10n-id = "pdfjs-scroll-horizontal-button" role = "radio" aria-checked = "false" >
< span data-l10n-id = "pdfjs-scroll-horizontal-button-label" > Horizontal Scrolling< / span >
2022-02-11 22:04:47 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "scrollWrapped" class = "secondaryToolbarButton" title = "Use Wrapped Scrolling" tabindex = "65" data-l10n-id = "pdfjs-scroll-wrapped-button" role = "radio" aria-checked = "false" >
< span data-l10n-id = "pdfjs-scroll-wrapped-button-label" > Wrapped Scrolling< / span >
2022-02-11 22:04:47 +09:00
< / button >
< / div >
2018-05-15 12:10:32 +09:00
2021-11-29 02:36:25 +09:00
< div class = "horizontalToolbarSeparator" > < / div >
2018-05-15 12:10:32 +09:00
2022-02-11 22:04:47 +09:00
< div id = "spreadModeButtons" role = "radiogroup" >
2023-10-13 23:23:17 +09:00
< button id = "spreadNone" class = "secondaryToolbarButton toggled" title = "Do not join page spreads" tabindex = "66" data-l10n-id = "pdfjs-spread-none-button" role = "radio" aria-checked = "true" >
< span data-l10n-id = "pdfjs-spread-none-button-label" > No Spreads< / span >
2022-02-11 22:04:47 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "spreadOdd" class = "secondaryToolbarButton" title = "Join page spreads starting with odd-numbered pages" tabindex = "67" data-l10n-id = "pdfjs-spread-odd-button" role = "radio" aria-checked = "false" >
< span data-l10n-id = "pdfjs-spread-odd-button-label" > Odd Spreads< / span >
2022-02-11 22:04:47 +09:00
< / button >
2023-10-13 23:23:17 +09:00
< button id = "spreadEven" class = "secondaryToolbarButton" title = "Join page spreads starting with even-numbered pages" tabindex = "68" data-l10n-id = "pdfjs-spread-even-button" role = "radio" aria-checked = "false" >
< span data-l10n-id = "pdfjs-spread-even-button-label" > Even Spreads< / span >
2022-02-11 22:04:47 +09:00
< / button >
< / div >
2018-05-15 12:10:32 +09:00
2021-11-29 02:36:25 +09:00
< div class = "horizontalToolbarSeparator" > < / div >
2018-05-15 12:10:32 +09:00
2023-10-13 23:23:17 +09:00
< button id = "documentProperties" class = "secondaryToolbarButton" title = "Document Properties…" tabindex = "69" data-l10n-id = "pdfjs-document-properties-button" aria-controls = "documentPropertiesDialog" >
< span data-l10n-id = "pdfjs-document-properties-button-label" > Document Properties…< / span >
2014-01-22 08:07:07 +09:00
< / button >
2013-09-05 06:48:31 +09:00
< / div >
< / div > <!-- secondaryToolbar -->
2012-04-26 03:34:28 +09:00
< div class = "toolbar" >
< div id = "toolbarContainer" >
< div id = "toolbarViewer" >
< div id = "toolbarViewerLeft" >
2023-10-13 23:23:17 +09:00
< button id = "sidebarToggle" class = "toolbarButton" title = "Toggle Sidebar" tabindex = "11" data-l10n-id = "pdfjs-toggle-sidebar-button" aria-expanded = "false" aria-controls = "sidebarContainer" >
< span data-l10n-id = "pdfjs-toggle-sidebar-button-label" > Toggle Sidebar< / span >
2012-05-04 23:51:21 +09:00
< / button >
2012-04-26 03:34:28 +09:00
< div class = "toolbarButtonSpacer" > < / div >
2023-10-13 23:23:17 +09:00
< button id = "viewFind" class = "toolbarButton" title = "Find in Document" tabindex = "12" data-l10n-id = "pdfjs-findbar-button" aria-expanded = "false" aria-controls = "findbar" >
< span data-l10n-id = "pdfjs-findbar-button-label" > Find< / span >
2012-09-29 04:30:07 +09:00
< / button >
2017-03-09 07:54:28 +09:00
< div class = "splitToolbarButton hiddenSmallView" >
2023-10-13 23:23:17 +09:00
< button class = "toolbarButton" title = "Previous Page" id = "previous" tabindex = "13" data-l10n-id = "pdfjs-previous-button" >
< span data-l10n-id = "pdfjs-previous-button-label" > Previous< / span >
2012-05-04 23:51:21 +09:00
< / button >
2012-04-26 03:34:28 +09:00
< div class = "splitToolbarButtonSeparator" > < / div >
2023-10-13 23:23:17 +09:00
< button class = "toolbarButton" title = "Next Page" id = "next" tabindex = "14" data-l10n-id = "pdfjs-next-button" >
< span data-l10n-id = "pdfjs-next-button-label" > Next< / span >
2012-05-04 23:51:21 +09:00
< / button >
2012-04-26 03:34:28 +09:00
< / div >
2023-11-16 22:24:16 +09:00
< span class = "loadingInput start" >
< input type = "number" id = "pageNumber" class = "toolbarField" title = "Page" value = "1" min = "1" tabindex = "15" data-l10n-id = "pdfjs-page-input" autocomplete = "off" >
< / span >
2012-04-26 03:34:28 +09:00
< span id = "numPages" class = "toolbarLabel" > < / span >
< / div >
< div id = "toolbarViewerRight" >
2022-08-21 20:48:48 +09:00
< div id = "editorModeButtons" class = "splitToolbarButton toggled" role = "radiogroup" >
2023-12-12 01:20:56 +09:00
< button id = "editorHighlight" class = "toolbarButton" hidden = "true" disabled = "disabled" title = "Highlight" role = "radio" aria-checked = "false" aria-controls = "editorHighlightParamsToolbar" tabindex = "31" data-l10n-id = "pdfjs-editor-highlight-button" >
< span data-l10n-id = "pdfjs-editor-highlight-button-label" > Highlight< / span >
2023-12-12 01:42:43 +09:00
< / button >
2023-11-23 03:02:42 +09:00
< button id = "editorFreeText" class = "toolbarButton" disabled = "disabled" title = "Text" role = "radio" aria-checked = "false" aria-controls = "editorFreeTextParamsToolbar" tabindex = "32" data-l10n-id = "pdfjs-editor-free-text-button" >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-editor-free-text-button-label" > Text< / span >
[editor] Support disabling of editing when `pdfjs.enablePermissions` is set (issue 15049)
For encrypted PDF documents without the required permissions set, this patch adds support for disabling of Annotation-editing. However, please note that it also requires that the `pdfjs.enablePermissions` preference is set to `true` (since PDF document permissions could be seen as user hostile).[1]
As I started looking at the issue, it soon became clear that *only* trying to fix the issue without slightly re-factor the surrounding code would be somewhat difficult.
The following is an overview of the changes in this patch; sorry about the size/scope of this!
- Use a new `AnnotationEditorUIManager`-instance *for each* PDF document opened in the GENERIC viewer, to prevent user-added Annotations from "leaking" from one document into the next.
- Re-factor the `BaseViewer.#initializePermissions`-method, to simplify handling of temporarily disabled modes (e.g. for both Annotation-rendering and Annotation-editing).
- When editing is enabled, let the Editor-buttons be `disabled` until the document has loaded. This way we avoid the buttons becoming clickable temporarily, for PDF documents that use permissions.
- Slightly re-factor how the Editor-buttons are shown/hidden in the viewer, and reset the toolbar-state when a new PDF document is opened.
- Flip the order of the Editor-buttons and the pre-exising toolbarButtons in the "toolbarViewerRight"-div. (To help reduce the size, a little bit, for the PR that adds new Editor-toolbars.)
- Enable editing by default in the development viewer, i.e. `gulp server`, since having to (repeatedly) do that manually becomes annoying after a while.
- Finally, support disabling of editing when `pdfjs.enablePermissions` is set; fixes issue 15049.
---
[1] Either manually with `about:config`, or using e.g. a [Group Policy](https://github.com/mozilla/policy-templates).
2022-06-21 01:08:41 +09:00
< / button >
2023-11-23 03:02:42 +09:00
< button id = "editorInk" class = "toolbarButton" disabled = "disabled" title = "Draw" role = "radio" aria-checked = "false" aria-controls = "editorInkParamsToolbar" tabindex = "33" data-l10n-id = "pdfjs-editor-ink-button" >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-editor-ink-button-label" > Draw< / span >
[editor] Support disabling of editing when `pdfjs.enablePermissions` is set (issue 15049)
For encrypted PDF documents without the required permissions set, this patch adds support for disabling of Annotation-editing. However, please note that it also requires that the `pdfjs.enablePermissions` preference is set to `true` (since PDF document permissions could be seen as user hostile).[1]
As I started looking at the issue, it soon became clear that *only* trying to fix the issue without slightly re-factor the surrounding code would be somewhat difficult.
The following is an overview of the changes in this patch; sorry about the size/scope of this!
- Use a new `AnnotationEditorUIManager`-instance *for each* PDF document opened in the GENERIC viewer, to prevent user-added Annotations from "leaking" from one document into the next.
- Re-factor the `BaseViewer.#initializePermissions`-method, to simplify handling of temporarily disabled modes (e.g. for both Annotation-rendering and Annotation-editing).
- When editing is enabled, let the Editor-buttons be `disabled` until the document has loaded. This way we avoid the buttons becoming clickable temporarily, for PDF documents that use permissions.
- Slightly re-factor how the Editor-buttons are shown/hidden in the viewer, and reset the toolbar-state when a new PDF document is opened.
- Flip the order of the Editor-buttons and the pre-exising toolbarButtons in the "toolbarViewerRight"-div. (To help reduce the size, a little bit, for the PR that adds new Editor-toolbars.)
- Enable editing by default in the development viewer, i.e. `gulp server`, since having to (repeatedly) do that manually becomes annoying after a while.
- Finally, support disabling of editing when `pdfjs.enablePermissions` is set; fixes issue 15049.
---
[1] Either manually with `about:config`, or using e.g. a [Group Policy](https://github.com/mozilla/policy-templates).
2022-06-21 01:08:41 +09:00
< / button >
2024-02-10 02:19:19 +09:00
< button id = "editorStamp" class = "toolbarButton hidden" disabled = "disabled" title = "Add or edit images" role = "radio" aria-checked = "false" aria-controls = "editorStampParamsToolbar" tabindex = "34" data-l10n-id = "pdfjs-editor-stamp-button" >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-editor-stamp-button-label" > Add or edit images< / span >
2023-08-08 18:35:51 +09:00
< / button >
[editor] Support disabling of editing when `pdfjs.enablePermissions` is set (issue 15049)
For encrypted PDF documents without the required permissions set, this patch adds support for disabling of Annotation-editing. However, please note that it also requires that the `pdfjs.enablePermissions` preference is set to `true` (since PDF document permissions could be seen as user hostile).[1]
As I started looking at the issue, it soon became clear that *only* trying to fix the issue without slightly re-factor the surrounding code would be somewhat difficult.
The following is an overview of the changes in this patch; sorry about the size/scope of this!
- Use a new `AnnotationEditorUIManager`-instance *for each* PDF document opened in the GENERIC viewer, to prevent user-added Annotations from "leaking" from one document into the next.
- Re-factor the `BaseViewer.#initializePermissions`-method, to simplify handling of temporarily disabled modes (e.g. for both Annotation-rendering and Annotation-editing).
- When editing is enabled, let the Editor-buttons be `disabled` until the document has loaded. This way we avoid the buttons becoming clickable temporarily, for PDF documents that use permissions.
- Slightly re-factor how the Editor-buttons are shown/hidden in the viewer, and reset the toolbar-state when a new PDF document is opened.
- Flip the order of the Editor-buttons and the pre-exising toolbarButtons in the "toolbarViewerRight"-div. (To help reduce the size, a little bit, for the PR that adds new Editor-toolbars.)
- Enable editing by default in the development viewer, i.e. `gulp server`, since having to (repeatedly) do that manually becomes annoying after a while.
- Finally, support disabling of editing when `pdfjs.enablePermissions` is set; fixes issue 15049.
---
[1] Either manually with `about:config`, or using e.g. a [Group Policy](https://github.com/mozilla/policy-templates).
2022-06-21 01:08:41 +09:00
< / div >
2022-08-21 20:48:48 +09:00
< div id = "editorModeSeparator" class = "verticalToolbarSeparator" > < / div >
[editor] Support disabling of editing when `pdfjs.enablePermissions` is set (issue 15049)
For encrypted PDF documents without the required permissions set, this patch adds support for disabling of Annotation-editing. However, please note that it also requires that the `pdfjs.enablePermissions` preference is set to `true` (since PDF document permissions could be seen as user hostile).[1]
As I started looking at the issue, it soon became clear that *only* trying to fix the issue without slightly re-factor the surrounding code would be somewhat difficult.
The following is an overview of the changes in this patch; sorry about the size/scope of this!
- Use a new `AnnotationEditorUIManager`-instance *for each* PDF document opened in the GENERIC viewer, to prevent user-added Annotations from "leaking" from one document into the next.
- Re-factor the `BaseViewer.#initializePermissions`-method, to simplify handling of temporarily disabled modes (e.g. for both Annotation-rendering and Annotation-editing).
- When editing is enabled, let the Editor-buttons be `disabled` until the document has loaded. This way we avoid the buttons becoming clickable temporarily, for PDF documents that use permissions.
- Slightly re-factor how the Editor-buttons are shown/hidden in the viewer, and reset the toolbar-state when a new PDF document is opened.
- Flip the order of the Editor-buttons and the pre-exising toolbarButtons in the "toolbarViewerRight"-div. (To help reduce the size, a little bit, for the PR that adds new Editor-toolbars.)
- Enable editing by default in the development viewer, i.e. `gulp server`, since having to (repeatedly) do that manually becomes annoying after a while.
- Finally, support disabling of editing when `pdfjs.enablePermissions` is set; fixes issue 15049.
---
[1] Either manually with `about:config`, or using e.g. a [Group Policy](https://github.com/mozilla/policy-templates).
2022-06-21 01:08:41 +09:00
2023-11-19 06:05:21 +09:00
< button id = "print" class = "toolbarButton hiddenMediumView" title = "Print" tabindex = "41" data-l10n-id = "pdfjs-print-button" >
< span data-l10n-id = "pdfjs-print-button-label" > Print< / span >
< / button >
< button id = "download" class = "toolbarButton hiddenMediumView" title = "Save" tabindex = "42" data-l10n-id = "pdfjs-save-button" >
< span data-l10n-id = "pdfjs-save-button-label" > Save< / span >
< / button >
< div class = "verticalToolbarSeparator hiddenMediumView" > < / div >
< button id = "secondaryToolbarToggle" class = "toolbarButton" title = "Tools" tabindex = "43" data-l10n-id = "pdfjs-tools-button" aria-expanded = "false" aria-controls = "secondaryToolbar" >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-tools-button-label" > Tools< / span >
2015-02-03 00:12:52 +09:00
< / button >
2012-04-26 03:34:28 +09:00
< / div >
2016-11-04 00:56:57 +09:00
< div id = "toolbarViewerMiddle" >
< div class = "splitToolbarButton" >
2023-10-13 23:23:17 +09:00
< button id = "zoomOut" class = "toolbarButton" title = "Zoom Out" tabindex = "21" data-l10n-id = "pdfjs-zoom-out-button" >
< span data-l10n-id = "pdfjs-zoom-out-button-label" > Zoom Out< / span >
2016-11-04 00:56:57 +09:00
< / button >
< div class = "splitToolbarButtonSeparator" > < / div >
2023-10-13 23:23:17 +09:00
< button id = "zoomIn" class = "toolbarButton" title = "Zoom In" tabindex = "22" data-l10n-id = "pdfjs-zoom-in-button" >
< span data-l10n-id = "pdfjs-zoom-in-button-label" > Zoom In< / span >
2016-11-04 00:56:57 +09:00
< / button >
2012-04-26 03:34:28 +09:00
< / div >
2016-11-04 00:56:57 +09:00
< span id = "scaleSelectContainer" class = "dropdownToolbarButton" >
2023-10-13 23:23:17 +09:00
< select id = "scaleSelect" title = "Zoom" tabindex = "23" data-l10n-id = "pdfjs-zoom-select" >
< option id = "pageAutoOption" title = "" value = "auto" selected = "selected" data-l10n-id = "pdfjs-page-scale-auto" > Automatic Zoom< / option >
< option id = "pageActualOption" title = "" value = "page-actual" data-l10n-id = "pdfjs-page-scale-actual" > Actual Size< / option >
< option id = "pageFitOption" title = "" value = "page-fit" data-l10n-id = "pdfjs-page-scale-fit" > Page Fit< / option >
< option id = "pageWidthOption" title = "" value = "page-width" data-l10n-id = "pdfjs-page-scale-width" > Page Width< / option >
2023-10-19 23:30:57 +09:00
< option id = "customScaleOption" title = "" value = "custom" disabled = "disabled" hidden = "true" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 0 }' > 0%< / option >
2023-10-13 23:23:17 +09:00
< option title = "" value = "0.5" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 50 }' > 50%< / option >
< option title = "" value = "0.75" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 75 }' > 75%< / option >
< option title = "" value = "1" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 100 }' > 100%< / option >
< option title = "" value = "1.25" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 125 }' > 125%< / option >
< option title = "" value = "1.5" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 150 }' > 150%< / option >
< option title = "" value = "2" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 200 }' > 200%< / option >
< option title = "" value = "3" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 300 }' > 300%< / option >
< option title = "" value = "4" data-l10n-id = "pdfjs-page-scale-percent" data-l10n-args = '{ "scale": 400 }' > 400%< / option >
2016-11-04 00:56:57 +09:00
< / select >
< / span >
2012-04-26 03:34:28 +09:00
< / div >
< / div >
2013-02-07 08:19:29 +09:00
< div id = "loadingBar" >
< div class = "progress" >
< div class = "glimmer" >
< / div >
< / div >
< / div >
2011-12-12 10:38:20 +09:00
< / div >
< / div >
2011-05-26 23:02:52 +09:00
2013-07-06 22:37:03 +09:00
< div id = "viewerContainer" tabindex = "0" >
2014-10-01 00:48:29 +09:00
< div id = "viewer" class = "pdfViewer" > < / div >
2011-07-29 02:48:05 +09:00
< / div >
2012-04-26 03:34:28 +09:00
< / div > <!-- mainContainer -->
2011-10-28 21:32:36 +09:00
2022-03-25 22:10:13 +09:00
< div id = "dialogContainer" >
< dialog id = "passwordDialog" >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< label for = "password" id = "passwordText" data-l10n-id = "pdfjs-password-label" > Enter the password to open this PDF file:< / label >
2014-01-22 08:07:07 +09:00
< / div >
2022-03-25 22:10:13 +09:00
< div class = "row" >
< input type = "password" id = "password" class = "toolbarField" >
2013-09-25 00:46:54 +09:00
< / div >
2022-03-25 22:10:13 +09:00
< div class = "buttonRow" >
2023-10-13 23:23:17 +09:00
< button id = "passwordCancel" class = "dialogButton" > < span data-l10n-id = "pdfjs-password-cancel-button" > Cancel< / span > < / button >
< button id = "passwordSubmit" class = "dialogButton" > < span data-l10n-id = "pdfjs-password-ok-button" > OK< / span > < / button >
2022-03-25 22:10:13 +09:00
< / div >
< / dialog >
< dialog id = "documentPropertiesDialog" >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "fileNameLabel" data-l10n-id = "pdfjs-document-properties-file-name" > File name:< / span >
2022-03-25 22:10:28 +09:00
< p id = "fileNameField" aria-labelledby = "fileNameLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "fileSizeLabel" data-l10n-id = "pdfjs-document-properties-file-size" > File size:< / span >
2022-03-25 22:10:28 +09:00
< p id = "fileSizeField" aria-labelledby = "fileSizeLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "separator" > < / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "titleLabel" data-l10n-id = "pdfjs-document-properties-title" > Title:< / span >
2022-03-25 22:10:28 +09:00
< p id = "titleField" aria-labelledby = "titleLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "authorLabel" data-l10n-id = "pdfjs-document-properties-author" > Author:< / span >
2022-03-25 22:10:28 +09:00
< p id = "authorField" aria-labelledby = "authorLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "subjectLabel" data-l10n-id = "pdfjs-document-properties-subject" > Subject:< / span >
2022-03-25 22:10:28 +09:00
< p id = "subjectField" aria-labelledby = "subjectLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "keywordsLabel" data-l10n-id = "pdfjs-document-properties-keywords" > Keywords:< / span >
2022-03-25 22:10:28 +09:00
< p id = "keywordsField" aria-labelledby = "keywordsLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "creationDateLabel" data-l10n-id = "pdfjs-document-properties-creation-date" > Creation Date:< / span >
2022-03-25 22:10:28 +09:00
< p id = "creationDateField" aria-labelledby = "creationDateLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "modificationDateLabel" data-l10n-id = "pdfjs-document-properties-modification-date" > Modification Date:< / span >
2022-03-25 22:10:28 +09:00
< p id = "modificationDateField" aria-labelledby = "modificationDateLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "creatorLabel" data-l10n-id = "pdfjs-document-properties-creator" > Creator:< / span >
2022-03-25 22:10:28 +09:00
< p id = "creatorField" aria-labelledby = "creatorLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "separator" > < / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "producerLabel" data-l10n-id = "pdfjs-document-properties-producer" > PDF Producer:< / span >
2022-03-25 22:10:28 +09:00
< p id = "producerField" aria-labelledby = "producerLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "versionLabel" data-l10n-id = "pdfjs-document-properties-version" > PDF Version:< / span >
2022-03-25 22:10:28 +09:00
< p id = "versionField" aria-labelledby = "versionLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "pageCountLabel" data-l10n-id = "pdfjs-document-properties-page-count" > Page Count:< / span >
2022-03-25 22:10:28 +09:00
< p id = "pageCountField" aria-labelledby = "pageCountLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "pageSizeLabel" data-l10n-id = "pdfjs-document-properties-page-size" > Page Size:< / span >
2022-03-25 22:10:28 +09:00
< p id = "pageSizeField" aria-labelledby = "pageSizeLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "separator" > < / div >
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span id = "linearizedLabel" data-l10n-id = "pdfjs-document-properties-linearized" > Fast Web View:< / span >
2022-03-25 22:10:28 +09:00
< p id = "linearizedField" aria-labelledby = "linearizedLabel" > -< / p >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "buttonRow" >
2023-10-13 23:23:17 +09:00
< button id = "documentPropertiesClose" class = "dialogButton" > < span data-l10n-id = "pdfjs-document-properties-close-button" > Close< / span > < / button >
2022-03-25 22:10:13 +09:00
< / div >
< / dialog >
2023-09-15 21:06:50 +09:00
< dialog id = "altTextDialog" aria-labelledby = "dialogLabel" aria-describedby = "dialogDescription" >
< div id = "altTextContainer" >
< div id = "overallDescription" >
2023-10-13 23:23:17 +09:00
< span id = "dialogLabel" data-l10n-id = "pdfjs-editor-alt-text-dialog-label" class = "title" > Choose an option< / span >
< span id = "dialogDescription" data-l10n-id = "pdfjs-editor-alt-text-dialog-description" >
2023-09-19 16:27:43 +09:00
Alt text (alternative text) helps when people can’ t see the image or when it doesn’ t load.
2023-09-15 21:06:50 +09:00
< / span >
< / div >
< div id = "addDescription" >
< div class = "radio" >
< div class = "radioButton" >
2023-09-20 17:45:26 +09:00
< input type = "radio" id = "descriptionButton" name = "altTextOption" tabindex = "0" aria-describedby = "descriptionAreaLabel" checked >
2023-10-13 23:23:17 +09:00
< label for = "descriptionButton" data-l10n-id = "pdfjs-editor-alt-text-add-description-label" > Add a description< / label >
2023-09-15 21:06:50 +09:00
< / div >
< div class = "radioLabel" >
2023-10-13 23:23:17 +09:00
< span id = "descriptionAreaLabel" data-l10n-id = "pdfjs-editor-alt-text-add-description-description" >
2023-09-15 21:06:50 +09:00
Aim for 1-2 sentences that describe the subject, setting, or actions.
< / span >
< / div >
< / div >
< div class = "descriptionArea" >
2023-10-13 23:23:17 +09:00
< textarea id = "descriptionTextarea" placeholder = "For example, “A young man sits down at a table to eat a meal”" aria-labelledby = "descriptionAreaLabel" data-l10n-id = "pdfjs-editor-alt-text-textarea" tabindex = "0" > < / textarea >
2023-09-15 21:06:50 +09:00
< / div >
< / div >
< div id = "markAsDecorative" >
< div class = "radio" >
< div class = "radioButton" >
2023-09-20 17:45:26 +09:00
< input type = "radio" id = "decorativeButton" name = "altTextOption" aria-describedby = "decorativeLabel" >
2023-10-13 23:23:17 +09:00
< label for = "decorativeButton" data-l10n-id = "pdfjs-editor-alt-text-mark-decorative-label" > Mark as decorative< / label >
2023-09-15 21:06:50 +09:00
< / div >
< div class = "radioLabel" >
2023-10-13 23:23:17 +09:00
< span id = "decorativeLabel" data-l10n-id = "pdfjs-editor-alt-text-mark-decorative-description" >
2023-09-20 18:00:07 +09:00
This is used for ornamental images, like borders or watermarks.
2023-09-15 21:06:50 +09:00
< / span >
< / div >
< / div >
< / div >
< div id = "buttons" >
2023-10-13 23:23:17 +09:00
< button id = "altTextCancel" tabindex = "0" > < span data-l10n-id = "pdfjs-editor-alt-text-cancel-button" > Cancel< / span > < / button >
< button id = "altTextSave" tabindex = "0" > < span data-l10n-id = "pdfjs-editor-alt-text-save-button" > Save< / span > < / button >
2023-09-15 21:06:50 +09:00
< / div >
< / div >
< / dialog >
2020-01-08 21:57:31 +09:00
<!-- #if !MOZCENTRAL -->
2022-03-25 22:10:28 +09:00
< dialog id = "printServiceDialog" style = "min-width: 200px;" >
2022-03-25 22:10:13 +09:00
< div class = "row" >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-print-progress-message" > Preparing document for printing…< / span >
2016-10-08 21:36:55 +09:00
< / div >
2022-03-25 22:10:13 +09:00
< div class = "row" >
< progress value = "0" max = "100" > < / progress >
2023-10-13 23:23:17 +09:00
< span data-l10n-id = "pdfjs-print-progress-percent" data-l10n-args = '{ "progress": 0 }' class = "relative-progress" > 0%< / span >
2022-03-25 22:10:13 +09:00
< / div >
< div class = "buttonRow" >
2023-10-13 23:23:17 +09:00
< button id = "printCancel" class = "dialogButton" > < span data-l10n-id = "pdfjs-print-progress-close-button" > Cancel< / span > < / button >
2022-03-25 22:10:13 +09:00
< / div >
< / dialog >
2016-10-08 21:36:55 +09:00
<!-- #endif -->
2015-07-19 00:11:33 +09:00
<!-- #if CHROME -->
<!-- #include viewer - snippet - chrome - overlays.html -->
<!-- #endif -->
2022-03-25 22:10:13 +09:00
< / div > <!-- dialogContainer -->
2013-09-25 00:46:54 +09:00
2012-04-13 08:29:15 +09:00
< / div > <!-- outerContainer -->
2012-06-29 01:50:25 +09:00
< div id = "printContainer" > < / div >
2011-05-26 23:02:52 +09:00
< / body >
2011-05-05 09:32:59 +09:00
< / html >