Comments (14)
In principle, this could use the same code path as the current camera scanning functionality, creating a PDF on the phone and then uploading that to the server.
I'll look into it!
from swift-paperless.
@peterlang-p I think I got it. If the image is not already written to a temporary file (like when you share a screenshot), it's passed as a different data type. I'll add a workaround for the screenshot case, maybe that works for the LIDL app as well. Stay tuned.
from swift-paperless.
Ok @peterlang-p, I'll improve the error output next and see if we can sort out what's the issue here.
from swift-paperless.
@peterlang-p this is now in build 61 on TestFlight. Could you check it out and let me know what you think? It should now be possible to:
- Share photos from other apps via the share sheet
- Select photos from the camera roll from the + button in the top right
- Select photos from the files app from the + button in the top right
- Import multiple inputs from files app and share sheet. If multiple images are given, they are always combined into a single PDF.
from swift-paperless.
Awesome, thank you @paulgessinger!
I just had a look and here are my findings:
- sharing from fotos app works perfectly fine
- sharing from mail app works perfectly fine
- importing images via the + button in the paperless app works fine
-> I noticed the selection of fotos seems not to be reset. When I reopen this dialog all previously selected images are still selected and I need to deselect them first in order to create a new upload - conversion of the image(s) to pdf is great, even if the file size is a bit large
- sharing from the LIDL app, results in "invalidAttachment"
In regards to the LIDL "issue,":
It seems that when I click on the share option in the LIDL app, instead of directly accessing the share dialog, it scrolls down and takes a screenshot of the entire receipt. Following this, the share dialog finally appears. However, when attempting to share it to paperless from this point, I encounter the "invalidAttachment" error.
By first saving the screenshot to the camera roll and then importing it from there, I'm able to successfully share the receipt to paperless without any issues.
from swift-paperless.
@peterlang-p could you share your logs from after the LIDL export fails with "invalidAttachment" (I need to improve the error output here in any case.)
from swift-paperless.
Certainly. However, unfortunately, there doesn't seem to be anything visible in the logs when I attempt to share from the LIDL app. Nevertheless, I'll send them to you via email.
from swift-paperless.
@peterlang-p can you try build 65 on TestFlight?
from swift-paperless.
@peterlang-p can you try build 65 on TestFlight?
Just gave it a try and I'm afraid I still get the "invalidAttachment" error, when trying to share from the LIDL app. But I noticed that the share dialog in the LIDL app does not have a preview compared to "normal" screenshots. Maybe that helps.
from swift-paperless.
@peterlang-p build 67 on TestFlight now has a view in case of invalidAttachment
that allows you to export the logs from the correct process (i.e. the share extension). Could you give that a shot?
from swift-paperless.
Hey @paulgessinger
I just tested build 67 and I cannot reproduce the error anymore. Sharing directly from the Lidl app works perfectly now. I noticed it’s imported as a png now instead of pdf but that’s totally fine for me.
Thank you so much for adding that feature.
And let me know when I can help / test something more.
from swift-paperless.
Awesome!
Indeed, I had to change the way incoming images are handled: I was converting them to a PDF right in the share extension before, but I realized that this causes the extension to go over the 120M memory limit imposed by the OS quite frequently. Instead, I'm now just POST'ing the incoming image to Paperless-ngx, which will create a PDF from it in the backend.
I believe in the end you should end up with a PDF in Paperless-ngx, right?
from swift-paperless.
It seems to stay as a png in paperless as far as I can see, but maybe there’s a config in paperless for conversion that I might have missed.
For me png is totally fine for these receipts, tho 🎉
from swift-paperless.
@peterlang-p I think this is just the original file name though. The OCR result pretty much has to be stored in a PDF, and indeed in my testing I'm able to select text in the document view on the right on the web interface after the processing has been completed.
from swift-paperless.
Related Issues (20)
- URL invalid HOT 6
- Advanced search possible? HOT 1
- Task management
- Support for audit log display
- Incorrect preview image for non portrait document formats
- Translation update for v1.2.0 HOT 14
- URL callback scheme for viewing documents HOT 1
- Custom colorscheme
- Date decoding error HOT 18
- Update filter rule types
- Empty create document sheet after receiving scan
- Set ASN directly on upload
- Unable to get API and backend version: X-Version not available HOT 7
- Release notes display feature
- Allow settings for default search mode and default sort ordering
- Collect all app settings in singleton to allow communication across the app
- added support in IOS file application
- Strip file extension from document name HOT 3
- Bug: error message for double ASN HOT 1
- Support filter by date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-paperless.