Skip to content

.hocr file extension for hocr files #115

Open

Description

@milahu

lets just use .hocr and call it a day : )

  • .hocr is shorter than .hocr.html
  • .hocr is not used for anything else
  • html readers (web browsers) ignore the bbox values in hocr files
  • .hocr files should be opened with hocr-editors like gImageReader

i just sent a request to create fileinfo.com/extension/hocr

related #27

Activity

  1. kba commented on Jan 6, 2026

    @kba
    Owner

    The only reason I have been using .hocr.html instead of .hocr is because it should be possible to render hOCR documents as HTML, either plain or with some javascript to make it pretty. When opening .hocr files locally in a browser, media type is assumed to be text/plain and rendered as such. This is not a problem when serving files with a server that properly sets Content-Type to something the browser recognizes as HTML - application/hocr or text/vnd.hocr+xml or similar would not work BTW.

    Since I (unfortunately) have very little to do with hOCR these days - we use PAGE-XML as the processing format and ALTO for archiving and presentation - I would be open to adapting IANA considerations to whatever benefits the community of actual users of the format.

  2. milahu commented on Jan 8, 2026

    @milahu
    Author

    it should be possible to render hOCR documents as HTML, either plain or with some javascript to make it pretty.

    to make it pretty, see my hocr-to-epub-fxl

    the conversion from hocr to html is done ahead of time
    so readers dont require javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions