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 πŸ‘‘

  • -i file, --input file β€” 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 πŸ™ˆ
  • -o file, --output file β€” 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 πŸ’…
  • -r n, --resolution n β€” 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.


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 πŸ’–βœ¨πŸ‘‘