Is there a free C ++ xsl-fo to PDF engine?

Is there an xsl-fo mechanism for PDF written in C ++ that can be used in QT?

The engines that I have encountered so far are in java.

+4
source share
1 answer

You should use QXmlQuery: link

From qt docs:

Running an XSLT stylesheet is similar to running XQuery, except that when you create QXmlQuery, you must pass QXmlQuery :: XSLT20 in order to pass QXmlQuery to interpret everything it gets from setQuery () as an XSLT stylesheet, and not as XQuery. You must also set the input document by calling setFocus ().

Code:

QXmlQuery query(QXmlQuery::XSLT20); query.setFocus(QUrl("myInput.xml")); query.setQuery(QUrl("myStylesheet.xsl")); query.evaluateTo(out); 

where "out" is the pdf file. and the xsl file determine how to convert your XML file to pdf.

-1
source

All Articles