PDA

View Full Version : baffled by client request! (how to)




sk3pt1c
Dec 19, 2006, 06:00 AM
right, i just got a new client for a website.
they have a company that sells furniture.
what he said he wants is for people to be able
to send orders online.
not to make a complete purchase, but just to send an
"order form" to the store they want (they have 4 stores)
so that someone can call them up and complete the order.
the odd thing is that he wants me to put the exact form online,
as it is on paper.
so the idea is this: scan the paper, make the fields editable,
incorporate some Excel features so individual prices add up and
advances are subtracted from the total cost and stuff like that,
add some check boxes and a number for each form (from 1 going upwards),
and have the client fill this in and by clicking "send" have the form
sent to a company email where it would then be printed off. then they could do the follow up by phone.
now,the thing is they want it to look like the exact form they have, because it just helps with their bureaucratic stuff.
any ideas?
am i making any sense?
thanks
john


ps. do you think i'd need some sort of security in this transaction?
it won't containt any sensitive data, but will containt personal information



iMeowbot
Dec 19, 2006, 06:44 AM
the odd thing is that he wants me to put the exact form online, as it is on paper.
This really means that you need to educate your client on how this stuff works. You can collect the information using forms that make sense for the Web, and if need be later print it in the format that makes people on the other end happy.
so the idea is this: scan the paper, make the fields editable,
This can be done with Acrobat, possibly Word. In either case, customers will loathe it. The computer is supposed to do the work.

There's no reason why the HTML form can't follow the general format of the paper version, but an actual scan would be taking things a little too far (reasonable for governments, perhaps, but not real people).

incorporate some Excel features so individual prices add up and
advances are subtracted from the total cost and stuff like that,
You might do this with a bit of javascript in the form, but that kind of real-time updating needs to be handled with care if not all customers get the same discounts, etc. It may be less pain to do a submit-and-update kind of thing (possibly again driven by javascript to keep the interactivity there, the cool kids are calling this kind of thing AJAX these days) so that the calculations and the proprietary numbers are kept private.

add some check boxes and a number for each form (from 1 going upwards), and have the client fill this in and by clicking "send" have the form sent to a company email where it would then be printed off. then they could do the follow up by phone.
It's this last step where your software can process the form (perhaps offline, so as not to keep the customer waiting) and put it into the format wanted by the store.

ps. do you think i'd need some sort of security in this transaction?
it won't containt any sensitive data, but will containt personal information
Personal information is sensitive, more now than ever because there is so much popular awareness of the problem. Even if most customers won't care, nobody's going to complain if you use SSL and the more wary customers will appreciate it.

sk3pt1c
Dec 19, 2006, 10:24 AM
thanks for all the input mate.
ajax i think is far beyond the scope of this website.
i'll have to find a way to do it like you said, have a simple form
online for people to fill in and then turn it into an "acceptable" form
for the company somehow...
i don't know how i'll manage that exactly but it looks like the only way.
maybe i'll scrap it altogether, since i will need the security anyway.
how would i go about setting ssl up?
what i'd like is for the form to open in a different window that would also
be secure, so the customer can have the website open as well to see the product they want.

notjustjay
Dec 19, 2006, 10:37 AM
thanks for all the input mate.
ajax i think is far beyond the scope of this website.
i'll have to find a way to do it like you said, have a simple form
online for people to fill in and then turn it into an "acceptable" form
for the company somehow...
i don't know how i'll manage that exactly but it looks like the only way.
maybe i'll scrap it altogether, since i will need the security anyway.
how would i go about setting ssl up?
what i'd like is for the form to open in a different window that would also
be secure, so the customer can have the website open as well to see the product they want.

I don't really have answers for you because I'm fairly new at this side of things too, but I'm watching your thread with great interest because I need to build something similar. I run a website for a summer camp and we'd like to get a real online camper registration system going. Ideally the end result would get printed up (by the receiving end!) to look just like our regular paper application forms, so the registrar, admin assistant, etc. sees a fairly homogenous stack of paper. It's not practical to have a web-based back end when half the time you need the info you're up in the middle of the woods with no internet.

iMeowbot
Dec 19, 2006, 11:00 AM
i don't know how i'll manage that exactly but it looks like the only way.

In the old days, we'd have had filled up a dedicated printer with blank forms and printed the stuff out to that printer.

