I have tested this, and this indeed happens, when you set the Servoy client, to use the system print dialog.
- Schermafbeelding 2014-08-20 om 10.21.05.png (87.16 KiB) Viewed 11115 times
I wondered why we never had complaints about this, and this is because we print the form, directly to pdf (with embedding fonts) inside Servoy and show it as a popup.
Did you already filled a case?? if so please let me know, I will vote for it.
Although I wonder if Servoy can do something about it, because when you don't Save as PDF or Open PDF in Preview... but directly print it the printer, the right fonts are shown on the print.
this is snippet of the code we use
- Code: Select all
/**
* @properties={typeid:24,uuid:"49aafa02-acfd-4eb7-aa8b-7708ca5cbcfa"}
* @param {String} form
* @param {String} sendfilename
* @param {Boolean} [vCurrentRecordOnly]
*/
function printAsPdf(form, sendfilename, vCurrentRecordOnly) {
if (!vCurrentRecordOnly) {
vCurrentRecordOnly = false
}
//only allow characters
var regExp = /[^a-zA-Z0-9_]/g
var filename = sendfilename.replace(regExp, '');
application.output(new Date())
plugins.pdf_output.startMetaPrintJob()
if (utils.stringMiddle(application.getOSName(), 1, 7) == "Windows") {
plugins.pdf_output.insertFontDirectory('c:/Windows/Fonts');
}
if (application.getOSName().match("Mac")) {
//plugins.pdf_output.insertFontDirectory('/System/Library/Fonts/');
plugins.pdf_output.insertFontDirectory('/Library/Fonts/');
//plugins.pdf_output.insertFontDirectory('~/Library/Fonts/');
}
forms[form].controller.print(vCurrentRecordOnly, false, plugins.pdf_output.getPDFPrinter());
var pdf = plugins.pdf_output.endMetaPrintJob()
var question = plugins.dialogs.showQuestionDialog('i18n:1.question', 'i18n:1.message.openorsavepdf', 'i18n:1.open', 'i18n:1.saveas')
if (question == i18n.getI18NMessage('i18n:1.open')) {
var filenames = plugins.file.createTempFile(filename, '.pdf')
plugins.file.writeFile(filenames, pdf);
openFile(filenames.getAbsolutePath())
} else {
var save = plugins.file.showFileSaveDialog(filename + '.pdf')
if (save) {
var success = plugins.file.writeFile(save, pdf);
if (success) {
plugins.dialogs.showInfoDialog('i18n:1.info', 'i18n:1.message.downloadsaveready', 'i18n:1.ok');
} else {
plugins.dialogs.showErrorDialog('i18n:1.error', 'i18n:1.message.downloadsaveerror', 'i18n:1.ok');
}
}
}
}