Well, doing some research, it appears that it is best to use GS to get the PDF to a raster image. However, I need to make it so it is then reconverted from an image back into a PDF file. This means that the positioning/size/resolution, etc needs to be the same when it's converted from an image to PDF as it was when it is converted from a PDF to an image. I'm sure it's not possible to get it the EXACT quality as the original, but it needs to be close. I've gotten it close using the following commands:
Code: Select all
gs -q -sDEVICE=png16m -r288 -dBATCH -dNOPAUSE -dFirstPage=1 -dLastPage=1 -sOutputFile=test.png 1667_1_1242147993.pdf
to convert to a png file at a high resolution.
I then use ImageMagick to convert it back to the original size using the following command:
Code: Select all
convert test.png -resample 72 test.pdf
It is really close, other than everything seems to be slightly larger on test.pdf than it did on the original 1667_1_1242147993.pdf