forscore-pdf-optimizer

Add to iOS Shortcuts.

PRO TIP for ForScore users:

  1. Install iOS shortcut using link above
  2. Open ForScore, and go to an annoyingly laggy PDF
  3. Share the original PDF
  4. In the share menu, scroll down until you see "Edit Actions..."
  5. Find "ForScore PDF Optimizer" and add it to favorites, and hit done
  6. Click on "ForScore PDF Optimizer"
  7. After it's done processing, there should be a popup. Check to see if there's any defects
  8. If you're satisfied, click on Share, "Save to Files", and then navigate to On My iPad, forScore, and see if the files are there. If not, go to iCloud Drive and check there.
  9. Once you're sure the original laggy PDF exists in the forScore folder, click Save, and "Replace".
  10. Reopen ForScore and you should have a laggy-free PDF.

If you don't need iOS shortcuts, use this instead: laurentmmeyer.github.io/ghostscript-pdf-compress.wasm/

How this works in a nutshell: Reduces the PDF's image resolution to <300 DPI as well as other optimizations.

Why ForScore can feel slow: Many scores from IMSLP come at >1200 DPI or higher, which is overkill and can slow down your iPad. This tool trims DPI to around 264–300 while keeping quality high.

Only for ForScore? No, this can also be used for other PDF-reader apps that have difficulty displaying super-high DPI PDFs. I mainly created this because I use ForScore and it really chokes on those IMSLP files.

For the technically inclined: Behind the scenes, the following is run on the server:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -dColorConversionStrategy=/LeaveColorUnchanged -sOutputFile=output.pdf input.pdf

For the technically inclined: Use from the command line:

Created with help of ChatGPT · Licensed MIT · Source: github.com/binary-person/forscore-pdf-optimizer