diff --git a/trunk/siprp/ficha/FichaAptidaoCreator.java b/trunk/siprp/ficha/FichaAptidaoCreator.java index 9cf3f275..9ec057e7 100644 --- a/trunk/siprp/ficha/FichaAptidaoCreator.java +++ b/trunk/siprp/ficha/FichaAptidaoCreator.java @@ -12,6 +12,7 @@ package siprp.ficha; import com.evolute.utils.UnicodeChecker; import com.evolute.utils.fop.FOPCreator; import com.evolute.utils.fop.FOPPrinter; +import com.evolute.utils.fop.PDFCreator; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; @@ -24,6 +25,7 @@ import java.util.HashMap; public class FichaAptidaoCreator implements FichaAptidaoConstants { private final FOPCreator fopCreator; + private final PDFCreator pdfCreator; private final FOPPrinter fopPrinter; private static FichaAptidaoCreator creator = null; @@ -32,6 +34,7 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants private FichaAptidaoCreator() { fopCreator = FOPCreator.getFOPCreator(); + pdfCreator = PDFCreator.getPDFCreator(); fopPrinter = FOPPrinter.getFOPPrinter(); } @@ -99,7 +102,8 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants } public byte[] createPDF( byte[] fo ) + throws Exception { - return null; + return pdfCreator.createPdfFromFo( fo ); } } diff --git a/trunk/siprp/impressaofichas/FichasPrinter.java b/trunk/siprp/impressaofichas/FichasPrinter.java index 119c9a22..1b21e717 100644 --- a/trunk/siprp/impressaofichas/FichasPrinter.java +++ b/trunk/siprp/impressaofichas/FichasPrinter.java @@ -96,7 +96,7 @@ public class FichasPrinter extends Thread Hashtable printOptions = new Hashtable(); //System.out.println( "OUT: " + out.toString() ); FOPPrinter.getFOPPrinter().printFO( in, false, true, printOptions ); - byte []pdfData = new PDFCreator().createPdfFromFo( toPrint ); + byte []pdfData = PDFCreator.getPDFCreator().createPdfFromFo( toPrint ); File dir = new File( new File( listPath ), StringPlainer.convertString( nomeEmpresa ).replace( ' ', '_' ) ); if( !dir.exists() ) {