Fix PDF export with Tauri native dialogs and proper margins
- Installed @tauri-apps/plugin-dialog for native dialogs - Added tauri-plugin-dialog to Rust dependencies - Registered dialog plugin in Tauri app initialization - Replaced web alert() with Tauri message() dialog - Success dialog shows filename and download location - Error dialog shows if export fails - Added 20mm margins on all sides of PDF pages - Content width adjusted to 170mm (210mm - 40mm margins) - Multi-page support respects margins on all pages - Native dialogs work properly in Tauri app
This commit is contained in:
@@ -8,6 +8,7 @@ fn greet(name: &str) -> String {
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user