public class PDFUtil {
- public static void makePDF(String foFilePath,Object pdfDestination) throws Exception
+ public static void makePDF(String foFilePath,Object pdfDestination,String stylesheetPath) throws Exception
{
try{
Driver driver = new Driver();
File foFile=new File(foFilePath);
- String html2foStyleSheetPath=MirGlobal.getConfigProperty("Home")
+ String html2foStyleSheetPath;
+ if (stylesheetPath == "FROMCONFIG"){
+ html2foStyleSheetPath=MirGlobal.getConfigProperty("Home")
+ MirGlobal.getConfigProperty("HTMLTemplateProcessor.Dir")
+ "/"
+ MirGlobal.getConfigProperty("Producer.PrintableContent.html2foStyleSheetName");
+ }
+ else {
+ html2foStyleSheetPath=stylesheetPath;
+ }
File html2foStyleSheet=new File(html2foStyleSheetPath);
InputHandler inputHandler =
- new XSLTInputHandler(foFile, html2foStyleSheet);
+ new XSLTInputHandler(foFile, html2foStyleSheet);
XMLReader parser = inputHandler.getParser();
if (pdfDestination instanceof String) {