GM-Script-Writer-62850 / PHP-Scanner-Server

Allows you to use your Linux install as a web based scanner server thus allowing you to scan with any web enabled device; Now supports server side printing! (As of 1.4.11)
59 stars 17 forks source link

Allow population/editing of email body. When OCR requested, allow editing the resulting email body, and include option to send the image as well. #25

Closed ghost closed 9 years ago

ghost commented 9 years ago

This would be very useful when searching in email for a document, to have both the OCR'd text and the image in the same email.

As the text could be quite long, I suggest a configurable limit on the number of characters, and using providing a modal pop up launched from the email dialogue.

GM-Script-Writer-62850 commented 9 years ago

the image edit button will allow you to edit the text content of a ORC scan both the image and the text are visible form the editor

ghost commented 9 years ago

Thanks for that clue. Yes, that satisfies the part about email body editing after OCR.

Still would like the facility to include the image as part of the email. Simply including it as an attachment would be fine.

ghost commented 9 years ago

Further to this, have the email body available to edit irrespective of whether the result is OCR or not ? As OCR might take longer than populating what is needed manually.

ghost commented 9 years ago

Figured out some of the markup to provide some (initial) suggested modifications, refer http://postimg.org/gallery/1hzvhqi3o/

Add a new flag, default to be Image Only. When OCR Only selected, disable the File Type selection. Remove TXT from the File Type selection.

I see on the Edit page, the markup is separate from that on the main page.

I wanted to provide some diffs for review, but I am not comfortable enough with the code base to do that.

GM-Script-Writer-62850 commented 9 years ago

im not sure when/if i will get to/do this this will not be a easy change, not as confusing as the css rotate+transition effect (very complex math)) it would not be necessary to redo that part of the ui to do that (would be a pita to handle that in the back-end with how integrated i have everything, i don't even want to imagine how many bugs that would make) it is merely a option to provide when doing a email of a .txt file i think the modification would be done to the email section, not the scanning area, assuming a preview quality image is good enough, if not it just means not deleting the image used to make the txt file and saving it in the scans folder under a appropriate file time, maybe .txt.raw (png format file) that part is near the end of index.php the ui part for the email is mostly in res/main,js

making the body of the email editable should not be that hard, should only involve main.js and email.php @ line 56

ghost commented 9 years ago

I have done a fork and pull request for the email body text, however I am not sure how to make the text box larger. Using textarea did not work.

I have done a few scans/emails to myself and the body contains the text that the email dialogue was populated with.

GM-Script-Writer-62850 commented 9 years ago

that is probably some CSS i will take care of that

GM-Script-Writer-62850 commented 9 years ago

auctually that is not the issue textarea is not a type it is a tag name you mean this <textarea name="body"></textarea>

GM-Script-Writer-62850 commented 9 years ago

i'm not sure i like the placement for the message http://i.imgur.com/uDq2qEW.png maybe below the scanned image would be better?

GM-Script-Writer-62850 commented 9 years ago

i think i like at the top more http://i.imgur.com/1mR1nV5.png

GM-Script-Writer-62850 commented 9 years ago

see commit fed83c1bfa

ghost commented 9 years ago

Thanks, that works fine.

GM-Script-Writer-62850 commented 9 years ago

does that cover everything you asked for? if so you can close this issue

ghost commented 9 years ago

Thanks, this will be fine.