bb14ba1a25
...ign it to canvas Fixes a bug where there was empty space above pdf page, when page rotation is 90 or 270 degrees. Testing: open pdf and try all rotations (0, 90, 180 and 270 degrees) with various zoom levels (especially, max and min zoom levels), and make sure that text layer is aligned properly to the canvas and there aren't any unwanted blank spaces. Finally, repeat the same testing procedure for landscape mode. To check if text layer is aligned properly on debug builds, toggle text layer visibility from menu or use chrome dev tools. |
||
---|---|---|
.github | ||
app | ||
gradle | ||
.gitignore | ||
build.gradle.kts | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
PDFJS_LICENSE | ||
README.md | ||
settings.gradle.kts | ||
setup |
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.