You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A plan to make pdfsizeopt work and easy to install on modern Macs (including Apple Silicon, but also 64-bit x86):
For this project, a modern Mac is running Mac OS X Leopard 10.5 or later (will also be tested with the most recent macOS on 2023-02) on either 64-bit x86 or Apple Silicon (64-bit ARM).
Binaries will be compiled for 64-bit x86. Macs with Apple Silicon will run them using the built-in Rosetta 2 emulation.
gs: Ghostscript 9.14.1, compiled from sources (see @rbubley's porting work for instructions) or Ghostscript 9.05, compiled from sources (with patches by @pts, currently unreleased)
pngout: macOS 64-bit x86 binary downloaded from http://www.jonof.id.au/kenutils.html . Which is the minimum supported macOS version? Can we patch it to make it more backwards-compatible? Nevertheless, if it doesn't work, we can disable it with pdfsizeopt --use-pngout=no.
Compiling from sources (C and C++) was done on Linux amd64 using the https://github.com/pts/pts-osxcross cross compiler targeting MacOS Leopard 10.5 and 64-bit Intel x86 processor.
python: Downloaded from https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg , and shell script to set up DYLD_LIBRARY_PATH added. It works on macOS Snow Leopard 10.6 or later. There was a system Python 2.7 (in /usr/bin/python) in macOS Big Sur 11 or earlier (with /usr/bin/python being Python 2.7) which worked, but it has been removed in macOS Montery 12, which only has Python 3 (as /usr/bin/python3).
It works on macOS Ventura 13.3, both with 64-bit Intel x86 (amd64, x86_64) processor and Apple Silicon (ARM processor). The programs are compiled for 64-bit Intel x86, and on Apple Silicon they are run by the built-in Rosetta 2 emulation.
This issue was split from #154
A plan to make pdfsizeopt work and easy to install on modern Macs (including Apple Silicon, but also 64-bit x86):
python
: Python 2.7, compiled from sources using https://github.com/pts/staticpythongs
: Ghostscript 9.14.1, compiled from sources (see @rbubley's porting work for instructions) or Ghostscript 9.05, compiled from sources (with patches by @pts, currently unreleased)jbig2
: Compiled from sources using https://github.com/pts/pdfsizeopt-jbig2/blob/master/c-darwinc64.shsam2p
: It's actually imgdataopt renamed tosam2p
, compiled from sources using https://github.com/pts/imgdataopt/blob/3bc94634e06dc21093055ded22336a9b0bab44b9/Makefile#L40pngout
: macOS 64-bit x86 binary downloaded from http://www.jonof.id.au/kenutils.html . Which is the minimum supported macOS version? Can we patch it to make it more backwards-compatible? Nevertheless, if it doesn't work, we can disable it withpdfsizeopt --use-pngout=no
.qpdf
: Optional dependency, compiled from sources using https://github.com/pts/pts-qpdfI've created https://github.com/pts/pts-osxcross for conveniently cross-compiling macOS amd64 C and C++ programs on Linux amd64.
Program executable binary download link: https://github.com/pts/pdfsizeopt/releases/download/2023-02-20/pdfsizeopt_libexec_darwinc64-v3.tar.gz .
Notes:
python
: Downloaded from https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg , and shell script to set upDYLD_LIBRARY_PATH
added. It works on macOS Snow Leopard 10.6 or later. There was a system Python 2.7 (in/usr/bin/python
) in macOS Big Sur 11 or earlier (with/usr/bin/python
being Python 2.7) which worked, but it has been removed in macOS Montery 12, which only has Python 3 (as/usr/bin/python3
).gs
: Used the executable in Ghostscript 9.05 downloaded from https://ftp.math.utah.edu/pub/tex/historic/systems/mactex/2012/mactexadditions20120707.pkgjbig2
: Compiled from sources: https://github.com/pts/pdfsizeopt-jbig2sam2p
: Actually imgdataopt compiled from sources: https://github.com/pts/imgdataoptpngout
: Reused the 64-bit Intel x86 executable from https://github.com/pts/pdfsizeopt/releases/download/2017-09-03d/pdfsizeopt_libexec_darwin-v1.tar.gzqpdf
: QPDF 6.0.0 compiled from sources: https://github.com/pts/pts-qpdfThe text was updated successfully, but these errors were encountered: