Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-06-14 17:27:10

inkywillow
Member
From: France
Registered: 2009-12-22
Posts: 37

HTML form to PDF

I would like to create a page where a user can submit an HTML application form that generates a PDF of it’s contents. Power users would then be able to view a list of the submitted pdfs from within the admin section.

Does anybody know if this could be achieved in Txp?

Cheers…

Tom


The Design Works – Freelance website designer

Offline

#2 2011-06-14 18:09:06

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: HTML form to PDF

I don’t think such a plugin (yet) exists.
Just a little clue : the class fpdf generates PDFs. The main question is : what data from what kind of form ? (is it a contact form ?)

Offline

#3 2011-06-16 16:32:48

inkywillow
Member
From: France
Registered: 2009-12-22
Posts: 37

Re: HTML form to PDF

Hi Claire, sorry it’s taken awhile to get back to you. Thanks for the tip, it seems to work quite well (I’m trying it out now). I have it set up and am generating PDF’s by sending a simple form, now I have to work out how save them to the server (Rather than prompting a download). The form is an application form and although a little long seems to be quite straight forward, except that I need to add extra fields with javascript if required (Should be fun!).

Thanks again, I’ll keep you posted…

Tom


The Design Works – Freelance website designer

Offline

#4 2011-06-16 17:15:43

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: HTML form to PDF

inkywillow a écrit:

Hi Claire, sorry it’s taken awhile to get back to you.

No problem. Business is business :)

now I have to work out how save them to the server

Use the Output() method this way : $pdfObject -> Output( 'path/to/your/file.pdf', 'F' ) ;
Source : Reference manual

I need to add extra fields with javascript if required (Should be fun!).

Yoohooo !

Offline

#5 2011-06-16 17:44:02

inkywillow
Member
From: France
Registered: 2009-12-22
Posts: 37

Re: HTML form to PDF

Ha ha, thanks for that but you were about 3 minutes too late, I had (literally) just cracked it!

Next time I’ll wait a bit. :)

Merci bien quand même…


The Design Works – Freelance website designer

Offline

#6 2011-06-16 19:26:55

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: HTML form to PDF

inkywillow a écrit:

Ha ha, thanks for that but you were about 3 minutes too late, I had (literally) just cracked it!

:)) Glad you did ! Good news !

Merci bien quand même…

Pas d’quoi !

Offline

Board footer

Powered by FluxBB