[英]Android: How to let my users print data from the app
I have some data in my app that consists of text and image. 我的应用程序中有一些包含文本和图像的数据。 I want to allow my users to be able to print that data.
我想让我的用户能够打印该数据。
Here are the options that I am thinking of: 这是我正在考虑的选项:
1) Convert data into HTMl format and allow users to email and they can print from their desktop. 1)将数据转换为HTM1格式,并允许用户发送电子邮件,并且他们可以从其桌面进行打印。 This will be zip file with html and images.
这将是带有html和图像的zip文件。 Pros: can be easily coded.
优点:可以轻松编码。 Cons: not sure if users will know what to do with zip file.
缺点:不确定用户是否会知道如何处理zip文件。
2) Convert to PDF. 2)转换为PDF。 But I have read on forums that iText won't work on Android.
但是我在论坛上读过,iText无法在Android上运行。 So any other options to convert to PDF?
还有其他转换为PDF的选项吗? Pros: PDF can be easily printed.
优点:可以轻松打印PDF。 Cons: have to figure out a way to convert to PDF.
缺点:必须找出一种转换为PDF的方法。
Anybody has tried allowing their users to print data? 有人尝试过允许其用户打印数据吗? What are the options
有什么选择
There is an Android app called PrinterShare that allows you to print from the phone, but I think that just prints whole documents. 有一个名为PrinterShare的Android应用程序,它允许您从手机中进行打印,但我认为这只是打印整个文档。
To do this yourself you would want to have some sort of server on your desktop machine which uses the Java Printing API to send your document to a configured printer. 为此,您可能需要在台式机上安装某种服务器,该服务器使用Java Printing API将文档发送到已配置的打印机。 I am just brainstorming here... there are a lot of details to fill in. :-)
我只是在这里集思广益...有很多细节要填写。:-)
Good luck and I hope this helps a little. 祝您好运,希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.