<s>
hOCR	B-General_Concept
is	O
an	O
open	O
standard	O
of	O
data	O
representation	O
for	O
formatted	O
text	O
obtained	O
from	O
optical	B-Application
character	I-Application
recognition	I-Application
(	O
OCR	B-Application
)	O
.	O
</s>
<s>
The	O
definition	O
encodes	O
text	O
,	O
style	O
,	O
layout	O
information	O
,	O
recognition	O
confidence	O
metrics	O
and	O
other	O
information	O
using	O
Extensible	B-Protocol
Markup	I-Protocol
Language	I-Protocol
(	O
XML	B-Protocol
)	O
in	O
the	O
form	O
of	O
Hypertext	B-Language
Markup	I-Language
Language	I-Language
(	O
HTML	B-Language
)	O
or	O
XHTML	B-Language
.	O
</s>
<s>
The	O
following	O
OCR	B-Application
software	O
can	O
output	O
the	O
recognition	O
result	O
as	O
hOCR	B-General_Concept
file	O
:	O
</s>
<s>
The	O
following	O
example	O
is	O
an	O
extract	O
of	O
an	O
hOCR	B-General_Concept
file	O
:	O
</s>
<s>
The	O
recognized	O
text	O
is	O
stored	O
in	O
normal	O
text	O
nodes	O
of	O
the	O
HTML	B-Language
file	I-Language
.	O
</s>
<s>
Moreover	O
,	O
the	O
usual	O
HTML	B-Language
entities	O
are	O
used	O
,	O
</s>
<s>
Visit	O
to	O
view	O
in	O
depth	O
about	O
hOCR	B-General_Concept
.	O
</s>
<s>
The	O
hOCR	B-General_Concept
format	O
is	O
most	O
commonly	O
used	O
in	O
order	O
to	O
make	O
searchable	O
PDF	O
files	O
or	O
as	O
an	O
extracted	O
metadata	O
of	O
the	O
PDF	O
file	O
.	O
</s>
<s>
In	O
order	O
to	O
create	O
searchable	O
PDF	O
files	O
we	O
can	O
use	O
a	O
scanned	O
document	O
image	O
and	O
a	O
.hocr	O
file	O
of	O
the	O
particular	O
image	O
.	O
</s>
<s>
hocr-tools	O
is	O
an	O
open	O
source	O
library	O
written	O
in	O
Python	B-Language
that	O
supports	O
both	O
Python	B-Language
2.x	I-Language
Versions	O
and	O
Python	B-Language
3.x	O
Versions	O
.	O
</s>
<s>
It	O
has	O
a	O
command	O
line	O
utility	O
attached	O
in	O
the	O
scripts	O
called	O
hocr-pdf	O
that	O
enables	O
us	O
to	O
convert	O
standard	O
hocr	B-General_Concept
files	O
to	O
a	O
searchable	O
pdf	O
file	O
.	O
</s>
<s>
It	O
is	O
also	O
worth	O
noting	O
that	O
the	O
version	O
for	O
dealing	O
with	O
hocr	B-General_Concept
files	O
in	O
RTL	O
or	O
non-Latin	O
scripts	O
like	O
Arabic	O
,	O
we	O
need	O
to	O
use	O
the	O
GitHub	B-Application
Repo	O
at	O
the	O
moment	O
.	O
</s>
<s>
We	O
can	O
use	O
the	O
hocr-pdf	O
utility	O
using	O
the	O
following	O
basic	O
syntax	O
.	O
</s>
<s>
The	O
folder_images_and_hocr	O
must	O
contain	O
the	O
respective	O
.jpg	O
and	O
.hocr	O
format	O
files	O
with	O
their	O
file	O
extensions	O
changed	O
.	O
</s>
<s>
Some	O
of	O
the	O
known	O
issues	O
of	O
hocr-pdf	O
script	O
in	O
PyPI	O
installation	O
are	O
the	O
following	O
.	O
</s>
<s>
Not	O
up	O
to	O
date	O
with	O
GitHub	B-Application
Repository	O
.	O
</s>
<s>
Compile	O
hocr-tools	O
using	O
latest	O
GitHub	B-Application
Repository	O
.	O
</s>
<s>
hocr2pdf	O
is	O
another	O
library	O
that	O
supports	O
the	O
conversion	O
of	O
hocr	B-General_Concept
files	O
.	O
</s>
<s>
It	O
is	O
written	O
in	O
C++	B-Language
and	O
is	O
cross-compatible	O
with	O
other	O
libraries	O
.	O
</s>
<s>
According	O
to	O
Ubuntu	B-Protocol
Manpages	I-Protocol
,	O
ExactImage	O
is	O
a	O
fast	O
C++	B-Language
image	O
processing	O
library	O
.	O
</s>
<s>
hocr2pdf	O
creates	O
well	O
layouted	O
,	O
searchable	O
PDF	O
files	O
from	O
hOCR	B-General_Concept
(	O
annotated	O
HTML	B-Language
)	O
input	O
obtained	O
from	O
an	O
OCR	B-Application
system	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
following	O
discussed	O
and	O
stable	O
libraries	O
there	O
have	O
been	O
many	O
contributions	O
to	O
the	O
hOCR	B-General_Concept
formant	O
over	O
the	O
years	O
with	O
support	O
from	O
many	O
of	O
the	O
early	O
adopters	O
of	O
this	O
format	O
.	O
</s>
<s>
You	O
can	O
get	O
access	O
to	O
inlaying	O
text	O
on	O
an	O
Image	O
with	O
hOCR	B-General_Concept
and	O
converting	O
that	O
in	O
a	O
PDF	O
file	O
using	O
Python2	O
with	O
this	O
12	O
Year	O
old	O
script	O
as	O
of	O
2021	O
.	O
</s>
<s>
The	O
HOCRConverter	O
is	O
a	O
script	O
written	O
in	O
Python	B-Language
2.x	I-Language
that	O
can	O
used	O
in	O
order	O
to	O
convert	O
a	O
hOCR	B-General_Concept
file	O
with	O
a	O
specified	O
image	O
file	O
in	O
order	O
to	O
convert	O
it	O
to	O
a	O
searchable	O
pdf	O
file	O
.	O
</s>
