Skip to content

hocr-pdf printing Hebrew text in opposite direction in the generated pdf file #163

@smijo149

Description

@smijo149

The pdf file generated using hocr-pdf has Hebrew text printed in the opposite direction.

Steps I followed:

  1. I used Google cloud vision to get the OCR
  2. Used gcv2hocr to generate hocr.
  3. Used hocr-pdf --savefile output.pdf actual-file.jpg to generate pdf file.

The pdf file has Hebrew text inserted in it but in the reverse order.

Actual image:

Screen Shot 2021-02-01 at 6 48 35 PM

This is how my hocr file looks:

Screen Shot 2021-02-01 at 7 01 04 PM

Text in pdf file: (I have set text visibility mode to 0 so that the inserted text is visible)

Screen Shot 2021-02-01 at 6 48 56 PM

Hebrew is a right to left language so not sure if I have to pass any language or direction parameters to get this right.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions