Shrinking a PDF with Ghostscript is easy in Linux. Below are 3 ghostscript commands to shrink PDFs to a few different levels. screen – lowest

Using pathinfo Function to Detect File Extention
Sometimes that’s not necessary to check a file’s mime type and you only need to check the file extension. To do that we can use

Function to Parse URLs From a PDF Document
You don’t have to actually programmatically read a PDF to parse out the links in them. This simple routine below will parse out all the