no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@148 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Frederico Palma 21 years ago
parent f84e57ab19
commit d285964c1d

@ -40,7 +40,7 @@ public class Main implements Connector
Singleton.setInstance( SingletonConstants.COMPANY_NAME, "Centro Clínico Avenida" );
Singleton.setInstance( SingletonConstants.COMPANY_LOGO, "logo_evo.jpg" );
Singleton.setInstance( SingletonConstants.WEB_AWARE, Boolean.FALSE );
Singleton.setInstance( SingletonConstants.DB_NAME, "shst2" );
Singleton.setInstance( SingletonConstants.DB_NAME, "shst" );
dbase = (String)Singleton.getInstance( SingletonConstants.DB_NAME );
/* Calendar cal = Calendar.getInstance();

@ -125,13 +125,22 @@ public class ExamePDF {
public void print( byte []pdf )
throws Exception
{
FileOutputStream fos = new FileOutputStream( System.getProperty( "user.home" ) + "\\report_ficha.pdf" );
FileOutputStream fos = new FileOutputStream( System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha.pdf" );
fos.write( pdf );
fos.close();
System.out.println( "File saved." );
Process proc = Runtime.getRuntime().exec( "cmd.exe /c \"" + System.getProperty( "user.home" ) + "\\report_ficha.pdf\"" );
Process proc;
if( System.getProperty( "os.name" ).startsWith( "Windows" ) )
{
proc = Runtime.getRuntime().exec( "cmd.exe /c \"" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha.pdf\"" );
}
else
{
proc = Runtime.getRuntime().exec( "open \"" + System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha.pdf\"" );
}
proc.waitFor();
new File( System.getProperty( "user.home" ) + "\\report_ficha.pdf" ).delete();
new File( System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "report_ficha.pdf" ).delete();
}
public byte[] createPDF( Hashtable values )

Loading…
Cancel
Save