A more "modern" way might be to print the details to PDF, then merge that onto a background with the original form, and email that to the sales rep.

It sure would be nice if they used a modern ordering system so you could avoid all this :(

maybe i'll scrap it altogether, since i will need the security anyway.
how would i go about setting ssl up?

It would be a good idea for a business to buy a real certificate from Thawte or some company like that. It's easy enough to make your own certificate with SSL, but the self-signed type will throw warnings up on the customer's browser and undermine the confidence you are trying to gain.

There is documentation (http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html) over at apache.org that explains how to set up SSL/TLS.

what i'd like is for the form to open in a different window that would also be secure, so the customer can have the website open as well to see the product they want.

A column approach can work well too, so that you can keep everything within one window. One of the most successful interfaces I've seen is at McMaster-Carr (http://www.mcmaster.com/), they make it very easy to get through a complicated order without losing your place.

Palad1
Dec 19, 2006, 11:35 AM
this just screams 'quick and dirty crystal reports hack-job' to me...

sk3pt1c
Dec 19, 2006, 11:43 AM
oh,i get what you're saying iMeowbot
so we have the simple form online for the customers to fill.
that data gets sent to my email for example.
i take that and put it on top of the scanned pdf which i then
send to the sales dept to print and do the follow up.
that's it?
what i'm thinking now is this:
would i have to open the scanned pdf in a photoshop type program
and type the text over it
or could i create a "mold" that i just fill the info in and merge with the
scanned background somehow?
this would make the process faster, but i have no idea how to do it
any ideas?

ps. crystal reports? (http://www.crystalreports.com/ ?)
this looks like too much for the scope of this site, care to explain? :)

iMeowbot
Dec 19, 2006, 12:12 PM
I was really thinking of something more automated, where you might print the text onto a blank PDF page, then superimpose that onto an image of the form. It may be possible to abuse the watermark action in Automator to make something like this happen.

LeviG
Dec 19, 2006, 12:53 PM
Couldn't you just use a php script and a form layout

on my sites contact page I have a table with my fields for name, email, telephone and comments which are linked to a php file which sends the information to a designated email address.
The email then turns up with (and the information too)

Submitted From: 80.77.243.186
Name:

Email:
Telephone:
Comments:

Now you should be able to do this approach but with more fields and then just print off as needed.

I'll be honest I'm no good with php (I got a mate to help me on that bit) and I'm not 100% certain you could do it so it sends to different email addresses for different locations to make it easier but I'm sure some php expert may be able to answer that if you like the idea.

As theres no financial info being sent its has not got to be secure as such, the only issue I have found is I get the occassional search engine email :)

sk3pt1c
Dec 19, 2006, 07:21 PM
LeviG, you're missing the point. i can do what you're saying easily, but the problem is that the client wants his exact form sent to him electronically filled out by the customer.

iMeowbot, i got what you're saying, but wouldn't you need to know the exact position of each field on the blank pdf so it matches the other one when you merge them? can you do that in any way?

the watermark action would work for this, as long as the text fits neatly on top of the watermarked form...

mania
Dec 19, 2006, 07:28 PM
I but you could make it look pretty close with tables and css.

Sweetfeld28
Dec 19, 2006, 07:42 PM
Couldn't you create the Order Form [or scan it into] Adobe Acrobat Pro, and create an Editable PDF? I mean this waay they could use the same form, and then the cutomer could and in their info [or whatever], then when they hit send to would be saved and sent to their email address?

I have never had to build a site like this yet, so this is just my guess.

iMeowbot
Dec 19, 2006, 08:59 PM
iMeowbot, i got what you're saying, but wouldn't you need to know the exact position of each field on the blank pdf so it matches the other one when you merge them?
Yup.
can you do that in any way?
Just get rough measurements, possibly in a regular graphics editor, then go at it with trial and error. This will be easier if the form already exists in a PDF or word processor format somewhere, because then you could mark it up and fill in fields.

If all you have is a bitmap, it might be worthwhile to recreate the form in a format you can work with more easily.

This kind of job can definitely be fiddly and aggravating, especially if the client is inflexible about the appearance of the output. I do hope that some of this stuff already exists in a usable electronic form, to save you some work :/

