diff --git a/trunk/siprp/ficha/FichaWindow.java b/trunk/siprp/ficha/FichaWindow.java index fc0e0368..4ca744e0 100644 --- a/trunk/siprp/ficha/FichaWindow.java +++ b/trunk/siprp/ficha/FichaWindow.java @@ -274,11 +274,12 @@ public class FichaWindow extends TabbedWindow exame.set( ExameData.TRABALHADOR, trabalhador ); try { - byte fo[] = createFO( exame ); + // lflores - disable FO for now + byte fo[] = null; //createFO( exame ); System.out.println( "FO sz: " + fo.length ); exame.set( ExameData.FO, fo ); - exame.set( ExameData.PDF, createPDF( fo ) ); + exame.set( ExameData.PDF, createPDF( exame ) ); // empresa.save(); // estabelecimento.save(); @@ -524,7 +525,9 @@ public class FichaWindow extends TabbedWindow { throw new Exception( "N\u00e3o existe exame" ); } - byte fo[] = (byte []) exame.get( ExameData.FO ); + + // lflores - ignore FO (for now) + byte fo[] = null; //(byte []) exame.get( ExameData.FO ); byte pdf[] = (byte []) exame.get( ExameData.PDF ); if( fo != null ) @@ -536,7 +539,7 @@ public class FichaWindow extends TabbedWindow TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR ); String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) ); nomeFicheiro = nomeFicheiro.replaceAll( " ", "_" ); - ePDF.print( pdf, nomeFicheiro ); + ePDF.print( pdf, nomeFicheiro ); } } @@ -550,10 +553,13 @@ public class FichaWindow extends TabbedWindow return FichaAptidaoCreator.getCreator().createFO( ht ); } - public byte[] createPDF( byte fo[] ) + public byte[] createPDF( ExameData exame ) throws Exception { - return FichaAptidaoCreator.getCreator().createPDF( fo ); + // byte fo[] = exame.get( ExameData.FO, fo ); + HashMap ht = createMapFromExame( exame ); + return ePDF.createPDF( ht ); +// return FichaAptidaoCreator.getCreator().createPDF( fo ); } private HashMap createMapFromExame(final ExameData exame)