pdf.js/examples/mobile-viewer
Jonas Jenwald 97c2ce9da0 Ensure that GenericL10n works if the locale files cannot be loaded
- Ensure that localization works in the GENERIC viewer, even if the necessary locale files cannot be loaded.
   This was the behaviour prior to the introduction of Fluent, and it seems worthwhile to keep that (especially since we already bundle the en-US strings anyway).

 - Let the `GenericL10n`-implementation use the *bundled* en-US strings directly when no language is provided.

 - Remove the `NullL10n`-implementation, and simply fallback to `GenericL10n`, to reduce the maintenance burden of viewer-components localization.

 - Indirectly, given the previous point, stop exporting `NullL10n` in the viewer-components since it's now removed.
   Note that it was never really intended to be used directly and only existed as a fallback.

*Please note:* This doesn't affect the Firefox PDF Viewer, thanks to the use of import maps.
2024-01-31 14:07:11 +01:00
..
images Move B2G viewer to the examples folder 2016-07-27 17:31:52 +02:00
README.md Correct the instructions in the README file for examples/mobile-viewer 2018-07-08 15:32:06 +02:00
viewer.css Simplify the l10n-handling in the mobile-viewer example 2023-10-28 10:26:34 +02:00
viewer.html Simplify the l10n-handling in the mobile-viewer example 2023-10-28 10:26:34 +02:00
viewer.mjs Ensure that GenericL10n works if the locale files cannot be loaded 2024-01-31 14:07:11 +01:00

Overview

Example to demonstrate PDF.js library usage with a viewer optimized for mobile usage.

Getting started

Build PDF.js using gulp dist-install and run gulp server to start a web server. You can then work with the mobile viewer at http://localhost:8888/examples/mobile-viewer/viewer.html.

Refer to viewer.js for the source code of the mobile viewer.