|
|
|
|
@ -415,7 +415,10 @@ public class PanelRelatorio extends JPanel implements CaretListener, ChangeListe
|
|
|
|
|
RelatorioPDFCreator creator = new RelatorioPDFCreator();
|
|
|
|
|
pdf = creator.createPDF( relatorio.getId() );
|
|
|
|
|
}
|
|
|
|
|
printToFile( pdf );
|
|
|
|
|
if( !printToFile( pdf ) )
|
|
|
|
|
{
|
|
|
|
|
throw new Exception( "ERRO: NULL " + ( plano ? "p " : "r " ) + relatorio.getId() );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch( Exception e )
|
|
|
|
|
{
|
|
|
|
|
@ -427,7 +430,7 @@ public class PanelRelatorio extends JPanel implements CaretListener, ChangeListe
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void printToFile( byte [] pdf ) throws IOException
|
|
|
|
|
private boolean printToFile( byte [] pdf ) throws IOException
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if( pdf != null )
|
|
|
|
|
@ -454,6 +457,7 @@ public class PanelRelatorio extends JPanel implements CaretListener, ChangeListe
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return pdf != null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private JFrame getFrame( )
|
|
|
|
|
|