Coder Social home page Coder Social logo

Add an attached document (PDF) about android HOT 8 OPEN

docjyJ avatar docjyJ commented on August 19, 2024 1
Add an attached document (PDF)

from android.

Comments (8)

BrilliantTrees avatar BrilliantTrees commented on August 19, 2024 1

This looks like a fantastic idea I've been playing with both Catima and Google Wallet to test the storage of loyalty cards and MUCH prefer your interface with the ability to store images of a given card (which I think makes the selection process easier if you have multiple cards stored) and minimising any data I share with Google is always a good thing!

Storing PDF's for vouchers or tickets would be a great enhancement

At present Google doesn't seem to have an option to store PDF's directly unless the ticket provider sends the confirmation email with the "Save to Wallet" option. We have a couple of upcoming theatre tickets and only have PDF's (with no "Save to Wallet" option) and although I can open the PDF, screenshot it and then import to Catima as a new image its much more of faff than importing a PDF directly.

Given that the thread above seems to suggest that you agree with the development request have you a timeline for possible implementation assuming you have gaps in your schedule?

Forgive my ignorance but I stumbled on this particular thread after trying one of the features on the current app and it not behaving as I expected. When adding a new entry under the "More Options" pop up there is the option to "Select a PDF File" but when I select a PDF from the phones files folder it returns an error message of "No Barcode Found" despite the PDF file in question being a barcode ticket. Am I completely misunderstanding what the "Select a PDF" option is intended to do or doing something wrong?

Thanks in advance

from android.

TheLastProject avatar TheLastProject commented on August 19, 2024 1

Sorry but I don't give timelines. Catima is an unpaid hobby project, things will come when I feel like working on them. For stressing about deadlines I already have my dayjob ;) If other people submit merge requests that can sometimes speed things up if the code is easy enough to review that reviewing is faster than writing it myself :)

Your PDF file not working is most likely related to #1215 as the PDF import converts every page to an image and then uses the same code as the extracting-barcode-from-image code. It indeed should work as you're describing, but there are some edge cases where the image-to-barcode conversion fails (and I'm still not sure why).

from android.

BrilliantTrees avatar BrilliantTrees commented on August 19, 2024 1

Sorry but I don't give timelines. Catima is an unpaid hobby project, things will come when I feel like working on them. For stressing about deadlines I already have my dayjob ;) If other people submit merge requests that can sometimes speed things up if the code is easy enough to review that reviewing is faster than writing it myself :)

No problem on timeline I understand that real life commitments come first, it was just a cheeky enquiry as would have been great to set up our theatre tickets today. I'll just have to go old school and either keep confirmation email or keep the PDF tickets in my download folder on phone

from android.

TheLastProject avatar TheLastProject commented on August 19, 2024

I think I've seen this request come up before. Back then there was no PDF scan support, but given there is now it might be reasonable to extend it.

I basically see two different features here, which may or may not be connected and I'm wondering what the correct UI flow for them would be. Getting these things right is quite challenging 😅

Feature 1: Adding non-image attachments

Right now, the edit screen has 3 tabs: Card, Options and Photos. Given how attachments are a bit more power-usery, "Card" is probably not the right place to put them. "Options" also doesn't feel very sensible (those are currently more advanced "card options" like grouping, notes, etc.). So, the most logical place would be either "Photos" or a new tab, but adding a 4th tab might make the screen very busy.

Right now the "Photos" tab has a "Front image" and "Back image". Obviously, random attachments like PDFs are not images.

Image of the Photos tab in the edit view

I see several options here:

  1. Rename it to "Front side" and "Back side": This has the clear downside that we're losing the logical connection to a real-life loyalty card, as in real-life you can't have a document on the front side.
  2. Rename the tab to "Attachments" and add a list of one or more attachments below that, so you can have both images and attachments: This has the downside that people may not look under "Attachments" to manage the front and back image (may cause confusion) and makes it impossible to sort attachments before photos.
  3. Something else altogether?

For displaying, we again have several options:

  1. Display the PDF inline with an image of the first page: Either a bit more storage-heavy (as we'll have to create a PNG copy of the first page) or slow while switching (as we'll have to render the first page of the PDF in real time). Rendering the first page and storing a PNG copy during saving is probably the only realistic option here.
  2. Display the PDF inline with a generic "PDF file" image with the file name below it: Less user-friendly.
  3. Display the PDF somewhere on the info screen.
Displaying a PDF inline Displaying in the info screen
Inline PDF example Info screen example

For opening, we can reuse the existing image logic to open a system PDF reader instead.

Feature 2: Automatically add source image/file on scan

This could either be saved and displayed as a generic attachment, using the "Feature 1" logic (although we probably do want new fields then) or perhaps we want to more explicitly state this is the import source below the barcode or in the info screen? That way we prevent showing users what may very well be the exact same image twice when they press next (both the generated barcode and the scanned original)

A mock-up of the view screen with the text "Imported from PDF" below the barcode, indicating the barcode was generated from a PDF file

from android.

docjyJ avatar docjyJ commented on August 19, 2024

I think the best way is simplicity.

You do an excellent job on this application! Thank you so much!

Rename the tab to "Attachments" and add a list of one or more attachments below that, so you can have both images and attachments

I think this is the simplest way.

may cause confusio

It is possible to add a placeholder.

Display the PDF inline with a generic "PDF file" image with the file name below it

The option to generate an image can be done later

we want to more explicitly state this is the import source

By adding a title to each file, it is possible to put a title by default “original imported”.

image image
placeholder displaying

These are just examples, made as you want.

I think it's the simplest and intuitive way.

Do something as generic as possible to simplify the code and give the most liberty to the user.

I hope my English is not too bad. Thank ❤️

from android.

TheLastProject avatar TheLastProject commented on August 19, 2024

I see we both lean towards updating the "photos" tab. I do worry about things being confusing to users when they can't set a PDF for the first two images but can for the others so maybe we should just change "Front image" and "Back image" to "Attachment 1" and "Attachment 2" and allow more attachments.

Your suggestion of putting the image type below the image when you're not viewing the barcode is very good, I implemented that in #1894. (I already know people are going to ask to reorder their attachments next, but well, that can be later).

from android.

docjyJ avatar docjyJ commented on August 19, 2024

I do worry about things being confusing to users when they can't set a PDF for the first two images but can for the others so maybe we should just change "Front image" and "Back image" to "Attachment 1" and "Attachment 2" and allow more attachments.

Yes, it needs to be done in a more logical way. Maybe adding hints can help show the usefulness of the feature:

image

from android.

docjyJ avatar docjyJ commented on August 19, 2024

MUCH prefer your interface with the ability to store images of a given card and minimising any data I share with Google is always a good thing!

I truly agree!

Thank you very much @TheLastProject (and all the contributors) for your magnificent work !!

Catima is for me the best alternative foss and maintained. ❤️

from android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.