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

I d like to use the ADF features #5

Closed rubber-ant closed 11 years ago

rubber-ant commented 11 years ago

Add to Scanning Options the Source tab and select with 2 option : Flatbed|ADF

GM-Script-Writer-62850 commented 11 years ago

What is the source tab you are referring to?

rubber-ant commented 11 years ago

Source tab -> in the menu Scanning Options: under MODE , add an other option SOURCE with 2 choices the default Flatbed or ADF. I have tried to uncomment the line // ADF capable $OP[$i]->{"ADF"}=is_bool(strpos($help,'--batch-scan'))?false:true; but not come up on the page.

GM-Script-Writer-62850 commented 11 years ago

Oh that, you are looking at only the back end, that is not the only relevant code, that section (line 380) is just the where it detects the scanner data (when you click 'Search For Scanners' on the config page)

All i made for that was the detect code, the relevant work for GUI work does not exist. The main reason why it does not is i don't know how to make the GUI handle (the proper way to display it, part of which you just answered for me) a multi page scan, also i don't have a scanner with this feature, which makes it rather difficult to work on

line 378 was something i was experimenting with on a scanner (a crappy one, that does not seem to be well supported by sane), the option did not have the desired effect

based on what you said it would use a select menu with the options of Flatbed and Batch/ADF, what would the title for this be (fill in the ???) http://i.imgur.com/GI2p2.png

rubber-ant commented 11 years ago

??? -> Source I got one with this feature, I m working on it , I will post if I can some code GUI and Back end.

GM-Script-Writer-62850 commented 11 years ago

made a developmental version for ADF support https://github.com/downloads/GM-Script-Writer-62850/PHP-Scanner-Server/ADF-develmental-copy-of-1.2-9.tar.bz2 it will detect ADF support and offer it in the GUI, it will also tell the scanner to scan in batch mode, i have no idea how it will behave when using batch scan, you will need to make the scanned page display multiple pages and such i would think, make each download format work with multiple files, update the edit, view pages, etc. to support this

rubber-ant commented 11 years ago

Something is wrong it , if I set multi-page to yes , it doesn’t recognise the ADF. I m going find out the correct command in scanimage. anyway that http://i.imgur.com/GI2p2.png is not included on ADF-deverlemntal copy of 1.29..

GM-Script-Writer-62850 commented 11 years ago

i think the command's option is --batch-scan, it should scan it fine, but the rest of the script does not know how to handle it, the debug console will show you the command it ran to operate the scanner

kingofkya commented 11 years ago

Did you guys make and progress with the ADF feature? Just got myself one of theses(link below), just wish the adf worked with this php app.

http://www.rakuten.com/prod/konica-minolta-magicolor-1690mf-multifunction-color-laser-printer/210635682.html

GM-Script-Writer-62850 commented 11 years ago

i think you misunderstood, adf is a incomplete feature and i am not able to test it to begin with as i don't have a adf scanner, the front end work is what is needed now assumed what i did on the backed works, infact i am not sure where to begin with that part, i dont even know how a multipage scan even looks (is it one file? is it many?) how can i get multiple pages on one page for editing. what format is the multi page doc scan in? if scanimage makes it a single file i can probably get something going with it

i added the ADF backed in the hopes that someone would come along and finish it, i though you were interested in doing that honestly at first

BTW i am the ONLY dev on this

in the dev copy i linked if you try to use the adf feature and you look in the debug console what happened when the scanimage command was ran?

rubber-ant commented 11 years ago

I m working for my HP LaserJet 100 colorMFP M175nw , asap can I will post some news !

rubber-ant commented 11 years ago

I made a simple version with ADF support for HP LaserJet 100 colorMFP M175nw https://github.com/claenjoy/PHP-Scanner-Server

don 't have time to leave all your features on so I comment most of them .
In my version 1.2-9.1 you can only download a file pdf.

@GM-Script-Writer-62850 thanks a lot for your collaboration

GM-Script-Writer-62850 commented 11 years ago

think you could tell me how to upload my updates? i just used the downloads page since i never figured it out i just want to tell github here is the directory now update everything that is different and follow symlinks if you could tell me how to do that it would be great

I will try to complete what you started, or at least make improvements and comment it out, maybe make a boolean variable to toggle to enable/disable it as a testing feature

rubber-ant commented 11 years ago

I send you a pull request from my version master to yours, I suggest to create a new branch and then move my to there .

GM-Script-Writer-62850 commented 11 years ago

Sorry, i don't intend to just use everything you made as is, i have some ideas i want to try, i don't want to eliminate features to add adf i am thinking about making a folder in the all scans page for feed scans and making a animated gif of the 1st few pages for the preview and when you view the folder you can edit each image and or download a pdf or all the images i think my moms printer has a feeder, i can test the commands that

what i don't know how to do is update 1.2-8 to 1.2-9 on github when i get the adf stuff working to my liking i will probably use 1.3-0 as the version number

