try {
db = new WikiDB(mainDirectory, databaseSubdirectory);
APIWikiModel myWikiModel = new APIWikiModel(user, db, "${image}", "file:///c:/temp/${title}", imageDirectory);
DocumentCreator creator = new DocumentCreator(myWikiModel, user, listOfTitleStrings);
creator.renderPDFToFile(mainDirectory, titleURL + ".pdf", HTMLConstants.CSS_PRINTER_STYLE);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (db != null) {
try {