|
|
|
|
@ -35,24 +35,18 @@ public class ExamePDF {
|
|
|
|
|
|
|
|
|
|
public ExamePDF()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
FontFactory.registerDirectories();
|
|
|
|
|
String possibleNames[] = new String[]{ "Wingdings", "WingDings", "wingdings", "WINGDINGS" };
|
|
|
|
|
|
|
|
|
|
for( int n = 0; n < 4; n++ )
|
|
|
|
|
{
|
|
|
|
|
//BASE_WINGDINGS = BaseFont.createFont("C:\\WINNT\\Fonts\\WINGDING.TTF", BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
|
|
|
|
|
//BASE_WINGDINGS = BaseFont.createFont("WingDings", BaseFont.CP1252, BaseFont.EMBEDDED);
|
|
|
|
|
InputStream stream = BaseFont.getResourceStream( "WINGDING.TTF", getClass().getClassLoader() );
|
|
|
|
|
byte []bytes = new byte[ stream.available() ];
|
|
|
|
|
stream.read( bytes );
|
|
|
|
|
BASE_WINGDINGS = BaseFont.createFont("Wingdings", BaseFont.CP1252, BaseFont.EMBEDDED,
|
|
|
|
|
true, bytes, null );
|
|
|
|
|
FONT_WINGDINGS = new Font(BASE_WINGDINGS, 12);
|
|
|
|
|
// FONT_WINGDINGS = FontFactory.getFont( "Wingdings" );
|
|
|
|
|
}
|
|
|
|
|
catch( Exception ex )
|
|
|
|
|
FONT_WINGDINGS = FontFactory.getFont( possibleNames[ n ] );
|
|
|
|
|
if( FONT_WINGDINGS.getFamilyname().toLowerCase().equals( "wingdings" ) )
|
|
|
|
|
{
|
|
|
|
|
FONT_WINGDINGS = FONT_NORMAL;
|
|
|
|
|
System.out.println( "NO FONT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main( String[] args )
|
|
|
|
|
@ -158,7 +152,7 @@ public class ExamePDF {
|
|
|
|
|
|
|
|
|
|
Paragraph conteudo = new Paragraph();
|
|
|
|
|
|
|
|
|
|
conteudo.add( new Chunk( "FICHA DE APTID\u00c3O\n",
|
|
|
|
|
conteudo.add( new Chunk( "\n\nFICHA DE APTID\u00c3O\n",
|
|
|
|
|
FontFactory.getFont( "Arial", 10, Font.BOLD ) ) );
|
|
|
|
|
conteudo.add( new Chunk( "(Portaria n\u00ba1031/2002, de 10 de Agosto)",
|
|
|
|
|
FontFactory.getFont( "Arial", 7, Font.BOLD ) ) );
|
|
|
|
|
@ -365,7 +359,7 @@ public class ExamePDF {
|
|
|
|
|
texto = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
texto.append( "M\u00c9DICO DO TRABALHO: "
|
|
|
|
|
+ values.get( "medicos.nome" ) + " C.P. " + values.get( "numero_cedula" ) + "\n\n" );
|
|
|
|
|
+ values.get( "medicos.nome" ) + " C.P. " + values.get( "numero_cedula" ) + "\n" );
|
|
|
|
|
texto.append( "ASSINATURA _____________________________________________________________________________________\n\n" );
|
|
|
|
|
texto.append( "TOMEI CONHECIMENTO ___________________________________________________________ DATA:____/____/________\n" );
|
|
|
|
|
texto.append( " O RESPONS\u00c1VEL DOS RECURSOS HUMANOS" );
|
|
|
|
|
|