no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@394 bb69d46d-e84e-40c8-a05a-06db0d633741
Luis Flores 19 years ago
parent ac24e92e7c
commit 4f0eac97b3

@ -12,6 +12,7 @@ package siprp.ficha;
import com.evolute.utils.UnicodeChecker; import com.evolute.utils.UnicodeChecker;
import com.evolute.utils.fop.FOPCreator; import com.evolute.utils.fop.FOPCreator;
import com.evolute.utils.fop.FOPPrinter; import com.evolute.utils.fop.FOPPrinter;
import com.evolute.utils.fop.PDFCreator;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
@ -24,6 +25,7 @@ import java.util.HashMap;
public class FichaAptidaoCreator implements FichaAptidaoConstants public class FichaAptidaoCreator implements FichaAptidaoConstants
{ {
private final FOPCreator fopCreator; private final FOPCreator fopCreator;
private final PDFCreator pdfCreator;
private final FOPPrinter fopPrinter; private final FOPPrinter fopPrinter;
private static FichaAptidaoCreator creator = null; private static FichaAptidaoCreator creator = null;
@ -32,6 +34,7 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants
private FichaAptidaoCreator() private FichaAptidaoCreator()
{ {
fopCreator = FOPCreator.getFOPCreator(); fopCreator = FOPCreator.getFOPCreator();
pdfCreator = PDFCreator.getPDFCreator();
fopPrinter = FOPPrinter.getFOPPrinter(); fopPrinter = FOPPrinter.getFOPPrinter();
} }
@ -99,7 +102,8 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants
} }
public byte[] createPDF( byte[] fo ) public byte[] createPDF( byte[] fo )
throws Exception
{ {
return null; return pdfCreator.createPdfFromFo( fo );
} }
} }

@ -96,7 +96,7 @@ public class FichasPrinter extends Thread
Hashtable printOptions = new Hashtable(); Hashtable printOptions = new Hashtable();
//System.out.println( "OUT: " + out.toString() ); //System.out.println( "OUT: " + out.toString() );
FOPPrinter.getFOPPrinter().printFO( in, false, true, printOptions ); 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( ' ', '_' ) ); File dir = new File( new File( listPath ), StringPlainer.convertString( nomeEmpresa ).replace( ' ', '_' ) );
if( !dir.exists() ) if( !dir.exists() )
{ {

Loading…
Cancel
Save