简体   繁体   English

没有页面设置对话框时如何打印?

[英]How to print, without the Page Setup Dialog?

I'm trying to print something with Air. 我正在尝试使用Air进行打印。 Now everything works, but the Page Setup format shows up everytime. 现在一切正常,但是页面设置格式每次都会显示。 What I would like to achieve, is that the standard printer and standard paper size gets selected automatically. 我要实现的是,自动选择了标准打印机和标准纸张尺寸。 So no dialog pops up. 因此,没有对话框弹出。

I found var myPrintJob:PrintJob = new PrintJob(); if (myPrintJob.supportsPageSetupDialog) { myPrintJob.showPageSetupDialog(); } 我发现var myPrintJob:PrintJob = new PrintJob(); if (myPrintJob.supportsPageSetupDialog) { myPrintJob.showPageSetupDialog(); } var myPrintJob:PrintJob = new PrintJob(); if (myPrintJob.supportsPageSetupDialog) { myPrintJob.showPageSetupDialog(); } var myPrintJob:PrintJob = new PrintJob(); if (myPrintJob.supportsPageSetupDialog) { myPrintJob.showPageSetupDialog(); } but this just gives a possibility to actually show it. var myPrintJob:PrintJob = new PrintJob(); if (myPrintJob.supportsPageSetupDialog) { myPrintJob.showPageSetupDialog(); }但这实际上可以显示它。 Is there a way to NOT show it? 有没有办法不显示它?

Thank you! 谢谢!

Take a look here: http://help.adobe.com/en_US/as3/dev/WS059b243ca571213c1e18d17a124d9fca6d8-8000.html The showPageSetupDialog function is optional so you can just not call it. 在这里看看: http ://help.adobe.com/zh_CN/as3/dev/WS059b243ca571213c1e18d17a124d9fca6d8-8000.html showPageSetupDialog函数是可选的,因此您不能调用它。 If you want to change the parameters of the print job in the code see the "Changing print settings" section of the link above. 如果要在代码中更改打印作业的参数,请参见上面链接的“更改打印设置”部分。 Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM