I also look at something like that. While playing with imagemagick, I tried this command and got unexpected results.
convert -input.pdf -blur 0x0 output.jpg
this removes the text layers from the pdf files I tried.
I can not guarantee that this will work for you, and if that is the right way, but you can try.
codin source share