From 2c9bb95bae0610adb717b9956871c56a545a3b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Flores?= Date: Tue, 13 Apr 2004 20:58:14 +0000 Subject: [PATCH] no message git-svn-id: https://svn.coded.pt/svn/SIPRP@44 bb69d46d-e84e-40c8-a05a-06db0d633741 --- trunk/siprp/ficha/ExamePDF.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/trunk/siprp/ficha/ExamePDF.java b/trunk/siprp/ficha/ExamePDF.java index 63fa787e..f16417fe 100644 --- a/trunk/siprp/ficha/ExamePDF.java +++ b/trunk/siprp/ficha/ExamePDF.java @@ -73,10 +73,13 @@ public class ExamePDF { ht.put( "servico_saude_tipo_externo", Boolean.TRUE ); ht.put( "tipo_periodico", Boolean.TRUE ); ht.put( "resultado_inapto_temp", Boolean.TRUE ); - new FileOutputStream( "C:\\Chap0804.pdf" ).write( new ExamePDF().createPDF( ht ) ); + FileOutputStream fos = new FileOutputStream( System.getProperty( "user.home" ) + "\\report.pdf" ); + fos.write( new ExamePDF().createPDF( ht ) ); + fos.close(); System.out.println( "File saved." ); - Runtime.getRuntime().exec( "cmd.exe" ); -// Runtime.getRuntime().exec( "notepad.exe" ); + Process proc = Runtime.getRuntime().exec( "cmd.exe /c \"" + System.getProperty( "user.home" ) + "\\report.pdf\"" ); + proc.waitFor(); + new File( System.getProperty( "user.home" ) + "\\report.pdf" ).delete(); System.out.println( "Done." ); } catch( Exception e ) @@ -222,7 +225,8 @@ public class ExamePDF { + ( ( values.get( "tipo_mudanca_funcao" ) == null ) ? "" : "X" ) + "\n" ); texto.append( " Por altera\u00e7\u00e3o das condi\u00e7\u00f5es de trabalho ................................ " + ( ( values.get( "tipo_trabalho" ) == null ) ? "" : "X" ) + "\n" ); - texto.append( "Outro\n" ); + texto.append( "Outro ............................................................................................. " + + ( ( values.get( "tipo_outro" ) == null ) ? "" : "X" ) + "\n" ); texto.append( "Especifique " + ( ( values.get( "tipo_outro" ) == null ) ? "" : values.get( "tipo_outro" ) ) + "" );