diff --git a/trunk/siprp/ficha/ExamePDF.java b/trunk/siprp/ficha/ExamePDF.java index c99f7288..dfd15d77 100644 --- a/trunk/siprp/ficha/ExamePDF.java +++ b/trunk/siprp/ficha/ExamePDF.java @@ -138,9 +138,9 @@ public class ExamePDF { if( System.getProperty( "os.name" ).startsWith( "Windows" ) ) { //System.out.println( "cmd.exe /c \"" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha.pdf\"" ); - proc = Runtime.getRuntime().exec( "cmd.exe /c \"" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha" + time + ".pdf\"" ); + proc = Runtime.getRuntime().exec( "cmd.exe /c \"" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + nome + "_" + time + ".pdf\"" ); proc.waitFor(); - if( !new File( System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha" + time + ".pdf" ).delete() ) + if( !new File( System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + nome + "_" + time + ".pdf" ).delete() ) { System.err.println( "File: report_ficha" + time + ".pdf - NOT DELETED" ); } @@ -149,7 +149,7 @@ public class ExamePDF { { //System.out.println( "/usr/bin/open \"" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha.pdf\"" ); try{ - proc = Runtime.getRuntime().exec( new String[]{"/usr/bin/open", "" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha" + time + ".pdf" } ); + proc = Runtime.getRuntime().exec( new String[]{"/usr/bin/open", "" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + nome + "_" + time + ".pdf" } ); } catch( Exception ex ) {