-
Notifications
You must be signed in to change notification settings - Fork 169
feat(pdf-tools): add pdf-tools extension #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
manuelcontrera
wants to merge
3
commits into
vicinaehq:main
Choose a base branch
from
manuelcontrera:feat/add-pdf-tools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| node_modules | ||
| vicinae-env.d.ts | ||
| dist | ||
| .DS_Store | ||
| *.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # PDF Tools for Vicinae | ||
|
|
||
| An all-in-one PDF toolkit extension for **Vicinae**, ported and expanded from Raycast's PDF Tools. Works seamlessly across **Linux**, **macOS**, and **Windows**. | ||
|
|
||
| --- | ||
|
|
||
| ## Features & Commands | ||
|
|
||
| ### `images-to-pdf` - Convert Images to PDF | ||
| Merge and convert multiple images of any format (`.png`, `.jpg`, `.jpeg`, `.tiff`, `.webp`, `.bmp`, `.gif`, `.avif`, etc.) into a single PDF document. | ||
| - Preserves original image quality and handles EXIF rotation. | ||
| - Blends transparent images cleanly over a solid white background. | ||
| - Sorts pages naturally according to image file names (e.g. `img1`, `img2`, `img10`). | ||
| - Saves the generated PDF directly in the source directory. | ||
|
|
||
| ### `merge` - Merge PDF Files | ||
| Combines two or more PDF files into a single unified document. | ||
| - Retains source page order and saves the merged file in the same directory. | ||
|
|
||
| ### `protect` - Protect PDF | ||
| Encrypts a PDF document with military-grade AES-256 password protection in place. | ||
|
|
||
| ### `unlock` - Unlock PDF | ||
| Removes password encryption and decrypts the document in place. | ||
|
|
||
| ### `split-by-file-size` - Split PDF by File Size | ||
| Intelligently splits a large PDF into multiple parts based on a maximum file size threshold (in MB) using an optimized binary search algorithm. | ||
|
|
||
| ### `split-by-page-count` - Split PDF by Page Count | ||
| Divides a PDF document into smaller parts containing a specified number of pages each. | ||
|
|
||
| ### `watermark` - Add Watermark | ||
| Applies a crisp vector text watermark across all pages of a PDF document with custom text, rotation angle (0° or 45°), and opacity. | ||
|
|
||
| --- | ||
|
|
||
| ## Universal File Selection | ||
|
|
||
| PDF Tools provides a frictionless file selection experience across all operating systems: | ||
| 1. **Active Finder / Explorer Selection**: Directly picks files currently selected in macOS Finder. | ||
| 2. **Clipboard Detection**: Automatically detects files copied to the clipboard (GNOME/Wayland clipboard, Windows Explorer clipboard, or copied file paths). | ||
| 3. **Native File Picker Fallback**: If no files were previously selected or copied, an interactive native file dialog opens automatically (`zenity` / `kdialog` on Linux, AppleScript dialog on macOS, `OpenFileDialog` on Windows). | ||
|
|
||
| --- | ||
|
|
||
| ## Prerequisites & Installation | ||
|
|
||
| PDF Tools relies on lightweight system tools for cryptographic operations and image processing. | ||
|
|
||
| ### 1. `qpdf` (Required for merge, protect, unlock, split) | ||
| - **Linux (Ubuntu/Debian)**: `sudo apt install qpdf` | ||
| - **Linux (Arch/Manjaro)**: `sudo pacman -S qpdf` | ||
| - **Linux (Fedora)**: `sudo dnf install qpdf` | ||
| - **macOS**: `brew install qpdf` | ||
| - **Windows**: `winget install qpdf` (or `choco install qpdf`) | ||
|
|
||
| ### 2. Python & Pillow (Required for `images-to-pdf`) | ||
| - Ensure Python is installed on your system. | ||
| - Install Pillow: | ||
| ```bash | ||
| pip install Pillow | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Credits | ||
|
|
||
| - Ported, enhanced, and maintained for Vicinae by [manuelcontrera](https://github.com/manuelcontrera). | ||
| - Original Raycast extension created by [xilopaint](https://github.com/xilopaint). | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Warning — Linux file-picker support is overstated
Rule:
MANIFEST-001The README promises a
zenity/kdialogfallback, butpickFilesWithDialogonly invokeszenity; KDE systems with onlykdialogreceive a failure.Suggested resolution: Implement the documented
kdialogfallback or removekdialogfrom the documented behavior.