2019-03-09 00:36:14 +00:00
import React from 'react' ;
2020-02-08 01:24:23 +00:00
import { gettext } from '../utils/constants' ;
2019-03-09 00:36:14 +00:00
class PDFViewer extends React . Component {
2023-08-09 10:54:58 +00:00
componentDidMount ( ) {
const el = document . createElement ( 'div' ) ;
el . id = 'printContainer' ;
document . body . append ( el ) ;
}
2019-03-09 00:36:14 +00:00
render ( ) {
return (
< React . Fragment >
< div id = "outerContainer" >
2024-05-30 06:44:10 +00:00
2023-08-09 10:54:58 +00:00
< div id = "sidebarContainer" >
2019-03-09 00:36:14 +00:00
< div id = "toolbarSidebar" >
2023-08-09 10:54:58 +00:00
< div id = "thumbnails-header" className = "p-4 d-flex justify-content-between" >
< h3 className = "m-0 title font-weight-normal" > { gettext ( 'Thumbnail' ) } < / h 3 >
< button id = "close-thumbnail-panel" className = "close-thumbnail-panel sf2-icon-x3 border-0 bg-transparent" aria - controls = "sidebarContainer" > < / b u t t o n >
< / d i v >
< div id = "toolbarSidebarLeft" className = "sf-hide" >
< div id = "sidebarViewButtons" className = "splitToolbarButton toggled" role = "radiogroup" >
2024-05-30 06:44:10 +00:00
< button id = "viewThumbnail" className = "toolbarButton toggled" title = "Show Thumbnails" tabIndex = "2" data - l10n - id = "thumbs" role = "radio" aria - checked = "true" aria - controls = "thumbnailView" >
< span data - l10n - id = "thumbs_label" > Thumbnails < / s p a n >
2021-10-20 07:22:21 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "viewOutline" className = "toolbarButton" title = "Show Document Outline (double-click to expand/collapse all items)" tabIndex = "3" data - l10n - id = "document_outline" role = "radio" aria - checked = "false" aria - controls = "outlineView" >
< span data - l10n - id = "document_outline_label" > Document Outline < / s p a n >
2021-10-20 07:22:21 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "viewAttachments" className = "toolbarButton" title = "Show Attachments" tabIndex = "4" data - l10n - id = "attachments" role = "radio" aria - checked = "false" aria - controls = "attachmentsView" >
< span data - l10n - id = "attachments_label" > Attachments < / s p a n >
2021-10-20 07:22:21 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "viewLayers" className = "toolbarButton" title = "Show Layers (double-click to reset all layers to the default state)" tabIndex = "5" data - l10n - id = "layers" role = "radio" aria - checked = "false" aria - controls = "layersView" >
< span data - l10n - id = "layers_label" > Layers < / s p a n >
2021-10-20 07:22:21 +00:00
< / b u t t o n >
< / d i v >
< / d i v >
2024-05-30 06:44:10 +00:00
2021-10-20 07:22:21 +00:00
< div id = "toolbarSidebarRight" >
2024-05-30 06:44:10 +00:00
< div id = "outlineOptionsContainer" className = "hidden" >
< div className = "verticalToolbarSeparator" > < / d i v >
< button id = "currentOutlineItem" className = "toolbarButton" disabled = "disabled" title = "Find Current Outline Item" tabIndex = "6" data - l10n - id = "current_outline_item" >
< span data - l10n - id = "current_outline_item_label" > Current Outline Item < / s p a n >
2021-10-20 07:22:21 +00:00
< / b u t t o n >
< / d i v >
2019-03-09 00:36:14 +00:00
< / d i v >
< / d i v >
< div id = "sidebarContent" >
< div id = "thumbnailView" >
< / d i v >
< div id = "outlineView" className = "hidden" >
< / d i v >
< div id = "attachmentsView" className = "hidden" >
< / d i v >
2021-10-20 07:22:21 +00:00
< div id = "layersView" className = "hidden" >
< / d i v >
2019-03-09 00:36:14 +00:00
< / d i v >
2024-05-30 06:44:10 +00:00
< div id = "sidebarResizer" > < / d i v >
< / d i v >
2024-07-18 03:58:42 +00:00
{ /* <!-- sidebarContainer -->*/ }
2024-05-30 06:44:10 +00:00
2019-03-09 00:36:14 +00:00
< div id = "mainContainer" >
2024-12-17 06:45:57 +00:00
< div className = "findbar hidden doorHanger d-flex align-items-center" id = "findbar" >
2019-03-09 00:36:14 +00:00
< div id = "findbarInputContainer" >
2024-12-17 06:45:57 +00:00
< input id = "findInput" className = "form-control" title = "Find" placeholder = "Find in document…" tabIndex = "91" data - l10n - id = "find_input" aria - invalid = "false" / >
< div className = "position-absolute d-flex align-items-center" id = "findbarMiscContainer" >
< div id = "findbarMessageContainer" aria - live = "polite" >
< span id = "findResultsCount" > < / s p a n >
< span id = "findMsg" className = "toolbarLabel d-none" > < / s p a n >
< / d i v >
< div className = "splitToolbarButton m-0" >
< button id = "findPrevious" className = "hidden border-0 sf3-font sf3-font-down" title = "Find the previous occurrence of the phrase" tabIndex = "92" data - l10n - id = "find_previous" >
< span data - l10n - id = "find_previous_label" className = "find-label" > Previous < / s p a n >
< / b u t t o n >
< div className = "splitToolbarButtonSeparator d-none" > < / d i v >
< button id = "findNext" className = "hidden border-0 sf3-font sf3-font-down" title = "Find the next occurrence of the phrase" tabIndex = "93" data - l10n - id = "find_next" >
< span data - l10n - id = "find_next_label" className = "find-label" > Next < / s p a n >
< / b u t t o n >
< / d i v >
< button id = "findClearQuery" className = "hidden border-0 ml-1 sf3-font sf3-font-close" > < / b u t t o n >
2019-03-09 00:36:14 +00:00
< / d i v >
< / d i v >
2024-05-30 06:44:10 +00:00
2019-03-09 00:36:14 +00:00
< div id = "findbarOptionsOneContainer" >
2024-05-30 06:44:10 +00:00
< input type = "checkbox" id = "findHighlightAll" className = "toolbarField" tabIndex = "94" / >
< label htmlFor = "findHighlightAll" className = "toolbarLabel" data - l10n - id = "find_highlight" > Highlight All < / l a b e l >
< input type = "checkbox" id = "findMatchCase" className = "toolbarField" tabIndex = "95" / >
< label htmlFor = "findMatchCase" className = "toolbarLabel" data - l10n - id = "find_match_case_label" > Match Case < / l a b e l >
2019-03-09 00:36:14 +00:00
< / d i v >
< div id = "findbarOptionsTwoContainer" >
2024-05-30 06:44:10 +00:00
< input type = "checkbox" id = "findMatchDiacritics" className = "toolbarField" tabIndex = "96" / >
< label htmlFor = "findMatchDiacritics" className = "toolbarLabel" data - l10n - id = "find_match_diacritics_label" > Match Diacritics < / l a b e l >
< input type = "checkbox" id = "findEntireWord" className = "toolbarField" tabIndex = "97" / >
< label htmlFor = "findEntireWord" className = "toolbarLabel" data - l10n - id = "find_entire_word_label" > Whole Words < / l a b e l >
2019-03-09 00:36:14 +00:00
< / d i v >
< / d i v >
2024-07-18 03:58:42 +00:00
{ /* <!-- findbar -->*/ }
2024-05-30 06:44:10 +00:00
2023-08-09 10:54:58 +00:00
< div className = "editorParamsToolbar hidden doorHangerRight" id = "editorFreeTextParamsToolbar" >
< div className = "editorParamsToolbarContainer" >
< div className = "editorParamsSetter" >
2024-05-30 06:44:10 +00:00
< label htmlFor = "editorFreeTextColor" className = "editorParamsLabel" data - l10n - id = "editor_free_text_color" > Color < / l a b e l >
< input type = "color" id = "editorFreeTextColor" className = "editorParamsColor" tabIndex = "100" / >
2023-08-09 10:54:58 +00:00
< / d i v >
< div className = "editorParamsSetter" >
2024-05-30 06:44:10 +00:00
< label htmlFor = "editorFreeTextFontSize" className = "editorParamsLabel" data - l10n - id = "editor_free_text_size" > Size < / l a b e l >
< input type = "range" id = "editorFreeTextFontSize" className = "editorParamsSlider" defaultValue = "10" min = "5" max = "100" step = "1" tabIndex = "101" / >
2023-08-09 10:54:58 +00:00
< / d i v >
< / d i v >
< / d i v >
2024-05-30 06:44:10 +00:00
2023-08-09 10:54:58 +00:00
< div className = "editorParamsToolbar hidden doorHangerRight" id = "editorInkParamsToolbar" >
< div className = "editorParamsToolbarContainer" >
< div className = "editorParamsSetter" >
2024-05-30 06:44:10 +00:00
< label htmlFor = "editorInkColor" className = "editorParamsLabel" data - l10n - id = "editor_ink_color" > Color < / l a b e l >
< input type = "color" id = "editorInkColor" className = "editorParamsColor" tabIndex = "102" / >
2023-08-09 10:54:58 +00:00
< / d i v >
< div className = "editorParamsSetter" >
2024-05-30 06:44:10 +00:00
< label htmlFor = "editorInkThickness" className = "editorParamsLabel" data - l10n - id = "editor_ink_thickness" > Thickness < / l a b e l >
< input type = "range" id = "editorInkThickness" className = "editorParamsSlider" defaultValue = "1" min = "1" max = "20" step = "1" tabIndex = "103" / >
2023-08-09 10:54:58 +00:00
< / d i v >
< div className = "editorParamsSetter" >
2024-05-30 06:44:10 +00:00
< label htmlFor = "editorInkOpacity" className = "editorParamsLabel" data - l10n - id = "editor_ink_opacity" > Opacity < / l a b e l >
< input type = "range" id = "editorInkOpacity" className = "editorParamsSlider" defaultValue = "100" min = "1" max = "100" step = "1" tabIndex = "104" / >
2023-08-09 10:54:58 +00:00
< / d i v >
< / d i v >
< / d i v >
2024-05-30 06:44:10 +00:00
2023-08-09 10:54:58 +00:00
< div id = "secondaryToolbar" className = "secondaryToolbar hidden doorHangerRight" >
< div id = "secondaryToolbarButtonContainer" >
2024-05-30 06:44:10 +00:00
< button id = "secondaryOpenFile" className = "secondaryToolbarButton visibleLargeView" title = "Open File" tabIndex = "51" data - l10n - id = "open_file" >
< span data - l10n - id = "open_file_label" > Open < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "secondaryPrint" className = "secondaryToolbarButton visibleMediumView" title = "Print" tabIndex = "52" data - l10n - id = "print" >
< span data - l10n - id = "print_label" > Print < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "secondaryDownload" className = "secondaryToolbarButton visibleMediumView" title = "Save" tabIndex = "53" data - l10n - id = "save" >
< span data - l10n - id = "save_label" > Save < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< div className = "horizontalToolbarSeparator visibleLargeView" > < / d i v >
< button id = "presentationMode" className = "secondaryToolbarButton" title = "Switch to Presentation Mode" tabIndex = "54" data - l10n - id = "presentation_mode" >
< span data - l10n - id = "presentation_mode_label" > Presentation Mode < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< a href = "#" id = "viewBookmark" className = "secondaryToolbarButton" title = "Current Page (View URL from Current Page)" tabIndex = "55" data - l10n - id = "bookmark1" >
< span data - l10n - id = "bookmark1_label" > Current Page < / s p a n >
2023-08-09 10:54:58 +00:00
< / a >
2024-05-30 06:44:10 +00:00
< div id = "viewBookmarkSeparator" className = "horizontalToolbarSeparator" > < / d i v >
2023-08-09 10:54:58 +00:00
{ / *
2024-05-30 06:44:10 +00:00
< button id = "firstPage" className = "secondaryToolbarButton" title = "Go to First Page" tabIndex = "56" data - l10n - id = "first_page" >
< span data - l10n - id = "first_page_label" > Go to First Page < / s p a n >
< / b u t t o n >
< button id = "lastPage" className = "secondaryToolbarButton" title = "Go to Last Page" tabIndex = "57" data - l10n - id = "last_page" >
< span data - l10n - id = "last_page_label" > Go to Last Page < / s p a n >
< / b u t t o n >
2023-08-09 10:54:58 +00:00
* / }
2024-05-30 06:44:10 +00:00
< div className = "horizontalToolbarSeparator" > < / d i v >
< button id = "pageRotateCw" className = "secondaryToolbarButton" title = "Rotate Clockwise" tabIndex = "58" data - l10n - id = "page_rotate_cw" >
< span data - l10n - id = "page_rotate_cw_label" > Rotate Clockwise < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "pageRotateCcw" className = "secondaryToolbarButton" title = "Rotate Counterclockwise" tabIndex = "59" data - l10n - id = "page_rotate_ccw" >
< span data - l10n - id = "page_rotate_ccw_label" > Rotate Counterclockwise < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< div className = "horizontalToolbarSeparator" > < / d i v >
2023-08-09 10:54:58 +00:00
< div id = "cursorToolButtons" role = "radiogroup" >
2024-05-30 06:44:10 +00:00
< button id = "cursorSelectTool" className = "secondaryToolbarButton toggled" title = "Enable Text Selection Tool" tabIndex = "60" data - l10n - id = "cursor_text_select_tool" role = "radio" aria - checked = "true" >
< span data - l10n - id = "cursor_text_select_tool_label" > Text Selection Tool < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "cursorHandTool" className = "secondaryToolbarButton" title = "Enable Hand Tool" tabIndex = "61" data - l10n - id = "cursor_hand_tool" role = "radio" aria - checked = "false" >
< span data - l10n - id = "cursor_hand_tool_label" > Hand Tool < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
< / d i v >
2024-05-30 06:44:10 +00:00
< div className = "horizontalToolbarSeparator" > < / d i v >
2023-08-09 10:54:58 +00:00
< div id = "scrollModeButtons" role = "radiogroup" >
2024-05-30 06:44:10 +00:00
< button id = "scrollPage" className = "secondaryToolbarButton" title = "Use Page Scrolling" tabIndex = "62" data - l10n - id = "scroll_page" role = "radio" aria - checked = "false" >
< span data - l10n - id = "scroll_page_label" > Page Scrolling < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "scrollVertical" className = "secondaryToolbarButton toggled" title = "Use Vertical Scrolling" tabIndex = "63" data - l10n - id = "scroll_vertical" role = "radio" aria - checked = "true" >
< span data - l10n - id = "scroll_vertical_label" > Vertical Scrolling < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "scrollHorizontal" className = "secondaryToolbarButton" title = "Use Horizontal Scrolling" tabIndex = "64" data - l10n - id = "scroll_horizontal" role = "radio" aria - checked = "false" >
< span data - l10n - id = "scroll_horizontal_label" > Horizontal Scrolling < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "scrollWrapped" className = "secondaryToolbarButton" title = "Use Wrapped Scrolling" tabIndex = "65" data - l10n - id = "scroll_wrapped" role = "radio" aria - checked = "false" >
< span data - l10n - id = "scroll_wrapped_label" > Wrapped Scrolling < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
< / d i v >
2024-05-30 06:44:10 +00:00
< div className = "horizontalToolbarSeparator" > < / d i v >
2023-08-09 10:54:58 +00:00
< div id = "spreadModeButtons" role = "radiogroup" >
2024-05-30 06:44:10 +00:00
< button id = "spreadNone" className = "secondaryToolbarButton toggled" title = "Do not join page spreads" tabIndex = "66" data - l10n - id = "spread_none" role = "radio" aria - checked = "true" >
< span data - l10n - id = "spread_none_label" > No Spreads < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "spreadOdd" className = "secondaryToolbarButton" title = "Join page spreads starting with odd-numbered pages" tabIndex = "67" data - l10n - id = "spread_odd" role = "radio" aria - checked = "false" >
< span data - l10n - id = "spread_odd_label" > Odd Spreads < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "spreadEven" className = "secondaryToolbarButton" title = "Join page spreads starting with even-numbered pages" tabIndex = "68" data - l10n - id = "spread_even" role = "radio" aria - checked = "false" >
< span data - l10n - id = "spread_even_label" > Even Spreads < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
< / d i v >
2024-05-30 06:44:10 +00:00
< div className = "horizontalToolbarSeparator" > < / d i v >
< button id = "documentProperties" className = "secondaryToolbarButton" title = "Document Properties…" tabIndex = "69" data - l10n - id = "document_properties" aria - controls = "documentPropertiesDialog" >
< span data - l10n - id = "document_properties_label" > Document Properties … < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
< / d i v >
2024-05-30 06:44:10 +00:00
< / d i v >
2024-07-18 03:58:42 +00:00
{ /* <!-- secondaryToolbar -->*/ }
2024-05-30 06:44:10 +00:00
2019-03-09 00:36:14 +00:00
< div className = "toolbar" >
< div id = "toolbarContainer" >
2020-02-08 01:24:23 +00:00
< div id = "toolbarViewer" >
2023-08-09 10:54:58 +00:00
< div id = "toolbarViewerLeft" >
2024-05-30 06:44:10 +00:00
< button id = "sidebarToggle" className = "toolbarButton" title = "Toggle Sidebar" tabIndex = "11" data - l10n - id = "toggle_sidebar" aria - expanded = "false" aria - controls = "sidebarContainer" >
< span data - l10n - id = "toggle_sidebar_label" > Toggle Sidebar < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< div className = "toolbarButtonSpacer d-none" > < / d i v >
< button id = "viewFind" className = "toolbarButton d-none" title = "Find in Document" tabIndex = "12" data - l10n - id = "findbar" aria - expanded = "false" aria - controls = "findbar" >
< span data - l10n - id = "findbar_label" > Find < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2023-08-09 10:54:58 +00:00
< div className = "splitToolbarButton hiddenSmallView ml-2 d-flex align-items-center" >
< div className = "splitToolbarButtonSeparator mr-2" > < / d i v >
< button id = "firstPage" className = "toolbarButton" title = "Go to First Page" tabIndex = "56" data - l10n - id = "first_page" >
< span data - l10n - id = "first_page_label" > Go to First Page < / s p a n >
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button className = "toolbarButton" title = "Previous Page" id = "previous" tabIndex = "13" data - l10n - id = "previous" >
< span data - l10n - id = "previous_label" > Previous < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2023-08-09 10:54:58 +00:00
< input type = "number" id = "pageNumber" className = "toolbarField" title = "Page" defaultValue = "1" min = "1" tabIndex = "15" data - l10n - id = "page" autoComplete = "off" / >
< span id = "numPages" className = "toolbarLabel" > < / s p a n >
2024-05-30 06:44:10 +00:00
< button className = "toolbarButton" title = "Next Page" id = "next" tabIndex = "14" data - l10n - id = "next" >
< span data - l10n - id = "next_label" > Next < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
2023-08-09 10:54:58 +00:00
< button id = "lastPage" className = "toolbarButton" title = "Go to Last Page" tabIndex = "57" data - l10n - id = "last_page" >
< span data - l10n - id = "last_page_label" > Go to Last Page < / s p a n >
< / b u t t o n >
2019-03-09 00:36:14 +00:00
< / d i v >
< / d i v >
2020-02-08 01:24:23 +00:00
< div id = "toolbarViewerRight" className = "sf-hide" >
2024-05-30 06:44:10 +00:00
< button id = "openFile" className = "toolbarButton hiddenLargeView" title = "Open File" tabIndex = "31" data - l10n - id = "open_file" >
< span data - l10n - id = "open_file_label" > Open < / s p a n >
< / b u t t o n >
< button id = "print" className = "toolbarButton hiddenMediumView" title = "Print" tabIndex = "32" data - l10n - id = "print" >
< span data - l10n - id = "print_label" > Print < / s p a n >
< / b u t t o n >
< button id = "download" className = "toolbarButton hiddenMediumView" title = "Save" tabIndex = "33" data - l10n - id = "save" >
< span data - l10n - id = "save_label" > Save < / s p a n >
< / b u t t o n >
< div className = "verticalToolbarSeparator hiddenMediumView" > < / d i v >
2023-08-09 10:54:58 +00:00
< div id = "editorModeButtons" className = "splitToolbarButton toggled" role = "radiogroup" >
2024-05-30 06:44:10 +00:00
< button id = "editorFreeText" className = "toolbarButton" disabled = "disabled" title = "Text" role = "radio" aria - checked = "false" aria - controls = "editorFreeTextParamsToolbar" tabIndex = "34" data - l10n - id = "editor_free_text2" >
< span data - l10n - id = "editor_free_text2_label" > Text < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< button id = "editorInk" className = "toolbarButton" disabled = "disabled" title = "Draw" role = "radio" aria - checked = "false" aria - controls = "editorInkParamsToolbar" tabIndex = "35" data - l10n - id = "editor_ink2" >
< span data - l10n - id = "editor_ink2_label" > Draw < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
< / d i v >
2024-05-30 06:44:10 +00:00
< div id = "editorModeSeparator" className = "verticalToolbarSeparator" > < / d i v >
2023-08-09 10:54:58 +00:00
2024-05-30 06:44:10 +00:00
< button id = "secondaryToolbarToggle" className = "toolbarButton" title = "Tools" tabIndex = "48" data - l10n - id = "tools" aria - expanded = "false" aria - controls = "secondaryToolbar" >
< span data - l10n - id = "tools_label" > Tools < / s p a n >
2019-03-09 00:36:14 +00:00
< / b u t t o n >
< / d i v >
2023-08-09 10:54:58 +00:00
< div id = "toolbarViewerMiddle" className = "d-flex align-items-center" >
< div className = "splitToolbarButton float-none" >
2024-05-30 06:44:10 +00:00
< button id = "zoomOut" className = "toolbarButton" title = "Zoom Out" tabIndex = "21" data - l10n - id = "zoom_out" >
< span data - l10n - id = "zoom_out_label" > Zoom Out < / s p a n >
2023-08-09 10:54:58 +00:00
< / b u t t o n >
2024-05-30 06:44:10 +00:00
< div className = "splitToolbarButtonSeparator d-none" > < / d i v >
2019-03-09 00:36:14 +00:00
< / d i v >
2024-05-30 06:44:10 +00:00
< div id = "scaleSelectContainer" className = "dropdownToolbarButton my-0 mx-1 float-none" >
< select id = "scaleSelect" title = "Zoom" tabIndex = "23" data - l10n - id = "zoom" defaultValue = "auto" className = "bg-white border rounded py-0 px-1" >
< option id = "pageAutoOption" title = "" value = "auto" data - l10n - id = "page_scale_auto" > Automatic Zoom < / o p t i o n >
< option id = "pageActualOption" title = "" value = "page-actual" data - l10n - id = "page_scale_actual" > Actual Size < / o p t i o n >
< option id = "pageFitOption" title = "" value = "page-fit" data - l10n - id = "page_scale_fit" > Page Fit < / o p t i o n >
< option id = "pageWidthOption" title = "" value = "page-width" data - l10n - id = "page_scale_width" > Page Width < / o p t i o n >
< option id = "customScaleOption" title = "" value = "custom" disabled = "disabled" hidden = { true } > < / o p t i o n >
< option title = "" value = "0.5" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 50 }' > 50 % < / o p t i o n >
< option title = "" value = "0.75" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 75 }' > 75 % < / o p t i o n >
< option title = "" value = "1" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 100 }' > 100 % < / o p t i o n >
< option title = "" value = "1.25" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 125 }' > 125 % < / o p t i o n >
< option title = "" value = "1.5" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 150 }' > 150 % < / o p t i o n >
< option title = "" value = "2" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 200 }' > 200 % < / o p t i o n >
< option title = "" value = "3" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 300 }' > 300 % < / o p t i o n >
< option title = "" value = "4" data - l10n - id = "page_scale_percent" data - l10n - args = '{ "scale": 400 }' > 400 % < / o p t i o n >
2019-03-09 00:36:14 +00:00
< / s e l e c t >
2024-05-30 06:44:10 +00:00
< / d i v >
< div className = "splitToolbarButton float-none" >
< button id = "zoomIn" className = "toolbarButton" title = "Zoom In" tabIndex = "22" data - l10n - id = "zoom_in" >
< span data - l10n - id = "zoom_in_label" > Zoom In < / s p a n >
< / b u t t o n >
< / d i v >
2019-03-09 00:36:14 +00:00
< / d i v >
< / d i v >
< div id = "loadingBar" >
2023-08-11 07:17:10 +00:00
< span className = "loading-icon loading-tip" > < / s p a n >
2024-07-18 03:58:42 +00:00
{ / * < d i v c l a s s N a m e = " p r o g r e s s " >
2024-05-30 06:44:10 +00:00
< div className = "glimmer" >
< / d i v >
< /div>*/ }
2019-03-09 00:36:14 +00:00
< / d i v >
< / d i v >
< / d i v >
2024-05-30 06:44:10 +00:00
< div id = "viewerContainer" tabIndex = "0" >
< div id = "viewer" className = "pdfViewer" > < / d i v >
2019-03-09 00:36:14 +00:00
< / d i v >
2024-05-30 06:44:10 +00:00
< / d i v >
2024-07-18 03:58:42 +00:00
{ /* <!-- mainContainer -->*/ }
2019-03-09 00:36:14 +00:00
2025-03-17 14:16:33 +00:00
< div id = "dialogContainer" className = "modal" >
2024-12-17 08:41:14 +00:00
< dialog id = "passwordDialog" className = "modal-dialog p-0 rounded border-0 shadow-none" >
< div className = "modal-content" >
< div className = "modal-header" >
< h5 className = "modal-title" > { gettext ( 'Decrypt document' ) } < / h 5 >
< button type = "button" id = "passwordCancel2" className = "align-self-center bg-transparent border-0 sf3-font sf3-font-x-01 modal-close" aria - label = { gettext ( 'Close' ) } > < / b u t t o n >
< / d i v >
2025-03-17 07:47:43 +00:00
< div className = "modal-body py-6 text-start" >
< label htmlFor = "password" id = "passwordText" data - l10n - id = "password_label" className = "form-label" > Enter the password to open this PDF file : < / l a b e l >
2024-12-17 08:41:14 +00:00
< input type = "password" id = "password" className = "form-control" / >
< / d i v >
< div className = "modal-footer" >
< button id = "passwordCancel" className = "btn btn-secondary" > < span data - l10n - id = "password_cancel" > Cancel < / s p a n > < / b u t t o n >
< button id = "passwordSubmit" className = "btn btn-primary" > < span data - l10n - id = "password_ok" > OK < / s p a n > < / b u t t o n >
< / d i v >
2019-03-09 00:36:14 +00:00
< / d i v >
2023-08-09 10:54:58 +00:00
< / d i a l o g >
< dialog id = "documentPropertiesDialog" >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "fileNameLabel" data - l10n - id = "document_properties_file_name" > File name : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "fileNameField" aria - labelledby = "fileNameLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "fileSizeLabel" data - l10n - id = "document_properties_file_size" > File size : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "fileSizeField" aria - labelledby = "fileSizeLabel" > - < / p >
< / d i v >
2024-05-30 06:44:10 +00:00
< div className = "separator" > < / d i v >
2023-08-09 10:54:58 +00:00
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "titleLabel" data - l10n - id = "document_properties_title" > Title : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "titleField" aria - labelledby = "titleLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "authorLabel" data - l10n - id = "document_properties_author" > Author : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "authorField" aria - labelledby = "authorLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "subjectLabel" data - l10n - id = "document_properties_subject" > Subject : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "subjectField" aria - labelledby = "subjectLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "keywordsLabel" data - l10n - id = "document_properties_keywords" > Keywords : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "keywordsField" aria - labelledby = "keywordsLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "creationDateLabel" data - l10n - id = "document_properties_creation_date" > Creation Date : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "creationDateField" aria - labelledby = "creationDateLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "modificationDateLabel" data - l10n - id = "document_properties_modification_date" > Modification Date : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "modificationDateField" aria - labelledby = "modificationDateLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "creatorLabel" data - l10n - id = "document_properties_creator" > Creator : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "creatorField" aria - labelledby = "creatorLabel" > - < / p >
< / d i v >
2024-05-30 06:44:10 +00:00
< div className = "separator" > < / d i v >
2023-08-09 10:54:58 +00:00
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "producerLabel" data - l10n - id = "document_properties_producer" > PDF Producer : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "producerField" aria - labelledby = "producerLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "versionLabel" data - l10n - id = "document_properties_version" > PDF Version : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "versionField" aria - labelledby = "versionLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "pageCountLabel" data - l10n - id = "document_properties_page_count" > Page Count : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "pageCountField" aria - labelledby = "pageCountLabel" > - < / p >
< / d i v >
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "pageSizeLabel" data - l10n - id = "document_properties_page_size" > Page Size : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "pageSizeField" aria - labelledby = "pageSizeLabel" > - < / p >
< / d i v >
2024-05-30 06:44:10 +00:00
< div className = "separator" > < / d i v >
2023-08-09 10:54:58 +00:00
< div className = "row" >
2024-05-30 06:44:10 +00:00
< span id = "linearizedLabel" data - l10n - id = "document_properties_linearized" > Fast Web View : < / s p a n >
2023-08-09 10:54:58 +00:00
< p id = "linearizedField" aria - labelledby = "linearizedLabel" > - < / p >
< / d i v >
< div className = "buttonRow" >
2024-05-30 06:44:10 +00:00
< button id = "documentPropertiesClose" className = "dialogButton" > < span data - l10n - id = "document_properties_close" > Close < / s p a n > < / b u t t o n >
2023-08-09 10:54:58 +00:00
< / d i v >
< / d i a l o g >
2024-12-17 06:45:57 +00:00
< dialog id = "printServiceDialog" className = "modal-dialog p-0 rounded border-0 shadow-none" >
< div className = "modal-content" >
< div className = "modal-header" >
< h5 className = "modal-title" > { gettext ( 'Print document' ) } < / h 5 >
< button type = "button" id = "printCancel2" className = "align-self-center bg-transparent border-0 sf3-font sf3-font-x-01 modal-close" aria - label = { gettext ( 'Close' ) } > < / b u t t o n >
< / d i v >
< div className = "modal-body py-6" >
< p className = "mb-2" >
< span data - l10n - id = "print_progress_message" > Preparing document for printing … < / s p a n >
< span data - l10n - id = "print_progress_percent" data - l10n - args = '{ "progress": 0 }' className = "relative-progress" > 0 % < / s p a n >
< / p >
< progress value = "0" max = "100" className = "d-none" > < / p r o g r e s s >
< div className = "progress" >
< div className = "progress-bar" role = "progressbar" style = { { width : '0%' } } aria - valuenow = "0" aria - valuemin = "0" aria - valuemax = "100" > < / d i v >
< / d i v >
< / d i v >
< div className = "modal-footer" >
< button id = "printCancel" className = "btn btn-secondary" > < span data - l10n - id = "print_progress_close" > Cancel < / s p a n > < / b u t t o n >
< / d i v >
2023-08-09 10:54:58 +00:00
< / d i v >
< / d i a l o g >
2024-05-30 06:44:10 +00:00
< / d i v >
2024-07-18 03:58:42 +00:00
{ /* <!-- dialogContainer -->*/ }
2019-03-09 00:36:14 +00:00
2024-05-30 06:44:10 +00:00
< / d i v >
2024-07-18 03:58:42 +00:00
{ /* <!-- outerContainer -->*/ }
{ /* <div id="printContainer"></div>*/ }
2023-08-09 10:54:58 +00:00
< input type = "file" id = "fileInput" className = "hidden" / >
2019-03-09 00:36:14 +00:00
< / R e a c t . F r a g m e n t >
) ;
}
}
export default PDFViewer ;