After a year or two, I had to create pdf files from the C ++ / C # program. In the end, I decided to run Apache Java FOP as a separate conversion process. Experience with xsl-fo was not pleasant. At that time there was not a single tool fully implemented by xsl-fo. Tools tended to pick a subset of specs and hack. Given the growing complexity of xsl-fo, I'm starting to wonder if there will ever be a full implementation.
FOP was usually a mistake, and considerable time was spent solving problems. XSLT and XPaths were hard to master. A few weeks passed before I saw the verbosity and was able to quickly do everything. I do not think I have ever had a head around xsl-fo. This makes the html and css model look like a toy for children. Fortunately, PDF files generate and do not have too many problems. :-)
In any case, the task: creating PDF files from xhtml output from FCKEditor.
I just can't find a library that will convert from HTML to any XSL interface.
Heh. Yes, this is because there is no one and probably there will not be html for the xsl-fo converter, which is not good. Such a converter has several things against this: browser complexity and xsl-fo complexity. For such a converter to deal with an average html document, it needs the guts of a web browser: layout, CSS support, possibly even JavaScript. Then he should take the displayed page and find out which xsl-fo is needed to get something similar, and fits into the xsl-fo page limits.
This seems like a problem with creating a word viewer: without reusing a large number of words, it takes up most of the time because it does not look the same.
So ... what can you do? Well, with a small subset of html to work with, this is a good start. We hope that the exit from FCKEditor is xhtml, since getting html in xml is a world of pain in itself (which can be useful tidy ), then, if some poor soul hadn't done FCKEditor xhtml β xsl-fo xslt for of your xsl-fo implementation, you have to create it. This includes training xsl-fo, xslt and xpath. In my experience, this will take several weeks and it will be a powerful solution.
To get started with xsl-fo, I found the following useful links:
So what is all this xsl-fo, xslt and all that? XSL-FO: ready for prime time? expressed as:
Extensible Family of Style (XSL) Family of Languages ββXSL is a family of guidelines for defining the transformation and presentation of XML documents. It consists of three parts:
- XSL Transformations (XSLT), an XML transformation language
- XML Path Language (XPath), an expression language used by XSLT to access or reference parts of an XML document. (XPath is also used by the XML Linking specification).
- XSL Formatting Objects (XSL-FO), an XML dictionary for defining formatting semantics
My advice? To run. Find another. Find another solution. Create LaTeX files and convert them to PDF files. Generate something else. Create text documents and print them using PDFCreator . Create images. Manage Firefox to print pages as PDF files. Find to avoid the need for pdf files at all. All if this is not a fight with html, xsl-fo, FOP, xslt and xpath.
PS: Let me know if you need help. :-)