Skip to content

Conversation

@nicklasjm
Copy link
Contributor

Description
This script command compresses selected PDF files in Finder using qpdf.

It prompts the user to input a desired JPEG quality percentage (0-100). The script applies aggressive compression settings (re-compressing streams and images) to reduce file size. The output file is saved in the same directory as the original, with the chosen quality percentage appended to the filename (e.g., MyDocument_50%.pdf), making it easy to identify the compression level.

Type of change
[x] New script command

[ ] Bug fix

[ ] Improvement of an existing script

[ ] Documentation update

[ ] Toolkit change

[ ] Other (Specify)

Screenshot
Dependencies / Requirements
This script requires qpdf to be installed. It can be installed via Homebrew:

Bash

brew install qpdf
The script automatically checks if qpdf is installed and alerts the user if it is missing.

Checklist
[x] I have read Contribution Guidelines

# @raycast.schemaVersion 1
# @raycast.title Komprimer PDF (Kvalitet i navn)
# @raycast.mode compact
# @raycast.packageName PDF Tools
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packageName must refer to the folder where the Script Command is placed in.

Suggested change
# @raycast.packageName PDF Tools
# @raycast.packageName QPDF


# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Komprimer PDF (Kvalitet i navn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As specified in the English style convention section of our CONTRIBUTING.md documentation, all the metadata in the Script Command must be using US English.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must provide the information that an extra application must be installed on the user's computer to run your Script Command as defined on "Scripts that require installation of runtimes and dependencies" section of our CONTRIBUTING.md documentation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this one is missing.

Comment on lines 64 to 66
# HER ER ÆNDRINGEN:
# Filnavnet bruger nu din valgte QUALITY-værdi
# F.eks.: MinFil_10%.pdf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please translate the comments to US English so everyone can understand what the Script Command is doing.

Copy link
Contributor

@unnamedd unnamedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!! Thanks for the changes @nicklasjm!

Our friends from Raycast Team should merge it as soon! 😄

@nhojb nhojb merged commit e644bfc into raycast:master Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants