Comments (11)
are you able to generate searchable pdf ?
Yes, I see a searchable PDF, but I am working on Linux.
For windows terminal the encoding can be a problem. You can check the encoding for python in windows terminal by starting python
and then type
>>> import sys
>>> sys.stdout.encoding
If that is now UTF-8 then you can try to run the command with PYTHONIOENCODING=UTF-8
in front, i.e.
PYTHONIOENCODING=UTF-8 hocr-pdf . > out.pdf
i got pdf as output but it was just a normal pdf i.e. not in searchable format.
This is with the git bash on windows, right? Can you upload your result here?
from hocr-tools.
Can you provide a hOCR file which causes this error? How did you create it?
from hocr-tools.
I used Tesseract 4.0.0 to generate hocr
Hocr File
This is the image for above generate Hocr
from hocr-tools.
Is there any other solution for getting table from hocr data ?
from hocr-tools.
This works for me as well after I have renamed the image and converted it to a jpg file.
- Do you have the
jpg
file also in your directory? - What is your environment? Linux or Windows?
- What Python version do you use?
python -V
- What is the encoding of your bash which Python uses?
from hocr-tools.
- i was using png image for conversion , now i replaced it with jpg.
- Environment - Windows
- Python 3.6.4
- well i was using cmd to get output , tried with git bash , i got pdf as output but it was just a normal pdf i.e. not in searchable format.
are you able to generate searchable pdf ?
from hocr-tools.
Tesseract has an option to output to pdf. Did you tried it?
from hocr-tools.
@zuphilip
out.pdf
this the pdf file being generated
@amitdo
i have tried generating searchable pdf from tesseract also:
the commands are provided over here were used .
still the output is not searchable fromat its just simple pdf with image.
from hocr-tools.
@shekarnode There is text in your generated PDF and I can search for text as well.
from hocr-tools.
I was using adobe reader and all the time was not able to search ,now when I opened the pdf in browser I found out it was searchable.
Thanks @zuphilip for helping out.
from hocr-tools.
The pdf produced by Tesseract is also searchable.
from hocr-tools.
Related Issues (20)
- hocr-combine file counter HOT 11
- Fix tests
- encoding errors HOT 1
- hocr-cut gives error HOT 6
- alto input? HOT 2
- Output hocr files besides images in hocr-cut HOT 1
- move to python3 HOT 7
- Line images using HOCR HOT 2
- hocr-pdf does not work with tesseract HOT 2
- Installation instructions for Python packages need update for Python 3 HOT 2
- hocr-pdf printing Hebrew text in opposite direction in the generated pdf file HOT 4
- Does it work for windows? HOT 1
- AttributeError: module 'base64' has no attribute 'decodestring' HOT 5
- decodebytes() Depreciated in hocr-pdf use decodestring() HOT 4
- hocr-pdf: change encoding from latin1 to utf-8 HOT 3
- a proposition to help hocr-tools become ZE best HOT 2
- Bilingual Text Encoding is not Working for Kannada-English Output Hocr File
- Font "Invisible" is of dubious copyright
- Link to hOCR spec doesn't work HOT 1
- hocr-extract-images doesn't see image HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hocr-tools.