Couldn't you create the Order Form [or scan it into] Adobe Acrobat Pro, and create an Editable PDF? I mean this waay they could use the same form, and then the cutomer could and in their info [or whatever], then when they hit send to would be saved and sent to their email address?
That kind of thing can work okay inside a company, but it can be troublesome for outside users (the customers). There are small but important training and support issues with interactive PDF, and (very important) other businesses aren't requiring this of their customers. It's better for everyone if the customer-facing interface is kept as simple and familiar as possible.

sk3pt1c
Dec 20, 2006, 12:02 AM
yeah, you do need to keep the customer interface as simple as possible.
so iMeowbot, can i create empty fields in a blank pdf positioned properly and fill them in with the data i get from the online form or does it have to be a trial and error thing every time i have to go through the process?

what if i give the company a watermarked pdf (with their paper form as the watermark) and have the data sent to one of their emails and then show them how to put the data on top of the watermark so it fits?
(keeping in mind that i don't even know how to do this, so it might be a bit complicated for them...)

i'd just like to automate this as much as possible, so i can eliminate myself from the process, at the off chance that they get lots of orders that would mean that i'd have to be on the computer all day merging pdfs and emailing them to the sales dept, which is something i really don't want to do.

iMeowbot
Dec 20, 2006, 01:44 AM
Well yeah, that's what I was thinking when I wrote about some of the other ideas, is that you would be automating it from the start.

One other way you might do it is to have ImageMagick and ghostscript installed in the server, and use a command something like

composite -compose multiply theform.pdf thetext.pdf mergedpage.pdf

That's not the prettiest output but it would be a good first approximation.

To make the overlay text, well, there are so many text formatting languages around, that's totally up to you.

sk3pt1c
Dec 20, 2006, 07:21 AM
just one final question
say i give the client a watermarked pdf (the paper form being the watermark)
and have the data from the form sent to their email and let them do the job themselves.
how could i make editable regions on that pdf so that they can input the data given in the right position?

iMeowbot
Dec 20, 2006, 11:07 AM
You can open a regular image file in Acrobat Professional and use Tools->Advanced Editing->Text Field to create the blanks.

This page (http://koivi.com/fill-pdf-form-fields/tutorial.php) (with this one) (http://koivi.com/fill-pdf-form-fields/) has some sample PHP code that will take fields from an HTML form and plug them into a PDF document.

Acrobat Reader can't save forms that have had the fields filled in by hand, but Acrobat Standard of Professional can (so can the Mac's Preview).

sk3pt1c
Dec 20, 2006, 04:13 PM
that looks doable, even though it will be too much work for the money i'm gonna get, i want to try it just for my personal benefit and to learn some more stuff.
i have done some php at uni so that shouldn't be much of a problem.
i just don't know if the provider allows php on pages.
two questions
one is, after the processing is done and the pdf file is saved, what happens?
if someone else fills the form out right after the first customer, does the pdf get overwritten?
and second, on that tutorial page there are some questionmarked rectangles, possibly symbols the browser can't read?

jeremy.king
Dec 21, 2006, 11:20 AM
Surprised nobody has mentioned using PHP and the FPDF library. You can present the user with a normal HTML form and generate a PDF document on the server side and handle it however you want.

http://www.fpdf.org/

sk3pt1c
Dec 22, 2006, 04:25 AM
fpdf is mentioned in one of the pages iMeowbot posted i think.
right, i will have a look at all of this and try to figure out which way is the
best for me, the site and the client and get back to you guys.
thank you all very much for helping me out.
acrobat pro does seem to be able to do a lot of the process,
i think all it comes down to is finding the proper php script for the post-processing of the form data and the sending to the client's email.
is there a php script i can use to actually attach the pdf to an email and send it to the client as soon as the order is placed and saved?
thanks again
happy holidays

Aperture
Dec 22, 2006, 06:15 AM
This is just Automator, but it should work fine. You should make a specified folder for the PDFs to be saved in, then you would name each one something like 1.pdf, 2.pdf, and so on. Then tell Automator that you want it to attach & send the email using the highest numbered one. (Oh btw, you could have Automator just rename all the PDFs as the first action)

Anyway, here is a rough example.

Edit: Looks like I forgot to add the "Send Mail" Action!
http://img208.imageshack.us/img208/2932/picture1vb1.png

NoNameBrand
Dec 22, 2006, 03:53 PM
Why not create a new order form for the store based on the new online one? then they look the same and you don't have to worry about trying to copy the existing form.

sk3pt1c
Dec 22, 2006, 06:41 PM
well, cause, simply put, they just don't really want to, they want to stick to what they have and not spend money to make a new one.
i'm gonna have to look into all the suggestions and come up with a combined answer to this problem that takes me out of the equation and automates the whole process, still haven't got my head round everything that's been suggested, thanks though.
automator is sweet but these guys use windows and pcs so i don't think that'll do the job :)

