2
1
Suppose you've got 2 "scanned" pdf files.
- Large, but without text layer.
- Smaller (with lower quality images), but with correct text layer.
Both files contain equal images, different only by their compression.
The goal is to embed the same text layer to 1st pdf.
"Just OCR 1st file" is not a solution. I know Acrobat (and some other tools) are able to OCR without altering image layer, but I'm not happy with their OCR quality.
So, I see two possible ways:
- Export-import text layer somehow
- Replace images in image layer somehow.
Concerning 1st way, I've found nothing. Concerning 2nd way, I've found two tools, which are quite close hocr2pdf and pdf2text, but they are still not enough, as far as I understood. :(
PS: Use example:
I've just found another example where such operation is useful in a systematic manner.
If you've got scanned pdf-1 (without text layer) with, say , "jpg" image compression, Abbyy finereader gives you OCR'd pdf, pdf-2. It would be either quite large, if you choose lossless image compression, or it would have image quality significantly lower than pdf-1. In many cases, best choice is to keep source image compression as-is, and do not recompress the image.
How is it possible that the scanned document has better quality than the original one? Am I missing something? – gronostaj – 2013-11-24T10:36:49.927
@gronostaj Em.. I've not said so... There's pdf-1, which has better quality images and pdf-2, which has lower quality images but features text layer. Neither of them is "original". In fact, one may treat pdf-2 like OCR'd and compressed pdf-1. If so, I'd like to combine both, to obtain both text layer and higher quality images. – i3v – 2013-11-24T13:13:44.927