https://blog-qa.aspose.com/pdf/optimize-pdf-javascript/
Optimize PDF Files in JavaScript