我接下来的代码行:
_printJob = new PrintJob();
if (_printJob.start2(null, _printWorkSettings.usePageSetupDialog)) {
MonsterDebugger.trace(this, new Date());
try {
_printJob.addPage(objectoToPrint, null, _printWorkSettings.jobOptions);
} catch (error:Error) {
MonsterDebugger.trace(this, error + "/n" + error.getStackTrace() + "/n" + error.toString());
}
_printJob.send();
MonsterDebugger.trace(this, 'job sended to printer');
MonsterDebugger.trace(this, new Date());
}
当它在运行AIR 2.5的Linux机器上执行时,我得到错误2057,我检查start2方法和发送之间的时间,并且在同一秒。我还检查了属性objectToPrint是一个MovieClip。
这适用于Windows PC,我无法使用MonsterDebugger的跟踪进行更好的调试,所以任何关于如何获取有关为什么addPage返回此错误或任何错误的信息的想法关于Linux上printJob的信息?
顺便说一句,我也尝试过:
_printJob.addPage(objectoToPrint);
我得到了相同的结果。
属性_printWorkSettings.usePageSetupDialog始终为true,因此我现在显示用户的打印菜单。
Thansk提前人们:)