Converting a PDF to image and compressing that

Can anyone please let me know the most optimized way to convert a PDF to image and merging the images back to generate a PDF . I had got some methods but its taking too long to process. Any links or ideas can anyone please share ?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages: