inthewaves 42de305b7c move initial showSystemUi call to loadPdf
The reasoning for calling showSystemUi() in the onCreate method
before was to make the transitions for immersive mode more smooth.
However, it's only needed when the PDF has actually loaded, i.e. when
the immersive mode makes sense to use.

Before, Snackbars were partially covered by the navigation UI due to the
showSystemUi() setting the View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
flag. Moving it so that the function is only called when a PDF is loaded
fixes this issue.
2020-08-28 21:49:05 -04:00
2020-03-31 11:46:03 -04:00
2020-05-11 23:58:17 -04:00
2020-02-10 08:58:23 -05:00
2020-03-31 11:46:03 -04:00
2020-05-27 19:11:43 -04:00

Simple Android PDF viewer based on pdf.js and content providers. The app doesn't require any permissions. The PDF stream is fed into the sandboxed WebView without giving it access to content or files. Content-Security-Policy is used to enforce that the JavaScript and styling properties within the WebView are entirely static content from the apk assets. It reuses the hardened Chromium rendering stack while only exposing a tiny subset of the attack surface compared to actual web content. The PDF rendering code itself is memory safe with dynamic code evaluation disabled, and even if an attacker did gain code execution by exploiting the underlying web rendering engine, they're within the Chromium renderer sandbox with no access to the network (unlike a browser), files, or other content.

Description
Adaptation of the original PdfViewer app to work as a library (fork of https://github.com/GrapheneOS/PdfViewer)
Readme 2.9 MiB
Languages
Java 51%
Kotlin 24.2%
JavaScript 21%
CSS 3.1%
HTML 0.7%