Forums: Front End:

 

dynamically creating a pdf from html

first
 

ernieweaselfat dynamically creating a pdf from html

possible without using a third party solution?

I need to take a web page that the user has populated themselves and allow them to print it out. I am assuming converting to pdf would be the best way...

Any tutorials or help would be much appreciated.

 

OvineWorrier

There's a number of ways you could do it.

1. Generate the webpage, output it and let the user print it out using their browser. You can set up a print specific stylesheet. There are a number of tutorials kicking about on the web regarding this.

Although it's a while since it was published, AListApart has a good basic primer.

2. Use scripting to dynamically generate a PDF. This option (and whether you need to buy software) depends on the type of document you need to create. i.e. images, complex layout. There are two free PHP options that I've used in the past:

FPDF: Basic layout options. Total pain in the derriere if you need to do anything fancy with images beyond spitting them out onto the page.

DomPDF: PHP 5 only. Not bad but can be slow - depends on the size and complexity of the html you send it. Reasonable CSS support too.

HTH smile

Bleat for me, baby...
quote
 

Phantom

We use this one in .net : websupergoo.com/

Very good, but there is a licence cost.

P~

 

scudsucker

I've used the free version of ASPPDF with some success with both ASP and ASP>NET- but it is a bugger to work with.

 
first
 

Forums: Front End: dynamically creating a pdf from html

 
New Post
 
You must be logged in to post