After cropping part of pdf page and generating foo.pdf file, which is one page only, to convert this to svg file to include with tex4ht, do this
pdf2svg p.pdf p.svg
I found this works better than
inkscape --without-gui --file=p.pdf --export-plain-svg=p.svg
This can be used to do the conversion of all cropped pdf files in the folder
#!/bin/bash for file in *.pdf; do filename=${file%.*} pdf2svg "$filename.pdf" "$filename.svg" done