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.
- package/README.md +165 -0
- package/bin/pdflinux +31 -0
- package/index.html +13 -0
- package/install.sh +254 -0
- package/package.json +57 -0
- package/public/favicon.svg +1 -0
- package/public/icons.svg +24 -0
- package/src/App.tsx +68 -0
- package/src/assets/hero.png +0 -0
- package/src/assets/react.svg +1 -0
- package/src/assets/vite.svg +1 -0
- package/src/components/Dropzone.tsx +90 -0
- package/src/components/FileItem.tsx +27 -0
- package/src/components/ProgressBar.tsx +18 -0
- package/src/components/Sidebar.tsx +92 -0
- package/src/hooks/useTheme.ts +23 -0
- package/src/index.css +675 -0
- package/src/main.tsx +10 -0
- package/src/pages/Dashboard.tsx +71 -0
- package/src/pages/ImageToPdf.tsx +100 -0
- package/src/pages/PdfCompress.tsx +175 -0
- package/src/pages/PdfCrop.tsx +112 -0
- package/src/pages/PdfDeletePages.tsx +151 -0
- package/src/pages/PdfGrayscale.tsx +100 -0
- package/src/pages/PdfInfo.tsx +71 -0
- package/src/pages/PdfMerge.tsx +135 -0
- package/src/pages/PdfOcr.tsx +136 -0
- package/src/pages/PdfPageNumbers.tsx +155 -0
- package/src/pages/PdfProtect.tsx +171 -0
- package/src/pages/PdfReorder.tsx +145 -0
- package/src/pages/PdfRotate.tsx +89 -0
- package/src/pages/PdfSplit.tsx +147 -0
- package/src/pages/PdfToImage.tsx +134 -0
- package/src/pages/PdfToText.tsx +107 -0
- package/src/pages/PdfUnlock.tsx +79 -0
- package/src/pages/PdfWatermark.tsx +77 -0
- package/src-tauri/Cargo.lock +5347 -0
- package/src-tauri/Cargo.toml +32 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/capabilities/default.json +14 -0
- package/src-tauri/icons/128x128.png +0 -0
- package/src-tauri/icons/128x128@2x.png +0 -0
- package/src-tauri/icons/32x32.png +0 -0
- package/src-tauri/icons/Square107x107Logo.png +0 -0
- package/src-tauri/icons/Square142x142Logo.png +0 -0
- package/src-tauri/icons/Square150x150Logo.png +0 -0
- package/src-tauri/icons/Square284x284Logo.png +0 -0
- package/src-tauri/icons/Square30x30Logo.png +0 -0
- package/src-tauri/icons/Square310x310Logo.png +0 -0
- package/src-tauri/icons/Square44x44Logo.png +0 -0
- package/src-tauri/icons/Square71x71Logo.png +0 -0
- package/src-tauri/icons/Square89x89Logo.png +0 -0
- package/src-tauri/icons/StoreLogo.png +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.ico +0 -0
- package/src-tauri/icons/icon.png +0 -0
- package/src-tauri/src/lib.rs +48 -0
- package/src-tauri/src/main.rs +6 -0
- package/src-tauri/src/pdf_engine.rs +1022 -0
- package/src-tauri/tauri.conf.json +48 -0
- package/tsconfig.app.json +28 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/uninstall.sh +65 -0
- 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,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
|
|
Binary file
|
|
Binary file
|
|
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
|
+
}
|