简体   繁体   English

使用App Engine从打印机进行Java打印

[英]Java printing from a printer with App Engine

How is it possible to print from a printer without a dialog box in a Java application using App Engine? 在使用App Engine的Java应用程序中,如何在没有对话框的情况下从打印机进行打印? I tried to use printJob but I'm getting the following error message: 我尝试使用printJob但收到以下错误消息:

java.awt.print.PrinterJob is a restricted class. java.awt.print.PrinterJob是受限制的类。 Please see the Google App Engine developer's guide for more details. 有关更多详细信息,请参阅Google App Engine开发人员指南。

I took a look at the App Engine developer's guide, but didn't find anything on this topic. 我查看了App Engine开发人员指南,但未找到与此主题相关的任何内容。

Many classes that deal with IO and indeed most of java.awt and graphics is not possible to use on App Engine. 许多处理IO的类,实际上是大多数java.awt和图形类,无法在App Engine上使用。 Those classes are restricted as your error message indicates. 这些类受到错误消息指示的限制。

As for what you are trying to do I think you've missed some core concepts of app engine. 至于您想做的事情,我认为您已经错过了应用引擎的一些核心概念。

Google App Engine lets you run web applications on Google's infrastructure. Google App Engine可让您在Google的基础架构上运行Web应用程序。

When you mention dialog box, PrinterJob and printing to a printer it seems to indicate you're not talking about a web application. 当您提到对话框,PrinterJob并打印到打印机时,似乎表明您不是在谈论Web应用程序。 A more realistic scenario would be preparing a pdf or similar that the client browser prints or an application that over http collects then prints locally. 更为现实的情况是准备客户端浏览器打印的pdf或类似文件,或者准备通过http收集然后在本地打印的应用程序。

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

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