简体   繁体   English

使用Java,如何让用户不使用打印对话框就可以设置打印机选项?

[英]Using Java, how can I let users set the printer options without using the print dialog?

I am developing an application as a college project. 我正在将应用程序开发为大学项目。 It's (almost) complete, with most features working properly. 它(几乎)已经完成,大多数功能都正常运行。

The application records visitor information and prints a visitor badge for each visitor. 该应用程序记录访问者信息并为每个访问者打印访问者徽章。 The visitor enters their information into the system through a user friendly interface, on completion a visitor badge is automatically printed and their details are saved to a database. 访客通过用户友好的界面将其信息输入系统,完成后会自动打印访客徽章并将其详细信息保存到数据库中。

This all works great!! 这一切都很好!! We've already gotten our grades and we got top marks, couldn't be happier!! 我们已经取得了成绩,并且获得了最高分,再开心不过了!!

However, the printer options on the admin screen are quite limited for the label printer. 但是,对于标签打印机,管理屏幕上的打印机选项非常有限。 On the admin screen you can search the database and print the results using the typical print dialogue, or you can save the data to a comma delimited CSV file. 在管理屏幕上,您可以搜索数据库并使用典型的打印对话框打印结果,也可以将数据保存到以逗号分隔的CSV文件中。

All good! 都好! But as the label printer only operates from the front end of the program, where there is no print dialogue available, I need to provide access to the printer options on the admin screen then save them for use later when the label printer is in operation. 但是由于标签打印机只能从程序的前端运行,在没有可用的打印对话框的情况下,我需要在管理屏幕上提供对打印机选项的访问权限,然后将其保存以供以后在标签打印机运行时使用。 At the moment we have the ability to select what printer will be used to print the visitor badges, and we can set and save the page set-up information from the admin page - but I cannot figure out how to access the printer set-up options to provide access to the administrators without using the print dialogue. 目前,我们可以选择将使用哪种打印机来打印访客徽章的打印机,并且我们可以从管理页面设置和保存页面设置信息-但我不知道如何访问打印机设置选项,以提供对管理员的访问权限,而无需使用打印对话框。

Anyone advice would be greatly appreciated. 任何人的建议将不胜感激。

Maybe i totally got you wrong..:)..Maybe this could help you 也许我完全弄错了您.. :) ..也许这可以帮助您

Java Print API Java Print API

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

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