Forum Moderators: coopster

Message Too Old, No Replies

Coverting HTML w/CSS to PDF and RTF

Anybody know of good open-source PHP libraries?

         

vega123

5:32 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



Hello All,

I have a project where I need to figure out the most efficient way of converting an HTML document into both PDF and RTF format.

The specific HTML document is a resume.

I was wondering if anybody could recommend a single tool or a set of tools/php libraries that would automatically make the conversion from HTML to PDF and RTF.

The other alternative is explicitly defining the formatting for each of document formats, but that would take much longer.

Would rather just define format in HTML and then find some code that can automatically convert that into PDF and RTF.

Although not a requirement, would be great if it could incorporate formatting in HTML done by CSS, but I know this mght be tricky.

Thanks.

Vega

ironik

12:30 am on Mar 3, 2005 (gmt 0)

10+ Year Member



You can download the open source library 'ezpdf' from here:

[ros.co.nz...]

You'd have to read the html file with PHP and follow the examples to create a PDF document. I'm not sure about creating RTF's though.

hughie

1:03 pm on Mar 3, 2005 (gmt 0)

10+ Year Member



how does that compare to FPDF?

I've used FPDF and it's pretty good but a bit fiddly to position things and so forth, is it any better with ezpdf?

Cheers,
hughie

ironik

9:12 pm on Mar 3, 2005 (gmt 0)

10+ Year Member



I've never used FPDF, but the documentation makes it look pretty straight forward. There is a helper class that makes PDF creation a snap, but doesn't get into the more advanced stuff.

PDF creation is a bit of a dark art to me, I avoided using it thus far.

hughie

5:06 pm on Mar 4, 2005 (gmt 0)

10+ Year Member



it is a bit tricky but can do some great stuff, especially when you show it to clients who don't even know how a PDF is created the normal way.

Will give it a whirl i think.
Hughie