creating and viewing pdf files

Hi,

I would like to select, store and view pdf files on a windows server.

This works fine on a windows client where we use :

application.executeProgram('rundll32', 'url.dll,FileProtocolHandler', fileName);

to view the pdf.

What is the best way of doing this an a linux (ubuntu, centos) client ?

Regards,

Hi Hans,
this is working well for me:

var vOS = application.getOSName();
if(utils.stringPatternCount(vOS, 'Windows') == 1){
	application.executeProgram( 'rundll32', 'url.dll,FileProtocolHandler', vTempFile );
}
else if(utils.stringPatternCount(vOS, 'FreeBSD') == 1 || utils.stringPatternCount(vOS, 'Linux') == 1){
	application.executeProgram('mozilla', vTempFile );
}
else if(utils.stringPatternCount(vOS, 'Mac') == 1){
	application.executeProgram('open', vTempFile );
}

Thanks Thomas,

I just tested with : application.executeProgram(‘acroread’, vTempFile ); and that also works on linux,
but i will give : application.executeProgram(‘mozilla’, vTempFile ); a try.
Sounds more flexible.

Regards,

Try the free bean of jpedal

www.jpedal.org

Hans,
why don’t use you JasperReports and the JasperViewer?
Only out of curiosity.

Hi Thomas,

It is not just reporting, it is also selecting an existing pdf somewhere in the network and store
this in a specific directory, store the path to this pdf in the database and view it later on if needed.

Regards,