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.

http://pdftohtml.sourceforge.net/

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

ftp://atrey.karlin.mff.cuni.cz/pub/local/clock/pdf2html

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