Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF import + multiple barcode support #1795

Merged
merged 5 commits into from
Mar 26, 2024
Merged

PDF import + multiple barcode support #1795

merged 5 commits into from
Mar 26, 2024

Conversation

TheLastProject
Copy link
Member

@TheLastProject TheLastProject commented Mar 22, 2024

Fixes #496 and fixes #1449

TODO:

  • Import from PDF through More Options
  • Import from PDF through Android share menu
  • Support multiple barcodes
  • Make multi-barcode-picker nice (probably new issue)
  • Migrate to isolated service (new issue?)

Note: Android documentation for PdfRenderer states:

If the file is from an untrusted source it is recommended to run the renderer in a separate, isolated process with minimal permissions to limit the impact of security exploits. Note: The constructor should be instantiated on the ERROR(/android.annotation.WorkerThread) as it can be long-running while loading the document.

It is unclear what exactly "minimal permissions" means. In Catima's case, the only permission the app will have is camera access, no internet access. It seems like it would be an improvement to further move this all to a Service with android:isolatedProcess set (see Service), but I'm not quite sure if that is a big enough priority to delay this functionality for especially as that may take a lot of time as I've never worked with Android services before.

With regards to long-running: I understand this is an issue, especially with networked files (see also #513) but from my testing on my (by now aging) Fairphone 3 even throwing multi-MB PDF files at Catima takes a few seconds at most, so this may be okay to delay to get the functionality out to users.

Unrelated to PDF support, the multi barcode picker currently looks like this, it should probably contain preview images or something to make it easier for users to know what to pick, but I feel that can probably wait for another task as not many users supply files with multiple barcodes:
image

@TheLastProject TheLastProject changed the title Initial PDF import through More Options menu PDF import + multiple barcode support Mar 23, 2024
@TheLastProject TheLastProject merged commit f848710 into main Mar 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Scan multiple at a time / create multiple cards from one image Import from PDF files
1 participant