Changed PDF Creation to Functionsserver
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user