Hi
Does anyone have any notes on how saving and displaying files (PDF’s) works in different situations?
I wish to save a form as a PDf report for recall later. ( In this case saving quotes for later reference)
In Smart client it seems it will save on the client pc by default. How do I get it to always save on the windows server. Smart client may run on Windows or Mac…
Webclient seems to always save on the Server ( this make sense)… However when I display the pdf it displays on the server and not the pc running the web client.
Here is code I have at present. Any comments appreciated
// Saves pdf to file - must save on server
forms[vForm].controller.print(true,false,plugins.pdf_output.getPDFPrinter(vFolder+vFile));
//Step 2 - View Saved pdf
var vOS = application.getOSName();
if(utils.stringPatternCount(vOS, ‘Windows’) == 1) {
// Display PDF
application.executeProgram( ‘rundll32’, ‘url.dll,FileProtocolHandler’, vFFile );
}
else if(utils.stringPatternCount(vOS, ‘Mac’) == 1){
application.executeProgram(‘open’, vFFile );
}
else if(utils.stringPatternCount(vOS, ‘FreeBSD’) == 1 || utils.stringPatternCount(vOS, ‘Linux’) == 1){
application.executeProgram(‘mozilla’, vFFile );
}
else {
application.executeProgram( ‘rundll32’, ‘url.dll,FileProtocolHandler’, vFFile );
}