gpt4 book ai didi

java - Android打印管理器-返回保存的pdf文件路径

转载 作者:行者123 更新时间:2023-12-02 13:10:11 30 4
gpt4 key购买 nike

使用 Android PrintManager API用户可以将内容以 PDF 格式保存到设备的内部/外部目录中。

我需要在创建 PDF 文件后立即获取该文件的路径。有什么方法可以直接执行此操作而无需使用文件选择器吗?

任何想法都会受到赞赏。

最佳答案

Using Android PrintManager API we can save content as PDF into device's internal/external directory.

没有。 用户可以选择将打印作业发送到本地存储的 PDF 文件。用户可以选择做其他事情:

  • 将其发送到实际打印机
  • 将其发送到其他地方(例如云打印)
  • 放弃打印作业

Is there any way to do this directly without having to use a file chooser?

不,只是因为用户不需要将内容保存到本地 PDF 文件中您可以访问的位置。除了上述所有非 PDF 替代方案之外,用户还可以将其作为 PDF 保存到可移动存储中,且位于您的应用无法访问的目录中。

I need to get that PDF file's path as soon as it is created

那么PrintManager API不适合。以其他方式生成 PDF(例如 iText)。

关于java - Android打印管理器-返回保存的pdf文件路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43985609/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com