I'm looking to do the exact opposite of what this person wanted to do: Replacing vector images in a PDF with raster images
In other words, I want to take pdfs with a mix of raster and vector images and output a pdf where all of the images are vectors. I realize that many detailed raster images like photographs will be significantly altered as part of the process to reduce complexity, and that's okay. It'll still be better than the current alternative.
If you're curious, the reason I want to do this is that the nonprofit I work for about to launch a customer portal using a Salesforce product called Digital Experience Cloud. In it, we will provide customers with confidential pdf reports specific to them. To do so, we need to use a salesforce file sharing widget that includes rendering previews of the pdfs. In their latest update, Salesforce released a version of this that is a little buggy - it specifically alters the colors of all images in their pdf previews that people look, well, blue. Vector images are untouched. We were originally going to launch this product today but are holding for a solution a the reports contain a lot of images of clients we serve - making them blue would be seen as disrespectful at best. Salesforce customer service recently told us that this bug will be fixed with their next major release in three months at the very earliest. So I'm looking for workarounds.