Add an attached document (PDF)
docjyJ opened this issue · 8 comments
It would be practical to be able to add the original document.
Currently, it is possible to reach photos of the original card.
But, some virtual gift card are in PDF format, and it is not possible to join them.
It is useful because perfecting the original document must be presented, there is supplementary info or confidential code.
Some Issue is about it but they are closing :
#1196 (comment)
It may be better to just use a third-party app to convert one PDF page into an image?
It's true but it's not the best solution
#496 (comment)
maybe we can just use an "attach" option, for any kind of document, wich opens a new app.
I think it's the better way to implement this functionality
Summary:
- Possibility of adding an attachment.
- Open the document with the application of the system.
- Added the document automatically when a new card adds from a PDF.
Thank you, your app is great!
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.
I see several options here:
- 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.
- 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.
- Something else altogether?
For displaying, we again have several options:
- 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.
- Display the PDF inline with a generic "PDF file" image with the file name below it: Less user-friendly.
- Display the PDF somewhere on the info screen.
Displaying a PDF inline | Displaying in the info screen |
---|---|
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)
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”.
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 ❤️
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).
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:
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
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).
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. ❤️
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