This could go combined with these two links -
First you create an Initialization method which gets triggered whenever you add a media file in Epi. As soon as you add it calls out the method to compress. The example - https://www.david-tec.com/2017/02/using-tinypng-to-automatically-compress-images-in-episerver/ is obviously doing it for Media files as Images. But you can call out an additional piece of code that shirnks PDFs to be specific.
Just like this one - https://www.syncfusion.com/blogs/post/7-ways-to-compress-pdf-files.aspx#:~:text=Reducing%20PDF%20file%20size%20by%20optimizing%20fonts,document%20to%20make%20it%20smaller.
Give it a try
This is definitely great information. My client is fine with a paid service that exposes API to do compression. Wondering if there are any recomonded ones with nuget etc or I pick anything online.
We are running into an issue where admins have loaded huge PDF files to Epi. When try to load it takes forever in the browser. Wondering if there is any package tool which I can use during the load process to trim the size of the PDF.