File dir = new File("manual-pdf");
dir.mkdirs();
FileOutputStream fout = new FileOutputStream(new File(dir, "jOOQ-manual.fo.xml"));
Source source = new DOMSource(manual.document());
Result target = new StreamResult(fout);
transformer.transform(source, target);
fout.close();