You can redefine the various 'image' operators so that they don't do anything:
/image {
type /dicttype eq not { % uses up argument, only one if dict form
pop pop pop pop % remove the arguments for the non-dictionary form.
} ifelse
} bind def
/imagemask {
type /dicttype eq not { % uses up argument, only one if dict form
pop pop pop pop % remove the arguments for the non-dictionary form.
} ifelse
} bind def
/colorimage {
type /integertype eq {
pop % multi
0 1 3 -1 roll {pop} for % one for each colour component
} {
pop pop pop
} ifelse
} bind def
Save that as a file, and add the file to your GS invocation.
You can remove linework similarly by redefining the stroke operator:
/stroke {
newpath
} bind def
rectstroke is harder, I suggest you read the PLRM if you need that one.
Possibly also the fill operator:
/fill {
newpath
} bind def
/eofill {
newpath
} bind def
Beware! Some text is not drawn using the text 'show' operators, but is constructed from linework, or drawn as images. These techniques will be defeated if you redefine the operators as shown above.
Note that the PDF interpreter often doesn't allow re-definition of operators, so you may first have to convert your PDF file to PostScript, using the ps2write device, then run the resulting file through GS to get a TIFF file.