Android:如何让我的用户从应用程序打印数据

发布于 2024-09-24 02:30:19 字数 310 浏览 0 评论 0原文

我的应用程序中有一些由文本和图像组成的数据。我想让我的用户能够打印该数据。

以下是我正在考虑的选项:

1) 将数据转换为 HTMl 格式,并允许用户发送电子邮件,并且可以从桌面进行打印。这将是包含 html 和图像的 zip 文件。优点:可以轻松编码。缺点:不确定用户是否知道如何处理 zip 文件。

2) 转换为PDF。但我在论坛上看到 iText 无法在 Android 上运行。那么还有其他选项可以转换为 PDF 吗?优点:PDF可以轻松打印。缺点:必须找到一种方法来转换为 PDF。

有人尝试过允许他们的用户打印数据吗?有哪些选择

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. This will be zip file with html and images. Pros: can be easily coded. Cons: not sure if users will know what to do with zip file.

2) Convert to PDF. But I have read on forums that iText won't work on Android. So any other options to convert to PDF? Pros: PDF can be easily printed. Cons: have to figure out a way to convert to PDF.

Anybody has tried allowing their users to print data? What are the options

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽清梦 2024-10-01 02:30:19

有一个名为 PrinterShare 的 Android 应用程序允许您从手机进行打印,但我认为它只能打印整个文档。

要自己执行此操作,您需要在桌面计算机上安装某种服务器,该服务器使用 Java 打印 API 将文档发送到已配置的打印机。我只是在这里集思广益......还有很多细节需要填写。:-)

祝你好运,我希望这会有所帮助。

There is an Android app called PrinterShare that allows you to print from the phone, but I think that just prints whole documents.

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. I am just brainstorming here... there are a lot of details to fill in. :-)

Good luck and I hope this helps a little.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文