Hi all,
I have create this simple function for create a pdf:
const createPDF = async () => {
const response = await Print.printToFileAsync({ 'html': '<h1>Wassup</h1>' });
return response;
}
But on iphone, android or desktop the result is: open printer option rathen download the file.
I have wrong the library?
I have try also
const createPDF = async () => {
const response = await Print.printToFileAsync({ 'html': '<h1>Wassup</h1>' });
const pdfName = `${response.uri.slice(0,response.uri.lastIndexOf('/') + 1)}prenotazione_${readableDate.getTime()}.pdf`
await FileSystem.moveAsync({
from: response.uri,
to: pdfName,
});
sharePdf(pdfName);
console.log(pdfName);
return response;
}
But nothing changes