iMeowbot
Dec 22, 2006, 07:33 PM
is there a php script i can use to actually attach the pdf to an email and send it to the client as soon as the order is placed and saved?
In the stuff I linked to earlier, process-xfdf.php in the zip file includes options to mail the completed PDF, instead of using a browser window.

sk3pt1c
Jan 31, 2007, 03:38 AM
i've been reading these scripts for weeks now and can't figure out which one out of all of them to use!
some look like they're doing the same thing
i just need to get input from an html form, put it on a pdf form and email it.
can someone help?

furious
Jan 31, 2007, 03:50 AM
Text boxers
________________
Name [________________] <---- text box.

In the same form as the paper they want printed.

iMeowbot
Jan 31, 2007, 09:21 AM
All right. I tested the example I posted a while back just now to make sure it really is working in its current form, and it does work. I'll outline the steps I took that worked. I used MAMP (http://www.mamp.info) as the test environment. You can test it on a real live server if you prefer.

Does everything below make sense to you? If not, where are you having trouble?

=-=-=

Okay, here we go:

First, I created a simple file in TextEdit with two silly questions ("what is your name?" and "do you like onions?"). I then save this as a PDF file using the regular Mac print dialog.

=-=-=

Next, I opened the PDF with Acrobat Pro, tuened on the advanced editing toolbar, and added two form fields. Beside the first question, I added a text field and called it "yourname". Beside the second question, i added a check box and called it "likeonions". Under the options tab of the check box properties, I changed the export value to on so that it will match the Web form values. I saved this file as mydoc.pdf

=-=-=

I downloaded the ZIP archive from http://koivi.com/fill-pdf-form-fields/ and dragged it into the htdocs folder of my MAMP directory. For convenience, I renamed the folder to fillpdf, but that's not so important. inside the fillpdf folder, I created a new folder called results, because the one in the ZIP archive was incorrectly extracted. I also dragged a copy of the mydoc.pdf created in the past step into the fillpdf folder.

=-=-=

Inside the fillpdf folder, I edited example_form.html so that it looks as follows:

<form method="post" action="process-xfdf.php">
<fieldset>
<table>
<tr><td>Enter Your Name</td><td><input type="text" name="yourname" /></td></tr>
<tr><td>Do you like onions?</td><td><input type="checkbox" name="likeonions" /></td></tr>
</table>
<input type="submit" name="submit" value="Generate FDF Data" />
</fieldset>
</form>


Notice that I added the name "submit" to the submit input at the bottom, this will be needed to make some of the sample PHP happy.

=-=-=

The next step was to edit process-xfdf.php. I changed $mailto and $from to be real addresses, and changed $pdf_file to be the URL of the PDf form (in my case, 'http://localhost:8888/fillpdf/mydoc.pdf' ). Just below that, I set $redirect to any old page (this prevents the completed PDF from being displayed in the browser).

Also, the $text_fields array had to be changed to contain ('yourname', 'likeonions') instead of the sample names.

=-=-=

That should be all. I go to localhost:8888/fillpdf/example_form.html in my browser, fill in the form, and press submit. After a few moments, a message appears in my mail with the completed .xfdf file attached. If I open this attachment in my mail, it opens the Web browser and merges the data into the online PDF (the PDF could have been offline too, but I wanted to stick with the example). From there, I can save or print it.

=-=-=-=

Just adding some random bits:

If you would rather have the PDF be a local file so that a browser doesn't need to open, copy it to wherever you need and put its full path into the $pdf_file variable. You would want to use the bare (Unix or DOS style) path, not with the file:// prefix, to avoid browser usage.

If you want to do more than print the merged form, the users will need Acrobat. Reader is limited to display and print. You may or may not care, if may be good enough to save the .xfdf files.