我不知道它是否可行或实用,但如果是的话:如何从运行在Google App Engine上的 python 应用程序使用Google Cloud Print打印到打印机?
出于示例的目的,我们假设用户在访问 App Engine 应用程序时登录到 Google 或 Google Apps 帐户,并且该帐户连接到云感知打印机(例如,在 Google Chrome 中注册的具有云打印功能的打印机)。
例如,我想打印一个存储在 GAE 上的 blob 中的 PDF 文件。我们称之为 blob pdf_contents
。我想要一个功能:
def print_pdf(pdf_contents, printer, print_settings):
"""Prints `pdf_contents` (a blob conforming to the PDF standard) to `printer`
(a Google Cloud Printer) with the given `print_settings`"""
# what goes here?
我想知道如何去做,以及其他人是否在这方面做出了任何努力。当然,我不想将打印限制为 PDF 文件,而是想缩小示例范围。
感谢您的阅读。