Setting DPI or PPI of Images in PDF

Contents
[ ]

The following code snippet shows how to get an image with certain resolution from a PDF file and then replace it.