Servoy 5.2.4
Smart Client
We have a client running a solution which generates PDFs using the pdf_output plugin. We are having trouble with the PDFs when the user is using Terminal Services (hosted by Windows Server 2003 R2 Enetperprise Edition SP2). Under terminal server when they do a print preview of a report it looks fine, and when they print to paper directly from Servoy it looks fine, but when they generate the PDF it comes out all wrong - field placement isn’t respected, fonts and font sizes aren’t respected, lots of layout problems.
The code looks something like this:
plugins.pdf_output.startMetaPrintJob(file);
globals.PDFInsertFontDirectory()
//to print current record without printdialog to pdf file
reportForm.controller.print(true,false,plugins.pdf_output.getPDFPrinter());
plugins.pdf_output.endMetaPrintJob();
where the code for the globals.PDFInsertFontDirectory() method is:
function PDFInsertFontDirectory() {
if(utils.stringMiddle(application.getOSName(),1,7) == "Windows") {
plugins.pdf_output.insertFontDirectory('c:/Windows/Fonts')
}
else if(utils.stringMiddle(application.getOSName(),1,6) == "Mac OS") {
plugins.pdf_output.insertFontDirectory('/Library/Fonts/');
}
}
Any idea why and how to solve this problem? Thank you.