Changed PDF Creation to Functionsserver

This commit is contained in:
2025-01-30 14:32:23 +01:00
parent 30a658b083
commit 148619eb05
2 changed files with 30 additions and 5 deletions

View File

@@ -711,13 +711,16 @@ const generateDocument = async () => {
const ownTenant = profileStore.ownTenant
const path = letterheads.value.find(i => i.id === itemInfo.value.letterhead).path
const {data,error} = await supabase.functions.invoke('create_pdf',{
/*const {data,error} = await supabase.functions.invoke('create_pdf',{
body: {
invoiceData: getDocumentData(),
backgroundPath: path,
returnMode: "base64"
}
})
})*/
uri.value = await useFunctions().useCreatePDF(getDocumentData(), path)
@@ -728,7 +731,7 @@ const generateDocument = async () => {
//console.log(JSON.stringify(getDocumentData()))
uri.value = `data:${data.mimeType};base64,${data.base64}`
//uri.value = `data:${data.mimeType};base64,${data.base64}`
//uri.value = await useCreatePdf(getDocumentData(), await data.arrayBuffer())
//alert(uri.value)