← Prev in month
← Prev in thread
Next in thread →
Next in month →
FOP - SVG - Legalnotice - CC
Hi all, How to add CC svg graphics direct in pdf with fop + current batik. I have been writing some texts in Docbook that I might put online. They are not yet ready, but I figured I should have a look at the legal section. I wanted to add a CC license. As I was doing that I figured it would be nice to add the nice CC logos, to have an easy to understand license. Looking at http://labs.creativecommons.org/ they can generate me a 88x31.png.. not very nice for pdfs. So I went to the website, had a look and found svgs in the presskit. I whipped together a svg that would mix everything I needed (see attachment test.en.xml in imageobject) Warning, I am not a designer.. fop does not handle the SVG (as it has use and image parts) but with the current batik trunk library and fop trunk it works. I also tested XEP and it also works. I am running Debian sid, so if some library is missing it should be available in sid as a package. Getting fop up to spiff : ========================= # First get the latest batik (trunk, 1.7-beta) export JAVA_HOME=/usr/lib/jvm/java-6-sun/ svn checkout http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/ batik cd batik ./build.sh all-jar cd .. # Now get fop svn checkout http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/ fop cd fop # Include the new batik lib cd lib cp ../../batik/batik-1.7/lib/batik-all.jar . # need to get org.w3c.dom.svg cp ../../batik/lib/xml-apis-ext.jar . cd .. ant Testing the setup: ================== # get the test.en.xml and swe-flag.svg to the fop directory xsltproc --output test.fo /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl test.en.xml ./fop test.fo test.pdf xpdf test.pdf Hope it helped someone. Also for people who not need a CC tag, but want to throw some nice SVG graphic in the mix. /Fred
← Prev in month
← Prev in thread
Next in thread →
Next in month →