@fto-consult/expo-ui
Version:
Bibliothèque de composants UI Expo,react-native
12 lines • 424 B
JavaScript
import {isElectron} from "$cplatform";
export default function print(pdfMakeInstance,options){
if(isElectron() && window?.ELECTRON && typeof window?.ELECTRON?.printPDF =='function'){
return pdfMakeInstance.getBase64((content)=>{
ELECTRON.printPDF({
...Object.assign({},options),
content,
})
})
}
return pdfMakeInstance.print();
}