I try to convert high resolution images inside PDF to PNG.
The PDFTOHTML works, but the picture is broken because of the default 1.5 X magnification.


The PDF2HTML also works, but the picture is turned into greyscale.


PSTOEDIT only convert half part of first page:

pstoedit -f magick test.pdf result

How to solve the above problems?

Part of PDF2HTML script file related to Ghostscript:

$ghostscript -q -dFirstPage=$start1 -dNOPAUSE -dBATCH -sDEVICE=pbmraw -sOutputFile="$pname" -r"$hdpi"x"$vdpi" $1 &
$filter "$dpi" "$basename" "$titlestring" "$bottom" "$pageoffset" "$pname" $start $invert