The issue is due to optional time zone offset 'mm' field followed by
apostrophe being absent, but the parser expecting an extra apostrophe
after the time zone 'HH' field apostrophe anyway, causing it go past the
end of the date string.
Fix the issue by only checking for apostrophe if 'mm' field is present.
This improves maintainability:
1. no need to hardcode each script file in Android code
2. no need to symlink pdf.js and pdf.worker.js
3. adds sourcemaps in debug builds to help debug some pdf.js related
issues
Opening a PDF using Storage Access Framework (SAF) causes the app to
crash in some cases, when the file is not present on the device's
internal storage (for example, on Proton Drive).
...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.
- js: use double quotes consistently
- js: use strict equality operator everywhere
- js: end all statements with semi colon
- css: remove redundant unit of measures
Newer pdf.js versions don't automatically rotate text layer based on
viewport's rotation, instead they now set the value of the attribute
"data-main-rotation" to value of rotation in degrees. So, we now apply
CSS transformation to the text layer depending on the value of that
attribute.