Leonard Rosenthol wrote: > Musing along with you. > > 1) You need an HTML parser. Depending on what level of HTML you are > planning ot support, you may also need a CSS parser. > 2) You need an HTML (and CSS?) layout engine - this is most certainly > the hardest part as evidenced by the variability among the web browsers. > 3) You need a "page breaker", since HTML isn't a page-based-format > and you don't (necessarily) wish to have element straddle pages. > 4) Finally, when you have a page-break-based layout of your HTML - > you can then get around to calling on PoDoFo to create the PDF.
To the OP: If we drop the "based on PoDoFo" part of your comments: Given the remarkable difficulty of creating a good HTML and CSS layout engine, you might do well to start with an existing system. Two suitable options are Webkit and Gecko, each with their own advantages and disadvantages. I understand that current Gecko builds use Cairo for rendering. Since Cairo has a PDF output backend available, that might well be an avenue worth investigating. The TrollTech folks are integrating WebKit into Qt. As Qt offers a PDF printing backend, that's another possibility for you. If you do really need to build on PoDoFo, it is also reasonably likely that these engines might provide a suitable base for you to write your own output backend for. I would personally consider it most unwise to try to write a whole new HTML parser/renderer at this point unless you need to handle only a very small subset of HTML for very specific purposes. -- Craig Ringer ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
