javascript - 使用react-native-print直接打印文档html

标签 javascript android react-native printing native

我指的设备是商米V2 PRO
我在项目中导入并链接了 react-native-print 库。

当我启动传递 html 字符串的 RNPrint.print () 函数时,它不会直接打印,而是转到一个屏幕,我可以在其中选择其他打印机(只有一个)或下载 pdf。 有没有办法跳过此屏幕并直接开始打印?

我只是在我的函数中调用它:

await RNPrint.print({ html })

最佳答案

首先,没有办法调整浏览器的选项。请不要浪费你的时间。请参阅此链接关于 printing by using JS .

关于javascript - 使用react-native-print直接打印文档html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58874681/

相关文章:

android - Firebase UI + Android 加载动画

javascript - 如何解除 React Native 中的警报?

javascript - setTimeout 函数中的变量 (jQuery)

javascript - react 组件: setState worked but didnt update component

sort() 后 JavaScript 十进制数数组顺序不正确

react-native - 在React Native(iOS)中支持动态类型

javascript - 要求 Prop 不起作用。 "Invalid call at.."

用于多个字段的 JavaScript onBlur

android - 如何避免双重科学记数法?

android - 为什么 Android 需要上下文来访问资源?