Skip to content

Commit

Permalink
update readme and add viewer_with_hidden_buttons.html to web
Browse files Browse the repository at this point in the history
  • Loading branch information
nidafarooqui committed Dec 28, 2023
1 parent 0f062b5 commit 6d7dc9d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# PDF.js [![Build Status](https://github.com/mozilla/pdf.js/workflows/CI/badge.svg?branch=master)](https://github.com/mozilla/pdf.js/actions?query=workflow%3ACI+branch%3Amaster)


[PDF.js](https://mozilla.github.io/pdf.js/) is a Portable Document Format (PDF) viewer that is built with HTML5.

PDF.js is community-driven and supported by Mozilla. Our goal is to
create a general-purpose, web standards-based platform for parsing and
rendering PDFs.

## Creating a New Fork

- Run `npm install` (check if node version is supported, currently supports `>= 14`).
- Remove build folder from `.gitignore`.
- Update the `validateFileURL` method in `app.js` and replace code with return true.
- Run `gulp generic` to generate build files.
- Create a new `viewer_with_hidden_buttons.html` file in the `build/generic/web` folder (used for pdf previews in some areas of CE).
- Add `style="display: none !important;"` to all the button elements.
- Push build to repo.

## Contributing

PDF.js is an open source project and always looking for more contributors. To
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<!--
Copyright 2012 Mozilla Foundation
Expand Down Expand Up @@ -312,12 +312,13 @@
<div id="cursorToolButtons" role="radiogroup">
<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" style="display: none !important;">
data-l10n-id="pdfjs-cursor-text-select-tool-button" role="radio" aria-checked="true"
style="display: none !important;">
<span data-l10n-id="pdfjs-cursor-text-select-tool-button-label">Text Selection Tool</span>
</button>
<button id="cursorHandTool" class="secondaryToolbarButton" title="Enable Hand Tool"
tabindex="61" data-l10n-id="pdfjs-cursor-hand-tool-button" role="radio"
aria-checked="false" style="display: none !important;">
tabindex="61" data-l10n-id="pdfjs-cursor-hand-tool-button" role="radio" aria-checked="false"
style="display: none !important;">
<span data-l10n-id="pdfjs-cursor-hand-tool-button-label">Hand Tool</span>
</button>
</div>
Expand All @@ -326,7 +327,8 @@

<div id="scrollModeButtons" role="radiogroup">
<button id="scrollPage" class="secondaryToolbarButton" title="Use Page Scrolling" tabindex="62"
data-l10n-id="pdfjs-scroll-page-button" role="radio" aria-checked="false" style="display: none !important;">
data-l10n-id="pdfjs-scroll-page-button" role="radio" aria-checked="false"
style="display: none !important;">
<span data-l10n-id="pdfjs-scroll-page-button-label">Page Scrolling</span>
</button>
<button id="scrollVertical" class="secondaryToolbarButton toggled"
Expand All @@ -340,7 +342,8 @@
<span data-l10n-id="pdfjs-scroll-horizontal-button-label">Horizontal Scrolling</span>
</button>
<button id="scrollWrapped" class="secondaryToolbarButton" title="Use Wrapped Scrolling"
tabindex="65" data-l10n-id="pdfjs-scroll-wrapped-button" role="radio" aria-checked="false" style="display: none !important;">
tabindex="65" data-l10n-id="pdfjs-scroll-wrapped-button" role="radio" aria-checked="false"
style="display: none !important;">
<span data-l10n-id="pdfjs-scroll-wrapped-button-label">Wrapped Scrolling</span>
</button>
</div>
Expand All @@ -349,17 +352,20 @@

<div id="spreadModeButtons" role="radiogroup">
<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" style="display: none !important;">
tabindex="66" data-l10n-id="pdfjs-spread-none-button" role="radio" aria-checked="true"
style="display: none !important;">
<span data-l10n-id="pdfjs-spread-none-button-label">No Spreads</span>
</button>
<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" style="display: none !important;">
data-l10n-id="pdfjs-spread-odd-button" role="radio" aria-checked="false"
style="display: none !important;">
<span data-l10n-id="pdfjs-spread-odd-button-label">Odd Spreads</span>
</button>
<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" style="display: none !important;">
data-l10n-id="pdfjs-spread-even-button" role="radio" aria-checked="false"
style="display: none !important;">
<span data-l10n-id="pdfjs-spread-even-button-label">Even Spreads</span>
</button>
</div>
Expand All @@ -385,7 +391,8 @@
</button>
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12"
data-l10n-id="pdfjs-findbar-button" aria-expanded="false" aria-controls="findbar" style="display: none !important;">
data-l10n-id="pdfjs-findbar-button" aria-expanded="false" aria-controls="findbar"
style="display: none !important;">
<span data-l10n-id="pdfjs-findbar-button-label">Find</span>
</button>
<div class="splitToolbarButton hiddenSmallView">
Expand Down Expand Up @@ -415,12 +422,14 @@
</button>
<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" style="display: none !important;">
tabindex="32" data-l10n-id="pdfjs-editor-free-text-button"
style="display: none !important;">
<span data-l10n-id="pdfjs-editor-free-text-button-label">Text</span>
</button>
<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" style="display: none !important;">
tabindex="33" data-l10n-id="pdfjs-editor-ink-button"
style="display: none !important;">
<span data-l10n-id="pdfjs-editor-ink-button-label">Draw</span>
</button>
<button id="editorStamp" class="toolbarButton" disabled="disabled"
Expand All @@ -446,8 +455,8 @@
<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" style="display: none !important;">
data-l10n-id="pdfjs-tools-button" aria-expanded="false" aria-controls="secondaryToolbar"
style="display: none !important;">
<span data-l10n-id="pdfjs-tools-button-label">Tools</span>
</button>
</div>
Expand Down

0 comments on commit 6d7dc9d

Please sign in to comment.