android icon indicating copy to clipboard operation
android copied to clipboard

Scan document: create PDF

Open boyddensmore opened this issue 3 years ago • 9 comments

Steps to reproduce

  1. Update to Android Nextcloud app, version 3.20.0
  2. Navigate to destination folder, tap +, choose scan document from camera
  3. Take picture of document, follow prompts to finish
  4. Nextcloud file list updates, new file appears in JPG format

Expected behaviour

  • Tell us what should happen
  • File should upload in PDF format

Actual behaviour

  • Tell us what happens
  • File uploads in JPG format

Can you reproduce this problem on https://try.nextcloud.com?

  • Please create a test demo account and see if this still happens there.
  • If yes, please open up a bug report
  • If not, please verify server setup and ask for help on forum

Environment data

Android version: 10

Device model: Samsung Galaxy S9

Stock or customized system: Stock

Nextcloud app version: 3.20.0

Nextcloud server version: 23.0.3

Reverse proxy:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

boyddensmore avatar May 04 '22 16:05 boyddensmore

This is not a bug, JPEG is how it works right now.

AlvaroBrey avatar May 04 '22 17:05 AlvaroBrey

Ah, understood. I saw lots of references to PDF in the comments etc and I thought it was unlikely to get this far if it wasn't working as designed but figured I'd raise it anyway. Thanks for converting to an enhancement 🙂

boyddensmore avatar May 04 '22 17:05 boyddensmore

To add to the enhancement, also multi-page with an option to reorder and remove pages between scanning and finalizing.

lbdroid avatar May 07 '22 18:05 lbdroid

This is not a bug, JPEG is how it works right now.

So what's "built-in document scanner" in the 3.20.changelog?

jwsp1 avatar May 08 '22 19:05 jwsp1

The new document scanner isn't included in the fdroid build. See https://github.com/nextcloud/android/issues/10195

g-work avatar May 08 '22 21:05 g-work

This is not a bug, JPEG is how it works right now.

So what's "built-in document scanner" in the 3.20.changelog?

Although everybody seems to follow the same thought that a document scanner would generate PDF, as this is the standard portable Document file format, strictly speaking, a picture is also a document.

I do agree though that creating PDFs would be the common user expectation when reading "document scanner". Pictures are created by a camera, not a document scanner.

svenb1234 avatar May 08 '22 21:05 svenb1234

I actually prefer to look at the current implementation as a first step towards the ultimate goal. Right now it takes a picture, and is able to find the outline of a paper document, and manipulate the image into a flat rectangle without including part of your table and your dog's butt.

Next steps are to drop the number of colors (1-bit black and white is good for scanning typical documents) for reduced file size, add a bunch more scans to the project (i.e., multiple pages), and put those images together into a single PDF file. I actually believe that this can be done very easily using https://developer.android.com/reference/android/graphics/pdf/PdfDocument

lbdroid avatar May 09 '22 12:05 lbdroid

@boyddensmore is this enhancement still open?

ayushbhanu avatar Sep 10 '22 08:09 ayushbhanu

it would be nice if the app could scan as pdf as well, ocr isnt needed but a number of document uploads need a pdf file extension for attachments needing a manual conversion to pf,same goes for multi page documents

my understanding is that pdf files can just bundle a number of jpegs

RonnyPfannschmidt avatar Sep 12 '22 11:09 RonnyPfannschmidt

Thanks a lot!

svenb1234 avatar Jan 27 '23 18:01 svenb1234