Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resulting PDFs are not searchable in OS X Preview.app #27

Open
myxal opened this issue Feb 23, 2016 · 1 comment
Open

Resulting PDFs are not searchable in OS X Preview.app #27

myxal opened this issue Feb 23, 2016 · 1 comment

Comments

@myxal
Copy link

myxal commented Feb 23, 2016

I'm wondering if anyone has tested the resulting PDFs under OS X?
I'm using the PPA version of pdfocr on Ubuntu 14.04 (version reported is 0.1.4)

The behaviour is strange - selection shows that there's definitely some text layer, and it's properly aligned with the image, but whatever I highlight, the selection comes back as a series of spaces. Searching doesn't find anything.

The text is definitely correct in the pdf (judging by the output of pdftotext), and Preview.app definitely supports this feature - here's a PDF where it works properly:
S&W_7-25.pdf

BTW, is it normal to see size increases from 167k -> 430k (single page)? Seems a bit excessive for a mere text layer, but what do I know...

@wodin
Copy link

wodin commented Jan 17, 2017

Cut'n'paste and searching work fine for me in evince, but I've just tried it in Preview in OS X and I see the same problem. I can copy "text", but it pastes as spaces, and search doesn't find anything.

There is a separate issue (#28) for the size increase. It seems to happen because pdfocr converts each page to a PNM image before OCRing and then uses these (uncompressed) PNM files to construct the output PDF. If your PDF has a single JPEG per page then you might be able to use the method mentioned by @wilsotc.

See also #23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants