Preview is very limited in its capabilities.
(Although @michalczukm's answer might well be worth a try for simple documents, e.g. those PDFs with not much structure, without Bookmarks. Also: while you may not visually discern any quality loss, it is still a lossy procedure, but with less aggressive settings then the original Quartz-filter.)
Instead of Image Magick or Preview I suggest to try:
- Adobe Acrobat (expensive)
or the libre/free
- GhostScript with the following parameters:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -dNOPAUSE -dQUIET -dPDFSETTINGS=/prepress -sOutputFile=Name_of_Outputfile.pdf To_Reduce_Input.pdf
You may play with these settings. Those given here should not perform any lossy conversions or strip away important document structures. Meaning: most of the time the savings gained might be very good, but sometimes the file size even increases.
Ghostscript is available through a number of venues for macOS. The related muPDF is even available on the App Store.
If you created the PDF yourself then it would be obviously best to losslessly reduce the images before including them into the document (the PDF). Adjusting the image size in terms of pixel count/resolution appropriate for the intended output medium might produce the biggest savings.