Submit button to download in pdf.

94 views
Skip to first unread message

REmreA

unread,
Apr 17, 2011, 7:04:48 PM4/17/11
to dompdf-dev
I have simple php file with drop down boxes and text boxes, so i need
it to be downloaded in pdf when the user hits the submit button. I
have been reading, but i am noob at programming, so i am not
understanding it well. can someone provide a solution? I

BrianS

unread,
Apr 19, 2011, 2:55:46 PM4/19/11
to dompd...@googlegroups.com
This group is more oriented towards discussion of the internals of DOMPDF. You might get a better response from the support group.

When using DOMPDF your first step should be to create the HTML document you want to make into a PDF. Have you gotten this far (sorry ... hard to tell from your post)? If not, you need to have the user submit your form and use the values provided to create a HTML document. You then pass this document to DOMPDF.

Reply here or re-post on the support forum with some more details.

-b

REmreA

unread,
Apr 19, 2011, 9:24:00 PM4/19/11
to dompdf-dev
I have the html table with forms and textboxes that the user will be
filling. I am not sure about the following; "use
the values provided to create a HTML document. You then pass this
document
to DOMPDF. "

On Apr 19, 2:55 pm, BrianS <eclecticg...@gmail.com> wrote:
> This group is more oriented towards discussion of the internals of DOMPDF.
> You might get a better response from the support group<http://groups.google.com/group/dompdf/>
> .

Brian Sweeney

unread,
Apr 20, 2011, 9:54:13 AM4/20/11
to dompd...@googlegroups.com
I take it you're proficient in HTML, but not PHP? After the user fills in the forms on the web page he/she would submit the form. This would go to a PHP page that would create a new HTML document using the information submitted by the user. This document would then be fed to DOMPDF to convert to PDF.

There are a lot of tutorials out there about how to use PHP to capture form data and create a HTML document. Find one you like and see how far you can get. You should focus on creating the HTML document from the form submitted by the user. That's probably the hard part. Because creating a PDF after that is as simple as:

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream('document.pdf');



--
You received this message because you are subscribed to the Google Groups "dompdf-dev" group.
To post to this group, send email to dompd...@googlegroups.com.
To unsubscribe from this group, send email to dompdf-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dompdf-dev?hl=en.


Reply all
Reply to author
Forward
0 new messages