Given a pdf file, and a html file in hocr format for the OCRed text, can we merge the OCRed text into the pdf file, so that the new pdf file can be searchable for text?
For example, I have a pdf by scanning without searchable text, about 5MB. I convert it to a djvu file and then split it into single-page tiff files, and then merge some hocr files for the pages with the tiff files using
pdfbeads. Now my new pdf file is 23MB. So I would like to know if I can merge the hocr files directly to the original pdf file, to achieve a much smaller size than 23MB?
Conversely, given a pdf file with OCRed text, can we export its OCRed text into a html file in hocr format?
Can we also remove the OCRed text from the pdf file, without printing to pdf file?
If not limited to hocr format, are there other formats which have programs to do the above merging and/or extraction?