Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Following the instructions from this page

I take a djvu document, check it for any sign of corruption by opening it in djvulibre and it checks out fine. Copy it to my testing folder and rename it

Perform

djvu2hocr test.djvu | sed 's/ocrx/ocr/g' > test.html

ddjvu -format=tiff test.djvu test.tif

Proceed to open the tif with evince and it checks out all pages are viewable.

Run pdfbeads

pdfbeads -o test.pdf

and get the following error:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. Prepared data for processing test.tif Warning: test.tif contains multiple images, but only the first one is going to be used JBIG2 compression complete. pages:1 symbols:2080 log2:12 Processed test.tif

The PDF opens fine, but it is only a single page and the OCR works.

Here's a link to the files copied/generated

Any suggestions?

share|improve this question

1 Answer 1

pdfbeads expects a single page TIFF file and a single page html hOCR file for every page in the document. If it can only find one TIFF file, it will only output one page.

Split the TIFF file with tiffsplit. hocrsplit from hocr-tools might be able to split your html. Never needed to use it, myself.

I wouldn't worry about the iconv warning. Ruby always does that with pdfbeads. Reason here: iconv deprecation warning with ruby 1.9.3 - Stack Overflow

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.