Welcome Guest, Not a member yet? Register   Sign In
Editable PDF, modified & emailed...with CI?
#1

[eluser]Unknown[/eluser]
Hi,

I was curious if anyone had any insight into using CI or PHP with editable PDFs. A client has an online application they would like users to fill out on their site, which then sends an email to the company with a PDF attached. The PDF would be a document that looks similar to their offline application, but filled in with the user-inputted data.

The user experience would be to fill out a PDF or an HTML form and submit their info via the site.

The company would receive an email with a completed PDF.

Thanks!
#2

[eluser]Jaketoolson[/eluser]
The user experience should be them filling out an HTML form, not a PDF, but to then take the submitted FORM's content and save it to a structured PDF emailing it to the whomever. There are a ton of PHP PDF classes... and a quick google search brought me to this:
http://codeigniter.com/news/codeigniter_...deigniter/
#3

[eluser]Rok Biderman[/eluser]
I think something like this should do the trick, if you used the dompdf helper:

Code:
public function index()
    {
        if ($this->input->post())
        {
            $postdata['name'] = $this->input->post('name'); //let's say the data we want to get from the form is a name
            $html = $this->load->view('someview', $postdata, true); //pass view as a variable
            $pdfoutput = pdf_create($html, '', false);
            $tempname = 'yourtempname.pdf'; //the name is best kept dynamic (insert usernam, unixdate and such), so two simultaneus users don't overwrite each others' files'
            write_file($tempname, $pdfoutput);
            $this->email->from('[email protected]', 'Your Name');
            $this->email->to('[email protected]');

            $this->email->attach($tempname);
            $this->email->subject('Email Test');
            $this->email->message('Testing the email class.');
            $this->email->send();
            unlink($tempname); //you can delete the file afterwards so they don't eat up your space'
        }
        else
        {
            $this->load->view('theform');
        }
    }

Naturally you have to create the views 'theform' and 'someview'.
#4

[eluser]ClaudioX[/eluser]
If anyone know a lib to read pdf files, pliz, tell us!

^^

See ya.
#5

[eluser]okbang[/eluser]
Seeking a Very good High Fashion Brand Bags

In case you inquisitive about buying a chic chic backpack from a single of the most effective developer saves you'd be better with unquestionably looking at getting some Kate Folding shovel ladies handbag. Needless to say there's a lot associated with attractive musician totes in and around just what exactly you should do is to always head out to obtain browsing principal so you can examine the product in question. Kate Folding shovel is definitely former brand name throughout the manufacture of just about the most tasteful handbag who has been in ebay in almost There are twelve long time. They are just plain popular for having unveiled the fashion earth into your general box outline microfiber bags.
#6

[eluser]fcodebue[/eluser]
[quote author="ClaudioX" date="1312867337"]If anyone know a lib to read pdf files, pliz, tell us!

^^

See ya.[/quote]

here you are:

http://www.setasign.de/

this is commecial product... but marvellous !!!




Theme © iAndrew 2016 - Forum software by © MyBB