pdflinux 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +165 -0
  2. package/bin/pdflinux +31 -0
  3. package/index.html +13 -0
  4. package/install.sh +254 -0
  5. package/package.json +57 -0
  6. package/public/favicon.svg +1 -0
  7. package/public/icons.svg +24 -0
  8. package/src/App.tsx +68 -0
  9. package/src/assets/hero.png +0 -0
  10. package/src/assets/react.svg +1 -0
  11. package/src/assets/vite.svg +1 -0
  12. package/src/components/Dropzone.tsx +90 -0
  13. package/src/components/FileItem.tsx +27 -0
  14. package/src/components/ProgressBar.tsx +18 -0
  15. package/src/components/Sidebar.tsx +92 -0
  16. package/src/hooks/useTheme.ts +23 -0
  17. package/src/index.css +675 -0
  18. package/src/main.tsx +10 -0
  19. package/src/pages/Dashboard.tsx +71 -0
  20. package/src/pages/ImageToPdf.tsx +100 -0
  21. package/src/pages/PdfCompress.tsx +175 -0
  22. package/src/pages/PdfCrop.tsx +112 -0
  23. package/src/pages/PdfDeletePages.tsx +151 -0
  24. package/src/pages/PdfGrayscale.tsx +100 -0
  25. package/src/pages/PdfInfo.tsx +71 -0
  26. package/src/pages/PdfMerge.tsx +135 -0
  27. package/src/pages/PdfOcr.tsx +136 -0
  28. package/src/pages/PdfPageNumbers.tsx +155 -0
  29. package/src/pages/PdfProtect.tsx +171 -0
  30. package/src/pages/PdfReorder.tsx +145 -0
  31. package/src/pages/PdfRotate.tsx +89 -0
  32. package/src/pages/PdfSplit.tsx +147 -0
  33. package/src/pages/PdfToImage.tsx +134 -0
  34. package/src/pages/PdfToText.tsx +107 -0
  35. package/src/pages/PdfUnlock.tsx +79 -0
  36. package/src/pages/PdfWatermark.tsx +77 -0
  37. package/src-tauri/Cargo.lock +5347 -0
  38. package/src-tauri/Cargo.toml +32 -0
  39. package/src-tauri/build.rs +3 -0
  40. package/src-tauri/capabilities/default.json +14 -0
  41. package/src-tauri/icons/128x128.png +0 -0
  42. package/src-tauri/icons/128x128@2x.png +0 -0
  43. package/src-tauri/icons/32x32.png +0 -0
  44. package/src-tauri/icons/Square107x107Logo.png +0 -0
  45. package/src-tauri/icons/Square142x142Logo.png +0 -0
  46. package/src-tauri/icons/Square150x150Logo.png +0 -0
  47. package/src-tauri/icons/Square284x284Logo.png +0 -0
  48. package/src-tauri/icons/Square30x30Logo.png +0 -0
  49. package/src-tauri/icons/Square310x310Logo.png +0 -0
  50. package/src-tauri/icons/Square44x44Logo.png +0 -0
  51. package/src-tauri/icons/Square71x71Logo.png +0 -0
  52. package/src-tauri/icons/Square89x89Logo.png +0 -0
  53. package/src-tauri/icons/StoreLogo.png +0 -0
  54. package/src-tauri/icons/icon.icns +0 -0
  55. package/src-tauri/icons/icon.ico +0 -0
  56. package/src-tauri/icons/icon.png +0 -0
  57. package/src-tauri/src/lib.rs +48 -0
  58. package/src-tauri/src/main.rs +6 -0
  59. package/src-tauri/src/pdf_engine.rs +1022 -0
  60. package/src-tauri/tauri.conf.json +48 -0
  61. package/tsconfig.app.json +28 -0
  62. package/tsconfig.json +7 -0
  63. package/tsconfig.node.json +26 -0
  64. package/uninstall.sh +65 -0
  65. package/vite.config.ts +7 -0
