works for me with tesseract 5.5.1
tesseract src.tiff - -c tessedit_create_hocr=1 --dpi 300 -l eng \
--oem 1 --psm 6 --tessdata-dir tessdata_best >dst.hocr
> I then found out the hard way that these only work on Tesseract 4
how did you call tesseract?
tesseract can fail if you also pass
"magic" positional arguments like "hocr" or "quiet"
then tesseract prints warning messages like
"read_params_file: Can't open <ARG>"
for each unexpected argument
$ tesseract src.tiff - --dpi 300 -l eng \
--oem 1 --psm 6 --tessdata-dir tessdata_best hocr >dst.hocr
read_params_file: Can't open hocr
$ tesseract src.tiff - hocr --dpi 300 -l eng \
--oem 1 --psm 6 --tessdata-dir tessdata_best >dst.hocr
read_params_file: Can't open --dpi
read_params_file: Can't open 300
read_params_file: Can't open -l
read_params_file: Can't open eng
...