You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to open a pdf file as new window?
I create the file with lib-pdf and save on temp folder and then I get the path and when I try to create a new WebviewWindow it open the app in another window.
This is how I'm trying to do it:
import { WebviewWindow } from '@tauri-apps/api/window';
export async function openInvoicePDF(path: string) {
const invoiceWindow = new WebviewWindow('invoiceWindow', {
url: path,
title: "Factura",
width: 800,
height: 600,
center: true,
fileDropEnabled: true
})
invoiceWindow.once('tauri://created', () => {
console.log("Criada")
})
invoiceWindow.once('tauri://error', (e) => {
console.log("Erro ao criar a janela de factura", e)
})
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
Is there a way to open a pdf file as new window?
I create the file with
lib-pdf
and save ontemp
folder and then I get the path and when I try to create a newWebviewWindow
it open the app in another window.This is how I'm trying to do it:
I really appreciate any help
OBS: I'm using react-vite with typescript
Beta Was this translation helpful? Give feedback.
All reactions