@@ -0,0 +1,32 @@
1
+ [package]
2
+ name = "app"
3
+ version = "0.1.0"
4
+ description = "PDFLinux - Privacy-first PDF tools untuk Linux"
5
+ authors = ["you"]
6
+ license = ""
7
+ repository = ""
8
+ edition = "2021"
9
+ rust-version = "1.77.2"
10
+
11
+ [lib]
12
+ name = "app_lib"
13
+ crate-type = ["staticlib", "cdylib", "rlib"]
14
+
15
+ [build-dependencies]
16
+ tauri-build = { version = "2.5.6", features = [] }
17
+
18
+ [dependencies]
19
+ serde_json = "1.0"
20
+ serde = { version = "1.0", features = ["derive"] }
21
+ log = "0.4"
22
+ tauri = { version = "2.10.3", features = [] }
23
+ tauri-plugin-log = "2"
24
+ tauri-plugin-dialog = "2"
25
+ tokio = { version = "1", features = ["rt"] }
26
+
27
+ [profile.release]
28
+ opt-level = 3
29
+ lto = true
30
+ codegen-units = 1
31
+ strip = true
32
+ panic = "abort"
@@ -0,0 +1,3 @@
1
+ fn main() {
2
+ tauri_build::build()
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "../gen/schemas/desktop-schema.json",
3
+ "identifier": "default",
4
+ "description": "enables the default permissions",
5
+ "windows": [
6
+ "main"
7
+ ],
8
+ "permissions": [
9
+ "core:default",
10
+ "dialog:default",
11
+ "dialog:allow-save",
12
+ "dialog:allow-open"
13
+ ]
14
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,48 @@
1
+ mod pdf_engine;
2
+
3
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
4
+ pub fn run() {
5
+ tauri::Builder::default()
6
+ .plugin(tauri_plugin_dialog::init())
7
+ .setup(|app| {
8
+ if cfg!(debug_assertions) {
9
+ app.handle().plugin(
10
+ tauri_plugin_log::Builder::default()
11
+ .level(log::LevelFilter::Info)
12
+ .build(),
13
+ )?;
14
+ }
15
+ Ok(())
16
+ })
17
+ .on_window_event(|_window, event| {
18
+ if let tauri::WindowEvent::Destroyed = event {
19
+ let temp_dir = std::env::temp_dir().join("pdf-tools");
20
+ let _ = std::fs::remove_dir_all(temp_dir);
21
+ }
22
+ })
23
+ .invoke_handler(tauri::generate_handler![
24
+ pdf_engine::compress_pdf,
25
+ pdf_engine::merge_pdf,
26
+ pdf_engine::split_pdf,
27
+ pdf_engine::pdf_to_image,
28
+ pdf_engine::protect_pdf,
29
+ pdf_engine::rotate_pdf,
30
+ pdf_engine::unlock_pdf,
31
+ pdf_engine::watermark_pdf,
32
+ pdf_engine::image_to_pdf,
33
+ pdf_engine::crop_pdf,
34
+ pdf_engine::get_pdf_metadata,
35
+ pdf_engine::get_pdf_info,
36
+ pdf_engine::get_temp_dir,
37
+ pdf_engine::save_file_to,
38
+ pdf_engine::cleanup_temp,
39
+ pdf_engine::delete_pages,
40
+ pdf_engine::reorder_pages,
41
+ pdf_engine::add_page_numbers,
42
+ pdf_engine::pdf_to_text,
43
+ pdf_engine::grayscale_pdf,
44
+ pdf_engine::ocr_pdf,
45
+ ])
46
+ .run(tauri::generate_context!())
47
+ .expect("error while running tauri application");
48
+ }
@@ -0,0 +1,6 @@
1
+ // Prevents additional console window on Windows in release, DO NOT REMOVE!!
2
+ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
3
+
4
+ fn main() {
5
+ app_lib::run();
6
+ }