Page 1 of 1
Scanning and editing a document
Posted: Tue Mar 12, 2013 12:40 am
by lithium630
Hi. I just started with Livecode not too long ago. I need to create a Windows program for work. I would like to scan paper forms we use and fill in the blanks with the program. Is this possible or do I need to recreate the forms from scratch? Any links to applicable tutorials would be appreciated. Thanks for the help.
Re: Scanning and editing a document
Posted: Tue Mar 12, 2013 10:08 am
by Klaus
Hi Lithium630,
1. welcome to the forum!
2. scanning is not possible with the build-in means of Livecode.
You will need an "external", which has to be programmed in C or something.
I don't know of any "scanner" external, so you might need to create the forms in Livecode.
Best
Klaus
Re: Scanning and editing a document
Posted: Tue Mar 12, 2013 11:37 am
by dave_probertGA6e24
Hi,
How many forms do you have, and are you sure you would need to scan them in each time you want to fill one in? I would have thought that simply scanning in a blank form using the scanner software that came with the scanner and then using that image in a livecode program would be easier.
Creating an external to get data from a scanner would be quite a lot of work (I know because I've done it a long, long time ago in C - twain drivers, etc) and is probably not necessary.
If you are simply wanting a tool to allow users to enter the data into fields and have a way of printing the form with the data in place then it would be easier to simply make a data entry tool, create the text labels based on the field data and place them at the correct size/position on the appropriate blank form - and send that to a printer.
If I am missing something then you will need to elucidate a bit more on the requirements.
Cheers,
Dave
Re: Scanning and editing a document
Posted: Tue Mar 12, 2013 10:01 pm
by lithium630
Thank you for the replies. I don't think I explained myself well. Right now I have to fill out 7 forms for each customer by hand. The forms all contain the same basic information, name, address ect. All of the customer information is already saved in an SQL database. I would love to create a program that when I enter the customer ID #, all the forms are populated from the database and ready to print. I was hoping to use the forms I have now so that I'm not changing the look of them too much. To simplify it, I might skip the SQL part to start and just type the info. It will still be much faster. Thank you for the help.
Re: Scanning and editing a document
Posted: Tue Mar 12, 2013 11:17 pm
by Simon
Hi lithium630,
A scanner will only produce an image (leaving out OCR stuff).
You won't be able to input into the fields of an image.
In the end I would guess that you want the connection to your SQL database to avoid having to enter in information twice.
Here is a link to the lessons:
http://lessons.runrev.com/s/lessons
Search on "database" and you will find lots of info.
hmmm... but you say you already have a database, how do you populate that currently?
Simon
Re: Scanning and editing a document
Posted: Wed Mar 13, 2013 12:32 am
by sturgis
It might be possible (ok i'm sure its possible, whether its feasable is another issue) but as I was saying, it might be possible to set things up to print so that you can align what is being printed with your existing forms. Would take some trial and error to get it done. Might be easier in the long run to generate pdfs (using open printing to pdf) and as you said "recreate" your forms. Would only have to create the handlers to do this once for each form, then should be possible to populate forms on the fly from your database.
However, printing and forms are not my strong point (not sure I even have a strong point!) but i'm sure there is a way to get this done.
Re: Scanning and editing a document
Posted: Wed Mar 13, 2013 5:58 pm
by jacque
I did what Sturgis suggests once. Scan the forms and import them one per card. Then create text fields that use a matching font and size and carefully lay them over the image. It does take some juggling to get the alignment right. Then you can fill the fields from your database. It's fiddly.
The down side is that if your forms change you have to do it all over again. Another option is to recreate the form itself using LiveCode objects and fields. Those are easier to change later. Wherever a fill-in-the-blank occurs, put placeholder text where the automatic entries should go. Then when you want to auto-fill from the database you just replace the placeholders with the real data. For example, if your placeholder text is surrounded by asterisks, it could look like this:
Code: Select all
replace "***NAME***" with <user name from database> in fld "bodytext"
replace "***DATE***" with the date in fld "bodytext"
etc.
Re: Scanning and editing a document
Posted: Tue Apr 02, 2013 3:00 pm
by lithium630
For anyone else searching I just found this plugin that looks like it does exactly what I need.
https://store2.esellerate.net/store/che ... 1670235185
I haven't tried it yet because it's pretty expensive but I'm going to.