A question for geek...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] A question for geeky code peoples

15 Posts
6 Users
0 Reactions
62 Views
Posts: 76
Free Member
Topic starter
 

Hello im interested in using / creating a form that i can answer multiple choice questions and once completed press submit and for it to create a pdf or word file with prewritten paragraphs that are put into the document depending on which multiple choice question was answered.

Any ideas if such q thing exists already? Or what code would be best for it. Ideally itll be via a private web page 🙂
Thx al


 
Posted : 25/09/2011 5:23 pm
Posts: 0
Free Member
 

You don't mention what sort of technology you'ld like to be using. You're going to be needing a server-side technology for this one as far as I can see...

Assuming that you are going to use ASP.Net, you would submit the form and then read the values out of it using the code-behind file. A switch / select statement (depending on your chosen language) could then be used to evaluate the responses and then query a database for the correct paragraph to insert into the output document. (You would need to input the prewritten paragraphs into the database first, of course) It looks as though you might need a third party component to create a PDF document, but if you decide to use a Word document you might get away with doing it all using ASP.Net.

Could also be done using other server side technologies, of course, but they're not my area of expertise (assuming that I have one...)

Hope this helps, but it's hard to be more specific without knowing what you do and what your coding experience is...


 
Posted : 25/09/2011 6:02 pm
Posts: 76
Free Member
Topic starter
 

Not much coding experience im more a visual coder and not structural that being said i do understand a fair bit. Ill be using a linux server so not asp sadly, code canyon seems to have a lot of decent premade forms that export so csv files or mysql databases would that be the best starting point do you think?

Thx for your reply 🙂


 
Posted : 25/09/2011 6:07 pm
Posts: 4954
Free Member
 

You don't seems to say if this needs to be web based or if it could be via email. Google doc can create a from that links to a spread sheet and give live results. I'm not sure about linking that into a word file that could be a separate step.


 
Posted : 25/09/2011 6:12 pm
Posts: 76
Free Member
Topic starter
 

That google docs thing would kinda work however once their answers have been entered it would need to write a document (google, word or pdf) that has the customised respomse summery paragraphs populated automatically but i dont think it does that- will have another look in a few mins whilst on the pc (silly ipad)


 
Posted : 25/09/2011 6:22 pm
Posts: 19
Free Member
 

Have you considered a Word document with an embedded VBA macro?


 
Posted : 25/09/2011 6:29 pm
Posts: 401
Free Member
 

Have you considered a Word document with an embedded VBA macro?

Run away! run away!


 
Posted : 25/09/2011 6:32 pm
Posts: 0
Free Member
 

Sounds like you need something like (I think it's called) TKPDF. You'll need code to make it do anything. I know there is a Drupal (www.drupal.org) module that makes use of it - might be useful??

Rachel


 
Posted : 25/09/2011 6:37 pm
Posts: 76
Free Member
Topic starter
 

Not keen on word docs with macros- id much rather prefer a web based solution- pdf prog is interesting but not quite right


 
Posted : 25/09/2011 6:46 pm
Posts: 19
Free Member
 

I've never used it but how about something like [url= http://www.surveymonkey.com/ ]Survey Monkey[/url]?


 
Posted : 25/09/2011 7:25 pm
Posts: 401
Free Member
 

alexxx I have done exactly what you are trying to do but used pure php and PDFLib

This needs a fair bit of programmer experience though


 
Posted : 25/09/2011 7:27 pm
Posts: 76
Free Member
Topic starter
 

Survey monkey cant do the correct output sadly

Dave thanks - is it a million miles away from a mortal? Could i tweak an existing framework from codecanyons section?


 
Posted : 25/09/2011 7:35 pm
Posts: 401
Free Member
 

alexxx, there is also a really good and easy perl module called PDF::Reuse this is within the reach of mortals as perl is pretty easy to pick up and the module is dead simple and high level

[url= http://search.cpan.org/~larslund/PDF-Reuse-0.35/Reuse.pm ]PDF::Reuse[/url]

Finally you could look at itext which I think you can download as an executable to run on a server from command line

[url= http://itextpdf.com/ ]iText[/url]


 
Posted : 25/09/2011 7:47 pm
Posts: 76
Free Member
Topic starter
 

Thanks dave very kind of you for the quality of your suggestion 🙂


 
Posted : 25/09/2011 7:52 pm
Posts: 76
Free Member
Topic starter
 

Change of direction!

Ive just realised if a form is outputted to a database then it can be read and show the personal resuts (paragraphs) on screen and then there could be a very simple "save as pdf" app used instead.. Also i could reference the database for useful stats in the future! Weh!

Dave if youd be so kind do you have any suggestions on web based forms on codecanyon thatd be best for this task initially and i'll then try and get it to my plan


 
Posted : 25/09/2011 8:12 pm
Posts: 76
Free Member
Topic starter
 

Or maybe itd be best writing my own form from scratch aswell as mysqlbase?


 
Posted : 25/09/2011 8:13 pm