rubber-ant commented 11 years ago

maybe help you , http://git-scm.com/documentation which machine are you using ? 1 download and install git for your machine http://git-scm.com/downloads 2 download your original 1.2-8 your local machine 3 don't use the web git but your CLI 4 go in the folder "PHP-Scanner-Server" check if git it s working command : "git status" 5 edit in the same folder all file you need 6 command : "git commit -a " 7 command : " git push https://github.com/GM-Script-Writer-62850/PHP-Scanner-Server" ask urname and password

done

GM-Script-Writer-62850 commented 11 years ago

Xubuntu 13.04 is the OS

rubber-ant commented 11 years ago

ok , number 1 -> command : apt-get install git :)

GM-Script-Writer-62850 commented 11 years ago

Hopefully this follow symlinks, i made a dummy folder so the .git stuff stays out of the way and symlinked all the files

GM-Script-Writer-62850 commented 11 years ago

FINALLY I know how to update this thing, thanks, is there a way to make it follow symlinks?

GM-Script-Writer-62850 commented 11 years ago

never mind it is missing files :(

GM-Script-Writer-62850 commented 11 years ago

ok, got then in with "git add ."

GM-Script-Writer-62850 commented 11 years ago

Know a way to center image in the pdf file? convert * -page Letter test.pdf edit: found this, but it breaks large images convert * -gravity Center -page Letter test.pdf

rubber-ant commented 11 years ago

hi , not sure , I just changed your code for my scan I havent much time ... , if you make a new branch I can pull my work 1.2.9-1 and then you can carry on with it !

GM-Script-Writer-62850 commented 11 years ago

if you have paper in your feeder are you able to scan only 1 page and it not feed every sheet through the scanner? currently working on adding support for adf "/tmp/scan-".md5(time().rand()) should be cleaner for making a unique temp folder

GM-Script-Writer-62850 commented 11 years ago

Can you give this copy a test http://www.mediafire.com/?zms17183qs1q11n

GM-Script-Writer-62850 commented 11 years ago

ADF is FINALLY implemented, as of version 1.3-0

rubber-ant commented 11 years ago

very good job , I will stay with my mod version , it s very easy gui and not many options and just one button for downloading .

Just have small issues after I do the "scan image" , the browser restore all my options on the left , could you tell me where is the option to avoid that because I d like to keep all last options. example : I need to scan 3 pages with flatbed source and I d like to have 300 dpi , every time I scan image I need to set 3 times 300 dpi otherwise is going to the default 100dpi.

thanks a lot

GM-Script-Writer-62850 commented 11 years ago

Use the save settings feature, one click to restore your favorite settings Settings reverting to default is it just not altering them to what the last scan was, they are the defaults

After you run a scan, the settings from the last scan are restored when the results are viewed, at least on the current 1.3-8 dev version (last updated last night)

If you mean the restore last scan button not touching the dpi setting, i think i will make it set all values in the next update it currently works using cookies, i think it will drop that for localStorage or sessionStorage dealing with cookies in JS is a pain, i prefer to avoid them The cookies are set near the end of index.php The data sent to the JS when you click the button is near the end of scan.php when the button is clicked is calls the lastScan function in main.js

You can set a preferred DPI settings by editing main.js Before: html3+='<option value="'+dpi[i]+'">'+dpi[i]+' '+(isNaN(dpi[i])?'':'DPI')+'</option>'; After: html3+='<option value="'+dpi[i]+'"'+(dpi[i]==300?' selected="selected"':'')+'>'+dpi[i]+' '+(isNaN(dpi[i])?'':'DPI')+'</option>';

GM-Script-Writer-62850 commented 11 years ago

@kingofkya not sure if you noticed but ADF is working now, you will need to recheck for scanners to update the scanner info and clear any cached pages from your browser

GM-Script-Writer-62850 commented 11 years ago

The recent scan button now restores everything, including the save settings field (except rotate/crop) commit now only uses one cookie The original purpose of that button was to give you something to crop, since you crop scan a cropped scan outside of the image editor and rotate makes cropping not work right

GM-Script-Writer-62850 commented 11 years ago

@claenjoy you should be happy with the new feature in 1.3-9, you can now set the default values on the scanner page if there are any mods keeping you on you old version let me know what they are you can get it from the main repo or the download/change log pages

rubber-ant commented 11 years ago

thanks for your improvements but at the moments I'll keep my version because it s simple gui and without a lot of functions ! yes there is on my page https://github.com/claenjoy/PHP-Scanner-Server/archive/master.zip it is the mod of your version 1.2-9 what I need to improve in my mod is to keep the last setting page after click scan image button without use "setting file " , I tried to configured the cookie in JS and other file but it didn't work, if you want have look in my mod and send me any suggest
thanks a lot

GM-Script-Writer-62850 commented 11 years ago

You should know options the scanner does not support or are not relevant are removed