HOCR2PDF(1)
π HOCR2PDF β the ExactImage manual, bestie edition π
okay so you're holding the hocr2pdf(1) page, and I'm gonna walk you through it like we're texting at 2am. it's from the ExactImage Manual. buckle up π
β¨ NAME β¨
hocr2pdf β the hOCR-to-PDF converter from the ExactImage toolkit. it's giving "turn my scan into a real document" energy π
πΈ SYNOPSIS πΈ
hocr2pdf [option...] {-i | --input} input-file
{-o | --output} output-file
hocr2pdf {-h | --help}
like, you need an input and an output, no cap. or you can just ask for help. π€·ββοΈ
π¦ DESCRIPTION π¦
ExactImage is a fast C++ image processing library. and the way it's different from a lot of other library frameworks?? it lets you work in several color spaces and bit depths natively, which means low memory and computational requirements. lowkey iconic. π₯
hocr2pdf creates well layouted, searchable PDF files from hOCR (annotated HTML) input that you got from an OCR system. so like, your OCR did the reading, and this one makes it pretty and searchable. periodt. π
π OPTIONS π
-ifile,--inputfile β read the image from the file you name. careful bestie: the input hOCR is read from standard input, not from this file. two different inputs, iykyk π-ofile,--outputfile β save the output PDF to this file.-n,--no-imageβ don't place the image over the text. by default the text layer is hidden behind the image.-s,--sloppy-textβ sloppily place text, group words, and do not draw single glyphs. it's called sloppy on purpose, she's allowed to be messy π-rn,--resolutionn β override the resolution of the input image to n dpi. the default resolution (if it's not specified in the input file) is 300 dpi.--qualityβ quality setting used for writing compressed images. integer range 0-100, the default is 75.--compressβ compression method for writing images, e.g.ascii85,hex,flate,jpeg,jpeg2000, ... default is based on bit-depth.-h,--helpβ display help text and exit. bye bestie π«Ά
π EXAMPLE π
$ hocr2pdf -i scan.tiff -o test.pdf < cuneiform-out.hocr
see how the hOCR comes in through < on stdin while the image comes from -i? chef's kiss πβ¨
β SEE ALSO β
exactimage(7) β go read that one too, fr fr.
π AUTHORS π
Jakub Wilk <jwilk@debian.org> wrote this manual page for the Debian system. ty king π
https://exactcode.com/opensource/exactimage/ this manual page incorporates texts found on the ExactImage homepage.
π COPYRIGHT π
this manual page was written for the Debian system (and may be used by others).
permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.
on Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
and that's the whole page, bestie!! π¦ this was hocr2pdf, dated 02/18/2015, living in section HOCR2PDF(1) of the manual. go make some searchable PDFs, you're the main character now πβ¨π
π¦ where this page comes from
- debian bookworm: exactimage 1.0.2-11+b2 Β· GPL-2.0-only
- debian trixie: exactimage 1.2.1-2 Β· GPL-2.0-only
- ubuntu jammy: exactimage 1.0.2-8build3 Β· GPL-2.0-only
- ubuntu noble: exactimage 1.0.2-11build9 Β· GPL-2.0-only
- ubuntu questing: exactimage 1.2.1-2
- ubuntu resolute: exactimage 1.2.1-2build2 Β· GPL-2.0-only
- ubuntu stonking: exactimage 1.2.1-3build2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms